Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Fix KFD-related kernel oops on Hawaii

Hawaii needs to flush caches explicitly, submitting an IB in a user
VMID from kernel mode. There is no s_fence in this case.

Fixes: eb3961a57424 ("drm/amdgpu: remove fence context from the job")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Felix Kuehling and committed by
Alex Deucher
dcafbd50 4f3a2c10

+2 -1
+2 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
··· 143 143 /* ring tests don't use a job */ 144 144 if (job) { 145 145 vm = job->vm; 146 - fence_ctx = job->base.s_fence->scheduled.context; 146 + fence_ctx = job->base.s_fence ? 147 + job->base.s_fence->scheduled.context : 0; 147 148 } else { 148 149 vm = NULL; 149 150 fence_ctx = 0;