On 2016å¹´08æ??12æ?¥ 17:42, Edward O'Callaghan wrote: > > 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? Yes, As Christian mentioned, we will switch to twice updating pt. Regards, David Zhou > >> + >> /** >> * 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 >>