diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-10-23 00:23:29 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:09 -0500 |
commit | b3eebe3d899fdcc77297f1513983a5250f0bed80 (patch) | |
tree | ae43d6220b9ada44e7a849338d8f6aa2e9a5037c /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | |
parent | 95aa9b1d9738faa80c66df41d59358d5ff4c288a (diff) |
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.c | 3 |
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) | |||
121 | int amd_sched_entity_init(struct amd_gpu_scheduler *sched, | 121 | int amd_sched_entity_init(struct amd_gpu_scheduler *sched, |
122 | struct amd_sched_entity *entity, | 122 | struct amd_sched_entity *entity, |
123 | struct amd_sched_rq *rq, | 123 | struct amd_sched_rq *rq, |
124 | uint32_t jobs) | 124 | uint32_t jobs, atomic_t *guilty) |
125 | { | 125 | { |
126 | int r; | 126 | int r; |
127 | 127 | ||
@@ -132,6 +132,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched, | |||
132 | INIT_LIST_HEAD(&entity->list); | 132 | INIT_LIST_HEAD(&entity->list); |
133 | entity->rq = rq; | 133 | entity->rq = rq; |
134 | entity->sched = sched; | 134 | entity->sched = sched; |
135 | entity->guilty = guilty; | ||
135 | 136 | ||
136 | spin_lock_init(&entity->rq_lock); | 137 | spin_lock_init(&entity->rq_lock); |
137 | spin_lock_init(&entity->queue_lock); | 138 | spin_lock_init(&entity->queue_lock); |