From: Nayan Deshmukh Date: Tue, 21 Aug 2018 13:29:08 +0000 (+0530) Subject: drm/scheduler: avoid redundant shifting of the entity v2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c89677afb30582f16d7378a324e3e3f1c07e69b2;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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;