Skip to content

Commit a6941f8

Browse files
erichuang22alexdeucher
authored andcommitted
drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU
The point bo->kfd_bo is NULL for queue's write pointer BO when creating queue on mGPU. To avoid using the pointer fixes the error. Signed-off-by: Eric Huang <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 972fb53 commit a6941f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_b
20992099
}
21002100

21012101
amdgpu_amdkfd_remove_eviction_fence(
2102-
bo, bo->kfd_bo->process_info->eviction_fence);
2102+
bo, bo->vm_bo->vm->process_info->eviction_fence);
21032103

21042104
amdgpu_bo_unreserve(bo);
21052105

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
200200
queue_input.wptr_addr = (uint64_t)q->properties.write_ptr;
201201

202202
if (q->wptr_bo) {
203-
wptr_addr_off = (uint64_t)q->properties.write_ptr - (uint64_t)q->wptr_bo->kfd_bo->va;
203+
wptr_addr_off = (uint64_t)q->properties.write_ptr & (PAGE_SIZE - 1);
204204
queue_input.wptr_mc_addr = ((uint64_t)q->wptr_bo->tbo.resource->start << PAGE_SHIFT) + wptr_addr_off;
205205
}
206206

0 commit comments

Comments
 (0)