[PATCH 1/1] drm/amdgpu: Fix KFD-related kernel oops on Hawaii

Christian König ckoenig.leichtzumerken at gmail.com
Mon Sep 9 11:27:58 UTC 2019


Am 06.09.19 um 01:29 schrieb Kuehling, Felix:
> 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 at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index 6882eeb93b4e..d81e141a33fa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -141,7 +141,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>   	/* ring tests don't use a job */
>   	if (job) {
>   		vm = job->vm;
> -		fence_ctx = job->base.s_fence->scheduled.context;
> +		fence_ctx = job->base.s_fence ?
> +			job->base.s_fence->scheduled.context : 0;
>   	} else {
>   		vm = NULL;
>   		fence_ctx = 0;



More information about the amd-gfx mailing list