summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/scheduler
diff options
context:
space:
mode:
authorNayan Deshmukh <nayan26deshmukh@gmail.com>2018-08-21 16:29:08 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 19:11:14 +0300
commitc89677afb30582f16d7378a324e3e3f1c07e69b2 (patch)
tree227d3f86ba777b7312cd988ed21aec7e728626ca /drivers/gpu/drm/scheduler
parent43fbbe89f15b297e269388dee63901715e55d712 (diff)
downloadlinux-c89677afb30582f16d7378a324e3e3f1c07e69b2.tar.xz
drm/scheduler: avoid redundant shifting of the entity v2
do not remove entity from the rq if the current rq is from the least loaded scheduler. 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>
Diffstat (limited to 'drivers/gpu/drm/scheduler')
-rw-r--r--drivers/gpu/drm/scheduler/sched_entity.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c
index 812e3530ea25..4e5e95c0cab5 100644
--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -476,6 +476,9 @@ void drm_sched_entity_select_rq(struct drm_sched_entity *entity)
return;
rq = drm_sched_entity_get_free_sched(entity);
+ if (rq == entity->rq)
+ return;
+
spin_lock(&entity->rq_lock);
drm_sched_rq_remove_entity(entity->rq, entity);
entity->rq = rq;