[PATCH 1/3] drm/amd: fix init order of sched job

Zhang, Jerry (Junwei) Jerry.Zhang at amd.com
Tue May 9 08:33:36 UTC 2017


On 05/09/2017 04:14 PM, Chunming Zhou wrote:
> Change-Id: Iced391f5c24a79ad7aecae33e22ff089f68f1337
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>

Good catch!
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>

> ---
>   drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> index 80bc4f7..3c258c3 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> @@ -460,9 +460,9 @@ int amd_sched_job_init(struct amd_sched_job *job,
>   	job->sched = sched;
>   	job->s_entity = entity;
>   	job->s_fence = amd_sched_fence_create(entity, owner);
> -	job->id = atomic64_inc_return(&sched->job_id_count);
>   	if (!job->s_fence)
>   		return -ENOMEM;
> +	job->id = atomic64_inc_return(&sched->job_id_count);
>
>   	INIT_WORK(&job->finish_work, amd_sched_job_finish);
>   	INIT_LIST_HEAD(&job->node);
>


More information about the amd-gfx mailing list