[PATCH 16/19] drm/amd: block entity

Chunming Zhou David1.Zhou at amd.com
Fri Aug 5 09:38:43 UTC 2016


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;
+}
+
 /**
  * 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
-- 
1.9.1



More information about the amd-gfx mailing list