* [PATCH 1/1] drm/amdgpu: fix amdgpu_res_first()
@ 2021-03-19 19:08 Nirmoy Das
2021-03-20 9:05 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Nirmoy Das @ 2021-03-19 19:08 UTC (permalink / raw)
To: Christian.Koenig; +Cc: Nirmoy Das, amd-gfx
Fix size comparison in the resource cursor.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
index b49a61d07d60..40f2adf305bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
@@ -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;
--
2.30.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] drm/amdgpu: fix amdgpu_res_first()
2021-03-19 19:08 [PATCH 1/1] drm/amdgpu: fix amdgpu_res_first() Nirmoy Das
@ 2021-03-20 9:05 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2021-03-20 9:05 UTC (permalink / raw)
To: Nirmoy Das, Christian.Koenig; +Cc: amd-gfx
Am 19.03.21 um 20:08 schrieb Nirmoy Das:
> 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>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> index b49a61d07d60..40f2adf305bc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h
> @@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-20 9:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 19:08 [PATCH 1/1] drm/amdgpu: fix amdgpu_res_first() Nirmoy Das
2021-03-20 9:05 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.