[PATCH] Revert "drm/amd/scheduler:fix duplicate operation in entity fini"

Deucher, Alexander Alexander.Deucher at amd.com
Thu Nov 2 03:57:08 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Wednesday, November 01, 2017 11:33 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH] Revert "drm/amd/scheduler:fix duplicate operation in
> entity fini"
> 
> fix memory leak.
> This reverts commit d6951b49faa8447a6a77cdb1ef3346b1a1786d31.
> because when entity_fini is interrupted the jobs in queue still
> not processed with job_begin, so the finish_cb is not hooked
> on sched fence, we still need manually do cleanups.
> 
> Change-Id: I6e17bfeeac85062bc52f1d51b9697852b084845c

Missing your signed-off-by.

Alex

> ---
>  drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> index 6f041e8..7aa6455 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> @@ -231,10 +231,11 @@ void amd_sched_entity_fini(struct
> amd_gpu_scheduler *sched,
>  		kthread_unpark(sched->thread);
>  		while ((job = to_amd_sched_job(spsc_queue_pop(&entity-
> >job_queue)))) {
>  			struct amd_sched_fence *s_fence = job->s_fence;
> -
>  			amd_sched_fence_scheduled(s_fence);
>  			dma_fence_set_error(&s_fence->finished, -ESRCH);
>  			amd_sched_fence_finished(s_fence);
> +			dma_fence_put(&s_fence->finished);
> +			sched->ops->free_job(job);
>  		}
>  	}
>  }
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list