diff options
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler')
| -rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 4 |
2 files changed, 6 insertions, 4 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 | ||
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h index a6226e1e924a..52577a88b054 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include <linux/kfifo.h> | 27 | #include <linux/kfifo.h> |
| 28 | 28 | ||
| 29 | #define AMD_MAX_ACTIVE_HW_SUBMISSION 2 | 29 | #define AMD_MAX_ACTIVE_HW_SUBMISSION 2 |
| 30 | #define AMD_MAX_JOB_ENTRY_PER_CONTEXT 16 | ||
| 31 | 30 | ||
| 32 | #define AMD_KERNEL_CONTEXT_ID 0 | 31 | #define AMD_KERNEL_CONTEXT_ID 0 |
| 33 | #define AMD_KERNEL_PROCESS_ID 0 | 32 | #define AMD_KERNEL_PROCESS_ID 0 |
| @@ -155,6 +154,7 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched, | |||
| 155 | struct amd_context_entity *entity, | 154 | struct amd_context_entity *entity, |
| 156 | struct amd_sched_entity *parent, | 155 | struct amd_sched_entity *parent, |
| 157 | struct amd_run_queue *rq, | 156 | struct amd_run_queue *rq, |
| 158 | uint32_t context_id); | 157 | uint32_t context_id, |
| 158 | uint32_t jobs); | ||
| 159 | 159 | ||
| 160 | #endif | 160 | #endif |
