diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0695-drm-scheduler-add-a-list-of-run-queues-to-the-entity.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/0695-drm-scheduler-add-a-list-of-run-queues-to-the-entity.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0695-drm-scheduler-add-a-list-of-run-queues-to-the-entity.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0695-drm-scheduler-add-a-list-of-run-queues-to-the-entity.patch new file mode 100644 index 00000000..80a699e4 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0695-drm-scheduler-add-a-list-of-run-queues-to-the-entity.patch @@ -0,0 +1,55 @@ +From 75ef41d30bf019e1c823c35b6eec189c17adb59f Mon Sep 17 00:00:00 2001 +From: Nayan Deshmukh <nayan26deshmukh@gmail.com> +Date: Wed, 1 Aug 2018 13:49:59 +0530 +Subject: [PATCH 0695/2940] drm/scheduler: add a list of run queues to the + entity +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These are the potential run queues on which the jobs from this +entity can be scheduled. We will use this to do load balancing. + +Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/scheduler/gpu_scheduler.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c +index a3e704486f7f..d3d8ab454780 100644 +--- a/drivers/gpu/drm/scheduler/gpu_scheduler.c ++++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c +@@ -179,6 +179,8 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, + unsigned int num_rq_list, + atomic_t *guilty) + { ++ int i; ++ + if (!(entity && rq_list && num_rq_list > 0 && rq_list[0])) + return -EINVAL; + +@@ -186,6 +188,11 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, + INIT_LIST_HEAD(&entity->list); + entity->rq = rq_list[0]; + entity->guilty = guilty; ++ entity->num_rq_list = num_rq_list; ++ entity->rq_list = kcalloc(num_rq_list, sizeof(struct drm_sched_rq *), ++ GFP_KERNEL); ++ for (i = 0; i < num_rq_list; ++i) ++ entity->rq_list[i] = rq_list[i]; + entity->last_scheduled = NULL; + + spin_lock_init(&entity->rq_lock); +@@ -348,6 +355,7 @@ void drm_sched_entity_fini(struct drm_sched_entity *entity) + + dma_fence_put(entity->last_scheduled); + entity->last_scheduled = NULL; ++ kfree(entity->rq_list); + } + EXPORT_SYMBOL(drm_sched_entity_fini); + +-- +2.17.1 + |