mirror of
https://github.com/torvalds/linux.git
synced 2024-10-25 22:44:30 +00:00
drm/amdgpu: fix amdgpu_res_first()
Fix size comparison in the resource cursor. Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
eec64a5e5d
commit
15e16daa35
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user