summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-02-02 03:58:05 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-02-02 03:58:05 +0000
commitf22183a124476ecf34f0f5a4d36da0c2931a838b (patch)
tree9f212161ce9971d58160fc3e3ad83e49a25a603c /sys/dev/pci/drm
parent48294491ab9867ae3728f43cdc5fb37b570168c4 (diff)
drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU
From Eric Huang ca6263dc22acafc04c0d164900e5662a0e920a8a in linux-6.1.y/6.1.9 a6941f89d7c6a6ba49316bbd7da2fb2f719119a7 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c2
-rw-r--r--sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 417c08a1c9f..8de1399c31e 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -2130,7 +2130,7 @@ int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_b
}
amdgpu_amdkfd_remove_eviction_fence(
- bo, bo->kfd_bo->process_info->eviction_fence);
+ bo, bo->vm_bo->vm->process_info->eviction_fence);
amdgpu_bo_unreserve(bo);
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 ecb4c3abc62..c06ada0844b 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
@@ -200,7 +200,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
queue_input.wptr_addr = (uint64_t)q->properties.write_ptr;
if (q->wptr_bo) {
- wptr_addr_off = (uint64_t)q->properties.write_ptr - (uint64_t)q->wptr_bo->kfd_bo->va;
+ 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;
}