diff options
| author | Jammy Zhou <[email protected]> | 2015-07-30 16:36:58 +0800 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-08-17 16:50:41 -0400 |
| commit | 1333f723fb6f1356a54135586f1ede44dcaa9652 (patch) | |
| tree | a91edb7bb65004749a8cf8390dd7ef665e034f1f /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | |
| parent | c0044bc2c62dc3267f2a555ed8342181516008a5 (diff) | |
drm/amdgpu: add amdgpu.sched_jobs option
This option can be used to specify the max job number in the job queue,
and it is 16 by default.
Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.c')
| -rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 |
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: * @parent The parent entity of this amd_context_entity * @rq The run queue this entity belongs * @context_id The context id for this entity + * @jobs The max number of jobs in the job queue * * return 0 if succeed. negative error code on failure */ @@ -180,7 +181,8 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched, struct amd_context_entity *entity, struct amd_sched_entity *parent, struct amd_run_queue *rq, - uint32_t context_id) + uint32_t context_id, + uint32_t jobs) { uint64_t seq_ring = 0; @@ -196,7 +198,7 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched, init_waitqueue_head(&entity->wait_queue); init_waitqueue_head(&entity->wait_emit); if(kfifo_alloc(&entity->job_queue, - AMD_MAX_JOB_ENTRY_PER_CONTEXT * sizeof(void *), + jobs * sizeof(void *), GFP_KERNEL)) return -EINVAL; |