drm/i915/gvt: factor out the scheduler
authorPing Gao <ping.a.gao@intel.com>
Wed, 29 Mar 2017 16:36:36 +0000 (00:36 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 30 Mar 2017 05:32:31 +0000 (13:32 +0800)
commit32356920dae17ef3b04fe02a113418c983fc66ce
tree04413833dcc04629f7fed29d3e1b421d7544e2e9
parentf6504cce54b26e4318697a854a50cf1a1cb3c066
drm/i915/gvt: factor out the scheduler

Factor out the scheduler to a more clear structure, the basic
logic is to find out next vGPU first and then schedule it.
vGPUs were ordered in a LRU list, scheduler scan from the LRU
list head and choose the first vGPU who has pending workload.

Signed-off-by: Ping Gao <ping.a.gao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/sched_policy.c