Commit 15e16daa authored by Nirmoy Das's avatar Nirmoy Das Committed by Alex Deucher
Browse files

drm/amdgpu: fix amdgpu_res_first()



Fix size comparison in the resource cursor.

Signed-off-by: default avatarNirmoy Das <nirmoy.das@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eec64a5e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static inline void amdgpu_res_first(struct ttm_resource *res,
	BUG_ON(start + size > res->num_pages << PAGE_SHIFT);

	node = res->mm_node;
	while (start > node->size << PAGE_SHIFT)
	while (start >= node->size << PAGE_SHIFT)
		start -= node++->size << PAGE_SHIFT;

	cur->start = (node->start << PAGE_SHIFT) + start;