aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_vgpu.c
diff options
context:
space:
mode:
authorXiaolin Zhang <xiaolin.zhang@intel.com>2019-08-23 14:57:31 +0800
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-24 12:12:34 +0100
commit52988009843160c5b366b4082ed6df48041c655c (patch)
tree4d50787dc149dae8b67a90835e7ce1d6cb391a11 /drivers/gpu/drm/i915/i915_vgpu.c
parentdrm/i915/selftests: Teach igt_gpu_fill_dw() to take intel_context (diff)
downloadlinux-dev-52988009843160c5b366b4082ed6df48041c655c.tar.xz
linux-dev-52988009843160c5b366b4082ed6df48041c655c.zip
drm/i915: to make vgpu ppgtt notificaiton as atomic operation
vgpu ppgtt notification was split into 2 steps, the first step is to update PVINFO's pdp register and then write PVINFO's g2v_notify register with action code to tirgger ppgtt notification to GVT side. currently these steps were not atomic operations due to no any protection, so it is easy to enter race condition state during the MTBF, stress and IGT test to cause GPU hang. the solution is to add a lock to make vgpu ppgtt notication as atomic operation. Cc: stable@vger.kernel.org Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com> Acked-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/1566543451-13955-1-git-send-email-xiaolin.zhang@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vgpu.c')
-rw-r--r--drivers/gpu/drm/i915/i915_vgpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index 39bebf16edbe..968be26735c5 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -94,6 +94,7 @@ void i915_detect_vgpu(struct drm_i915_private *dev_priv)
dev_priv->vgpu.caps = readl(shared_area + vgtif_offset(vgt_caps));
dev_priv->vgpu.active = true;
+ mutex_init(&dev_priv->vgpu.lock);
DRM_INFO("Virtual GPU for Intel GVT-g detected.\n");
out: