summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-10-23 07:23:29 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-12-05 00:33:09 +0300
commitb3eebe3d899fdcc77297f1513983a5250f0bed80 (patch)
treeae43d6220b9ada44e7a849338d8f6aa2e9a5037c /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
parent95aa9b1d9738faa80c66df41d59358d5ff4c288a (diff)
downloadlinux-b3eebe3d899fdcc77297f1513983a5250f0bed80.tar.xz
drm/amd/scheduler:introduce guilty pointer member
this member will be used later, it will points to the real var inside of context and CS_SUBMIT & gpu schdduler can decide if skip a job depends on context->guilty or *entity->guilty Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 5a1ece2774b5..764606ce3541 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -121,7 +121,7 @@ amd_sched_rq_select_entity(struct amd_sched_rq *rq)
int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
struct amd_sched_entity *entity,
struct amd_sched_rq *rq,
- uint32_t jobs)
+ uint32_t jobs, atomic_t *guilty)
{
int r;
@@ -132,6 +132,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
INIT_LIST_HEAD(&entity->list);
entity->rq = rq;
entity->sched = sched;
+ entity->guilty = guilty;
spin_lock_init(&entity->rq_lock);
spin_lock_init(&entity->queue_lock);