]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitf0e9943725186ddbdc9718a559c26c5f507262f2
treee10afabea19ecd5a56101cb7dbfc9395236a9754
parentbfeffd155283772bbe78c6a05dec7c0128ee500c
drm/i915/gvt: Fix workload request allocation before request add

In commit 6bb2a2af8b1b ("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: 6bb2a2af8b1b ("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