intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
@ 2016-08-03 16:06 Chris Wilson
  2016-08-03 16:11 ` ✗ Ro.CI.BAT: failure for " Patchwork
  2016-08-03 16:27 ` [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake kbuild test robot
  0 siblings, 2 replies; 13+ messages in thread
From: Chris Wilson @ 2016-08-03 16:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

Erratum SKL075: Display Flicker May Occur When Both VT-d And FBC Are Enabled

"Display flickering may occur when both FBC (Frame Buffer Compression)
and VT - d (Intel® Virtualization Technology for Directed I/O) are enabled
and in use by the display controller."

Ville found the w/a name in the database:
WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl

v2: Log when the quirk is applied.
v3: Ensure i915.enable_fbc is false when !HAS_FBC()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---

Paulo, I was under the impression you wanted to ack this as a known
issue?
-Chris

---
 drivers/gpu/drm/i915/intel_fbc.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 06d3a86828fc..17343baf25ea 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1240,12 +1240,28 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
 	if (i915.enable_fbc >= 0)
 		return !!i915.enable_fbc;
 
+	if (!HAS_FBC(dev_priv))
+		return 0;
+
 	if (IS_BROADWELL(dev_priv))
 		return 1;
 
 	return 0;
 }
 
+static bool need_fbc_wa(struct drm_i915_private *dev_priv)
+{
+#ifdef CONFIG_INTEL_IOMMU
+	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl */
+	if (intel_iommu_gfx_mapped && IS_SKYLAKE(dev_priv)) {
+		DRM_INFO("Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
+		return true;
+	}
+#endif
+
+	return false;
+}
+
 /**
  * intel_fbc_init - Initialize FBC
  * @dev_priv: the i915 device
@@ -1263,6 +1279,9 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
 	fbc->active = false;
 	fbc->work.scheduled = false;
 
+	if (need_fbc_wa(dev_priv))
+		mkwrite_intel_info(dev_priv)->has_fbc = false;
+
 	i915.enable_fbc = intel_sanitize_fbc_option(dev_priv);
 	DRM_DEBUG_KMS("Sanitized enable_fbc value: %d\n", i915.enable_fbc);
 
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
@ 2016-06-17 16:39 Chris Wilson
  2016-06-17 19:45 ` [PATCH v2] " Chris Wilson
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Wilson @ 2016-06-17 16:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

Erratum SKL075: Display Flicker May Occur When Both VT-d And FBC Are Enabled

"Display flickering may occur when both FBC (Frame Buffer Compression)
and VT - d (Intel® Virtualization Technology for Directed I/O) are enabled
and in use by the display controller."

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index fddba1eed5ad..e47785467220 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1230,6 +1230,18 @@ void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv)
 			dev_priv->fbc.visible_pipes_mask |= (1 << crtc->pipe);
 }
 
+static bool need_vtd_wa(struct drm_i915_private *dev_priv)
+{
+#ifdef CONFIG_INTEL_IOMMU
+	if (!intel_iommu_gfx_mapped)
+		return false;
+
+	if (INTEL_GEN(dev_priv) == 9)
+		return true;
+#endif
+	return false;
+}
+
 /**
  * intel_fbc_init - Initialize FBC
  * @dev_priv: the i915 device
@@ -1247,6 +1259,12 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
 	fbc->active = false;
 	fbc->work.scheduled = false;
 
+	if (need_vtd_wa(dev_priv)) {
+		struct intel_device_info *info =
+			(struct intel_device_info *)&dev_priv->info;
+		info->has_fbc = false;
+	}
+
 	if (!HAS_FBC(dev_priv)) {
 		fbc->no_fbc_reason = "unsupported by this chipset";
 		return;
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-08-04 16:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 16:06 [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake Chris Wilson
2016-08-03 16:11 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-03 16:16   ` [PATCH v2] " Chris Wilson
2016-08-04  6:31     ` Jani Nikula
2016-08-04 16:41       ` Daniel Vetter
2016-08-04  6:57     ` Ville Syrjälä
2016-08-04  7:03       ` Chris Wilson
2016-08-04  7:14         ` Ville Syrjälä
2016-08-04  7:43           ` [PATCH v3] " Chris Wilson
2016-08-03 16:58   ` ✗ Ro.CI.BAT: warning for drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev2) Patchwork
2016-08-04  9:12   ` ✗ Ro.CI.BAT: failure for drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev3) Patchwork
2016-08-03 16:27 ` [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2016-06-17 16:39 Chris Wilson
2016-06-17 19:45 ` [PATCH v2] " Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).