[PATCH 15/18] drm/amd: block entity

Edward O'Callaghan funfunctor at folklore1984.net
Fri Aug 12 09:42:29 UTC 2016



On 08/12/2016 04:39 PM, Chunming Zhou wrote:
> Change-Id: Iba210e0d007a249a90f955f5ac9c3803cc40def2
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
> ---
>  drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 7 ++++++-
>  drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 +
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> index f750d4a..78d34d5 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
> @@ -109,6 +109,11 @@ amd_sched_rq_select_entity(struct amd_sched_rq *rq)
>  	return NULL;
>  }
>  
> +void amd_sched_block_entity(struct amd_sched_entity *entity, bool block)
> +{
> +	entity->block = block;
> +}
Why is this function necessary, did I miss something?

> +
>  /**
>   * block all entity of this run queue
>   *
> @@ -122,7 +127,7 @@ int amd_sched_rq_block_entity(struct amd_sched_rq *rq, bool block)
>  	spin_lock(&rq->lock);
>  
>  	list_for_each_entry(entity, &rq->entities, list)
> -		entity->block = block;
> +		amd_sched_block_entity(entity, block);
>  
>  	spin_unlock(&rq->lock);
>  
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> index 8ea0374..da01051 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> @@ -159,4 +159,5 @@ int amd_sched_job_init(struct amd_sched_job *job,
>  void amd_sched_hw_job_reset(struct amd_gpu_scheduler *sched);
>  void amd_sched_job_recovery(struct amd_gpu_scheduler *sched);
>  int amd_sched_rq_block_entity(struct amd_sched_rq *rq, bool block);
> +void amd_sched_block_entity(struct amd_sched_entity *entity, bool block);
>  #endif
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20160812/f3c7340a/attachment.sig>


More information about the amd-gfx mailing list