drm/i915/gvt: update vgpu workload head pointer correctly
authorXiaolin Zhang <xiaolin.zhang@intel.com>
Tue, 27 Aug 2019 08:39:23 +0000 (16:39 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 6 Sep 2019 05:38:51 +0000 (13:38 +0800)
commit0a3242bdb47713e09cb004a0ba4947d3edf82d8a
tree189e100bf581f39ef8f3a9baa67a975508f3e8a7
parentc36beba6b296b3c05a0f29753b04775e5ae23886
drm/i915/gvt: update vgpu workload head pointer correctly

when creating a vGPU workload, the guest context head pointer should
be updated correctly by comparing with the exsiting workload in the
guest worklod queue including the current running context.

in some situation, there is a running context A and then received 2 new
vGPU workload context B and A. in the new workload context A, it's head
pointer should be updated with the running context A's tail.

v2: walk through guest workload list in backward way.

Cc: stable@vger.kernel.org
Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c