drm/scheduler: modify args of drm_sched_entity_init
replace run queue by a list of run queues and remove the sched arg as that is part of run queue itself Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
8dc9fbbf27
commit
aa16b6c6b4
@@ -162,26 +162,30 @@ drm_sched_rq_select_entity(struct drm_sched_rq *rq)
|
||||
* drm_sched_entity_init - Init a context entity used by scheduler when
|
||||
* submit to HW ring.
|
||||
*
|
||||
* @sched: scheduler instance
|
||||
* @entity: scheduler entity to init
|
||||
* @rq: the run queue this entity belongs
|
||||
* @rq_list: the list of run queue on which jobs from this
|
||||
* entity can be submitted
|
||||
* @num_rq_list: number of run queue in rq_list
|
||||
* @guilty: atomic_t set to 1 when a job on this queue
|
||||
* is found to be guilty causing a timeout
|
||||
*
|
||||
* Note: the rq_list should have atleast one element to schedule
|
||||
* the entity
|
||||
*
|
||||
* Returns 0 on success or a negative error code on failure.
|
||||
*/
|
||||
int drm_sched_entity_init(struct drm_gpu_scheduler *sched,
|
||||
struct drm_sched_entity *entity,
|
||||
struct drm_sched_rq *rq,
|
||||
int drm_sched_entity_init(struct drm_sched_entity *entity,
|
||||
struct drm_sched_rq **rq_list,
|
||||
unsigned int num_rq_list,
|
||||
atomic_t *guilty)
|
||||
{
|
||||
if (!(sched && entity && rq))
|
||||
if (!(entity && rq_list && num_rq_list > 0 && rq_list[0]))
|
||||
return -EINVAL;
|
||||
|
||||
memset(entity, 0, sizeof(struct drm_sched_entity));
|
||||
INIT_LIST_HEAD(&entity->list);
|
||||
entity->rq = rq;
|
||||
entity->sched = sched;
|
||||
entity->rq = rq_list[0];
|
||||
entity->sched = rq_list[0]->sched;
|
||||
entity->guilty = guilty;
|
||||
entity->last_scheduled = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user