]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Fix workload request allocation before request add
authorZhenyu Wang <zhenyuw@linux.intel.com>
Sat, 29 Dec 2018 03:13:10 +0000 (11:13 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 9 Jan 2019 04:59:09 +0000 (12:59 +0800)
commit566ae12e37453bcbb35aa42ed5da9a58ee32e1a7
treee10afabea19ecd5a56101cb7dbfc9395236a9754
parentd6952d4b95d3a6897fcea7446c97f59f8d24556b
drm/i915/gvt: Fix workload request allocation before request add

In commit de30dbf103e4 ("drm/i915/gvt: Fix crash after request->hw_context change"),
forgot to handle workload scan path in ELSP handler case which was to
optimize scanning earlier instead of in gvt submission thread, so request
alloc and add was splitting then which is against right process.

This trys to do a partial revert of that commit which still has workload
request alloc helper and make sure shadow state population is handled after
request alloc for target state buffer.

v3: Fix missed workload status setting in request alloc error path
v2: Fix dispatch workload err path that should add request after alloc anyway.

Fixes: de30dbf103e4 ("drm/i915/gvt: Fix crash after request->hw_context change")
Cc: Bin Yang <bin.yang@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Bin Yang <bin.yang@intel.com>
Reviewed-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c
drivers/gpu/drm/i915/gvt/scheduler.h