36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Min He <min.he@intel.com>
|
|
Date: Wed, 12 Jun 2019 06:38:26 +0000
|
|
Subject: [PATCH] drm/i915/gvt: check scaler ownership when detach scaler
|
|
|
|
This patch added check for the scaler ownership when detaching a
|
|
scaler, which will prevent SOS from disabling scalers owned by other
|
|
UOS.
|
|
|
|
Signed-off-by: Min He <min.he@intel.com>
|
|
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
---
|
|
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
|
index 5afd152..0e8b58e 100644
|
|
--- a/drivers/gpu/drm/i915/intel_display.c
|
|
+++ b/drivers/gpu/drm/i915/intel_display.c
|
|
@@ -3454,6 +3454,12 @@ static void skl_detach_scaler(struct intel_crtc *intel_crtc, int id)
|
|
struct drm_device *dev = intel_crtc->base.dev;
|
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
|
|
|
+#if IS_ENABLED(CONFIG_DRM_I915_GVT)
|
|
+ if (intel_gvt_active(dev_priv) &&
|
|
+ dev_priv->gvt->pipe_info[intel_crtc->pipe].scaler_owner[id] != 0)
|
|
+ return;
|
|
+#endif
|
|
+
|
|
I915_WRITE(SKL_PS_CTRL(intel_crtc->pipe, id), 0);
|
|
I915_WRITE(SKL_PS_WIN_POS(intel_crtc->pipe, id), 0);
|
|
I915_WRITE(SKL_PS_WIN_SZ(intel_crtc->pipe, id), 0);
|
|
--
|
|
https://clearlinux.org
|
|
|