diff options
author | Nayan Deshmukh <nayan26deshmukh@gmail.com> | 2018-08-21 18:59:08 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 11:11:14 -0500 |
commit | c89677afb30582f16d7378a324e3e3f1c07e69b2 (patch) | |
tree | 227d3f86ba777b7312cd988ed21aec7e728626ca /drivers/gpu/drm/scheduler | |
parent | 43fbbe89f15b297e269388dee63901715e55d712 (diff) | |
download | linux-stable-c89677afb30582f16d7378a324e3e3f1c07e69b2.tar.gz linux-stable-c89677afb30582f16d7378a324e3e3f1c07e69b2.tar.bz2 linux-stable-c89677afb30582f16d7378a324e3e3f1c07e69b2.zip |
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.c | 3 |
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; |