From de35ea824a17d664ed147ca87993647d140bcf42 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Oct 2023 02:37:14 +0000 Subject: [PATCH] drm/amdkfd: Use gpu_offset for user queue's wptr From YuBiao Wang b60028c81e463b0930191a4fa2ba770ff6d40e3a in linux-6.1.y/6.1.56 cc39f9ccb82426e576734b493e1777ea01b144a8 in mainline linux --- sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c b/sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c index c06ada0844b..0b87034d9dd 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -201,7 +201,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q, if (q->wptr_bo) { wptr_addr_off = (uint64_t)q->properties.write_ptr & (PAGE_SIZE - 1); - queue_input.wptr_mc_addr = ((uint64_t)q->wptr_bo->tbo.resource->start << PAGE_SHIFT) + wptr_addr_off; + queue_input.wptr_mc_addr = amdgpu_bo_gpu_offset(q->wptr_bo) + wptr_addr_off; } queue_input.is_kfd_process = 1; -- 2.20.1