[PATCH] drm/amdkfd: Use the correct wptr size
Alex Deucher
alexdeucher at gmail.com
Mon Nov 18 19:15:00 UTC 2024
On Mon, Nov 18, 2024 at 12:35 AM Lijo Lazar <lijo.lazar at amd.com> wrote:
>
> Write pointer could be 32-bit or 64-bit. Use the correct size during
> initialization.
>
> Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
Acked-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
> index 4843dcb9a5f7..d6037577c532 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
> @@ -125,7 +125,7 @@ static bool kq_initialize(struct kernel_queue *kq, struct kfd_node *dev,
>
> memset(kq->pq_kernel_addr, 0, queue_size);
> memset(kq->rptr_kernel, 0, sizeof(*kq->rptr_kernel));
> - memset(kq->wptr_kernel, 0, sizeof(*kq->wptr_kernel));
> + memset(kq->wptr_kernel, 0, dev->kfd->device_info.doorbell_size);
>
> prop.queue_size = queue_size;
> prop.is_interop = false;
> --
> 2.25.1
>
More information about the amd-gfx
mailing list