]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Fix crash after request->hw_context change
authorZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 21 May 2018 08:17:52 +0000 (16:17 +0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 May 2018 09:55:30 +0000 (10:55 +0100)
commitde30dbf103e4dc3713d294edb64329a8df4c2e42
tree539e81d44a6b63c60b74bc2e3c71d3ec90fa1400
parent95a245cd9838a3f47aa8e334e90efb4844d0a7e2
drm/i915/gvt: Fix crash after request->hw_context change

When we do shadowing, workload's request might not be allocated yet,
so we still require shadow context's object. And when complete workload,
delay to zero workload's request pointer after used for update guest context.

v2: Move request alloc earlier as already try to track shadow status
depending on request state, which also facilitate to use request->hw_context
for target engine context reference.

Fixes: 7f0947993e81 ("drm/i915: Store a pointer to intel_context in i915_request")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Weinan Li <weinan.z.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180521081752.31056-1-zhenyuw@linux.intel.com
drivers/gpu/drm/i915/gvt/scheduler.c