drm/amdgpu: fix amdgpu_res_first()
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix amdgpu_res_first()
Fix size comparison in the resource cursor.
Signed-off-by Nirmoy Das <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +1 -1
@@ -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;
Signature · 6 lines
2.30.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 19.03.21 um 20:08 schrieb Nirmoy Das:
Quoted 3 lines
Fix size comparison in the resource cursor.
Signed-off-by Nirmoy Das <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h static inline void amdgpu_res_first(struct ttm_resource *res, · line 70
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +1
-1@@ -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;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx