aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 5799474808e9..87993e06ba37 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -173,6 +173,7 @@ exit:
173 * @parent The parent entity of this amd_context_entity 173 * @parent The parent entity of this amd_context_entity
174 * @rq The run queue this entity belongs 174 * @rq The run queue this entity belongs
175 * @context_id The context id for this entity 175 * @context_id The context id for this entity
176 * @jobs The max number of jobs in the job queue
176 * 177 *
177 * return 0 if succeed. negative error code on failure 178 * return 0 if succeed. negative error code on failure
178*/ 179*/
@@ -180,7 +181,8 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched,
180 struct amd_context_entity *entity, 181 struct amd_context_entity *entity,
181 struct amd_sched_entity *parent, 182 struct amd_sched_entity *parent,
182 struct amd_run_queue *rq, 183 struct amd_run_queue *rq,
183 uint32_t context_id) 184 uint32_t context_id,
185 uint32_t jobs)
184{ 186{
185 uint64_t seq_ring = 0; 187 uint64_t seq_ring = 0;
186 188
@@ -196,7 +198,7 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched,
196 init_waitqueue_head(&entity->wait_queue); 198 init_waitqueue_head(&entity->wait_queue);
197 init_waitqueue_head(&entity->wait_emit); 199 init_waitqueue_head(&entity->wait_emit);
198 if(kfifo_alloc(&entity->job_queue, 200 if(kfifo_alloc(&entity->job_queue,
199 AMD_MAX_JOB_ENTRY_PER_CONTEXT * sizeof(void *), 201 jobs * sizeof(void *),
200 GFP_KERNEL)) 202 GFP_KERNEL))
201 return -EINVAL; 203 return -EINVAL;
202 204