drm/scheduler: add new function to get least loaded sched v2
authorNayan Deshmukh <nayan26deshmukh@gmail.com>
Wed, 1 Aug 2018 08:20:01 +0000 (13:50 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:09:45 +0000 (11:09 -0500)
commit97ffa35b5dec4e68baa85e626b69ae4949a4ca2a
treea1224772b9f14934e31240212528ef1ab238604e
parent249a07c05a8da9637c2eb3205f1fc739c216f707
drm/scheduler: add new function to get least loaded sched v2

The function selects the run queue from the rq_list with the
least load. The load is decided by the number of jobs in a
scheduler.

v2: avoid using atomic read twice consecutively, instead store
    it locally

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