* [PATCH v2] 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 ` Chris Wilson
0 siblings, 0 replies; 13+ messages in thread
From: Chris Wilson @ 2016-06-17 19:45 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.
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>
---
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/intel_fbc.c | 15 +++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index afe1ff67557c..02b888684de8 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2577,6 +2577,8 @@ struct drm_i915_cmd_table {
#define INTEL_GEN(p) (INTEL_INFO(p)->gen)
#define INTEL_DEVID(p) (INTEL_INFO(p)->device_id)
+#define mkwrite_intel_info(p) ((struct intel_device_info *)INTEL_INFO(p))
+
#define REVID_FOREVER 0xff
#define INTEL_REVID(p) (__I915__(p)->drm.pdev->revision)
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index fddba1eed5ad..b3c67021771b 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_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
@@ -1247,6 +1259,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;
+
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
* [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
* ✗ Ro.CI.BAT: failure for drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
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 ` Patchwork
2016-08-03 16:16 ` [PATCH v2] " Chris Wilson
` (2 more replies)
2016-08-03 16:27 ` [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake kbuild test robot
1 sibling, 3 replies; 13+ messages in thread
From: Patchwork @ 2016-08-03 16:11 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
URL : https://patchwork.freedesktop.org/series/10606/
State : failure
== Summary ==
CC drivers/pci/pci-acpi.o
CC drivers/pci/pcie/aer/aerdrv_core.o
CC [M] drivers/net/ethernet/intel/igb/e1000_nvm.o
CC [M] drivers/net/ethernet/intel/igbvf/netdev.o
CC drivers/pci/pcie/aer/aerdrv.o
CC drivers/pci/pcie/aer/aerdrv_acpi.o
CC drivers/pci/pcie/aer/ecrc.o
CC [M] drivers/net/ethernet/intel/igb/e1000_phy.o
CC drivers/pci/pci-label.o
CC [M] drivers/net/ethernet/intel/igb/e1000_mbx.o
CC [M] drivers/net/ethernet/intel/e1000e/param.o
CC [M] drivers/net/ethernet/intel/igb/e1000_i210.o
LD [M] drivers/net/ethernet/intel/e1000/e1000.o
CC [M] drivers/net/ethernet/intel/igb/igb_ptp.o
CC [M] drivers/net/ethernet/intel/igb/igb_hwmon.o
CC [M] drivers/net/ethernet/intel/e1000e/ethtool.o
CC [M] drivers/net/ethernet/intel/e1000e/netdev.o
CC [M] drivers/net/ethernet/intel/e1000e/ptp.o
LD drivers/pci/pcie/pcieportdrv.o
LD drivers/pci/pcie/aer/aerdriver.o
LD drivers/pci/pcie/aer/built-in.o
LD drivers/pci/pcie/built-in.o
LD drivers/pci/built-in.o
LD [M] drivers/net/ethernet/intel/igbvf/igbvf.o
LD [M] drivers/net/ethernet/intel/igb/igb.o
LD [M] drivers/net/ethernet/intel/e1000e/e1000e.o
LD drivers/net/ethernet/built-in.o
LD drivers/net/built-in.o
Makefile:976: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-03 16:11 ` ✗ Ro.CI.BAT: failure for " Patchwork
@ 2016-08-03 16:16 ` Chris Wilson
2016-08-04 6:31 ` Jani Nikula
2016-08-04 6:57 ` Ville Syrjälä
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
2 siblings, 2 replies; 13+ messages in thread
From: Chris Wilson @ 2016-08-03 16:16 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()
v4: Fix function name after rebase
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>
---
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 8147eb9e8475..b673c7c54a46 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1229,12 +1229,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
@@ -1252,6 +1268,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_device_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
* Re: [PATCH] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
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:27 ` kbuild test robot
1 sibling, 0 replies; 13+ messages in thread
From: kbuild test robot @ 2016-08-03 16:27 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, kbuild-all, Paulo Zanoni
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
Hi Chris,
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20160803]
[cannot apply to v4.7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-fbc-FBC-causes-display-flicker-when-VT-d-is-enabled-on-Skylake/20160804-001041
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x015-201631 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/intel_fbc.c: In function 'intel_fbc_init':
>> drivers/gpu/drm/i915/intel_fbc.c:1273:3: error: implicit declaration of function 'mkwrite_intel_info' [-Werror=implicit-function-declaration]
mkwrite_intel_info(dev_priv)->has_fbc = false;
^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/intel_fbc.c:1273:31: error: invalid type argument of '->' (have 'int')
mkwrite_intel_info(dev_priv)->has_fbc = false;
^~
cc1: some warnings being treated as errors
vim +/mkwrite_intel_info +1273 drivers/gpu/drm/i915/intel_fbc.c
1267 mutex_init(&fbc->lock);
1268 fbc->enabled = false;
1269 fbc->active = false;
1270 fbc->work.scheduled = false;
1271
1272 if (need_fbc_wa(dev_priv))
> 1273 mkwrite_intel_info(dev_priv)->has_fbc = false;
1274
1275 i915.enable_fbc = intel_sanitize_fbc_option(dev_priv);
1276 DRM_DEBUG_KMS("Sanitized enable_fbc value: %d\n", i915.enable_fbc);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 27321 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ Ro.CI.BAT: warning for drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev2)
2016-08-03 16:11 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-03 16:16 ` [PATCH v2] " Chris Wilson
@ 2016-08-03 16:58 ` 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
2 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2016-08-03 16:58 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev2)
URL : https://patchwork.freedesktop.org/series/10606/
State : warning
== Summary ==
Series 10606v2 drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
http://patchwork.freedesktop.org/api/1.0/series/10606/revisions/2/mbox
Test drv_module_reload_basic:
pass -> SKIP (ro-hsw-i3-4010u)
pass -> SKIP (fi-skl-i5-6260u)
Test gem_exec_gttfill:
Subgroup basic:
skip -> PASS (fi-snb-i7-2600)
Test kms_cursor_legacy:
Subgroup basic-flip-vs-cursor-legacy:
fail -> PASS (ro-hsw-i7-4770r)
Subgroup basic-flip-vs-cursor-varying-size:
fail -> PASS (ro-skl3-i5-6260u)
fi-hsw-i7-4770k total:240 pass:218 dwarn:0 dfail:0 fail:0 skip:22
fi-kbl-qkkr total:240 pass:182 dwarn:28 dfail:0 fail:3 skip:27
fi-skl-i5-6260u total:240 pass:223 dwarn:0 dfail:0 fail:2 skip:15
fi-skl-i7-6700k total:240 pass:209 dwarn:0 dfail:0 fail:3 skip:28
fi-snb-i7-2600 total:240 pass:198 dwarn:0 dfail:0 fail:0 skip:42
ro-bdw-i5-5250u total:240 pass:220 dwarn:4 dfail:0 fail:0 skip:16
ro-bdw-i7-5557U total:240 pass:224 dwarn:0 dfail:0 fail:0 skip:16
ro-bdw-i7-5600u total:240 pass:206 dwarn:0 dfail:0 fail:2 skip:32
ro-bsw-n3050 total:240 pass:195 dwarn:0 dfail:0 fail:3 skip:42
ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40
ro-hsw-i3-4010u total:240 pass:213 dwarn:0 dfail:0 fail:0 skip:27
ro-hsw-i7-4770r total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26
ro-ilk-i7-620lm total:240 pass:173 dwarn:1 dfail:0 fail:1 skip:65
ro-ilk1-i5-650 total:235 pass:173 dwarn:0 dfail:0 fail:2 skip:60
ro-ivb2-i7-3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31
ro-skl3-i5-6260u total:240 pass:223 dwarn:0 dfail:0 fail:3 skip:14
ro-ivb-i7-3770 failed to connect after reboot
ro-snb-i7-2620M failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1686/
4d6f224 drm-intel-nightly: 2016y-08m-03d-15h-38m-31s UTC integration manifest
cb4539a drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
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ä
1 sibling, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2016-08-04 6:31 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Paulo Zanoni
On Wed, 03 Aug 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 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()
> v4: Fix function name after rebase
>
> 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>
Cc: stable@vger.kernel.org
?
> ---
> 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 8147eb9e8475..b673c7c54a46 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -1229,12 +1229,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
> @@ -1252,6 +1268,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_device_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);
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-03 16:16 ` [PATCH v2] " Chris Wilson
2016-08-04 6:31 ` Jani Nikula
@ 2016-08-04 6:57 ` Ville Syrjälä
2016-08-04 7:03 ` Chris Wilson
1 sibling, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2016-08-04 6:57 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Paulo Zanoni
On Wed, Aug 03, 2016 at 05:16:42PM +0100, Chris Wilson wrote:
> 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()
> v4: Fix function name after rebase
>
> 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>
> ---
> 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 8147eb9e8475..b673c7c54a46 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -1229,12 +1229,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)
need_fbc_vtd_wa() perhaps?
> +{
> +#ifdef CONFIG_INTEL_IOMMU
> + /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl */
> + if (intel_iommu_gfx_mapped && IS_SKYLAKE(dev_priv)) {
BXT needs this as well AFAICS.
with that added
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> + 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
> @@ -1252,6 +1268,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_device_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
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-04 6:57 ` Ville Syrjälä
@ 2016-08-04 7:03 ` Chris Wilson
2016-08-04 7:14 ` Ville Syrjälä
0 siblings, 1 reply; 13+ messages in thread
From: Chris Wilson @ 2016-08-04 7:03 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx, Paulo Zanoni
On Thu, Aug 04, 2016 at 09:57:11AM +0300, Ville Syrjälä wrote:
> On Wed, Aug 03, 2016 at 05:16:42PM +0100, Chris Wilson wrote:
> > 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()
> > v4: Fix function name after rebase
> >
> > 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>
> > ---
> > 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 8147eb9e8475..b673c7c54a46 100644
> > --- a/drivers/gpu/drm/i915/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/intel_fbc.c
> > @@ -1229,12 +1229,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)
>
> need_fbc_vtd_wa() perhaps?
Right now, yes. I left it open just in case - but that's most likely a
false hope.
> > +{
> > +#ifdef CONFIG_INTEL_IOMMU
> > + /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl */
> > + if (intel_iommu_gfx_mapped && IS_SKYLAKE(dev_priv)) {
>
> BXT needs this as well AFAICS.
Will IS_GEN9() suit? +skl,bxt in the description.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-04 7:03 ` Chris Wilson
@ 2016-08-04 7:14 ` Ville Syrjälä
2016-08-04 7:43 ` [PATCH v3] " Chris Wilson
0 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2016-08-04 7:14 UTC (permalink / raw)
To: Chris Wilson, intel-gfx, Paulo Zanoni
On Thu, Aug 04, 2016 at 08:03:09AM +0100, Chris Wilson wrote:
> On Thu, Aug 04, 2016 at 09:57:11AM +0300, Ville Syrjälä wrote:
> > On Wed, Aug 03, 2016 at 05:16:42PM +0100, Chris Wilson wrote:
> > > 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()
> > > v4: Fix function name after rebase
> > >
> > > 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>
> > > ---
> > > 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 8147eb9e8475..b673c7c54a46 100644
> > > --- a/drivers/gpu/drm/i915/intel_fbc.c
> > > +++ b/drivers/gpu/drm/i915/intel_fbc.c
> > > @@ -1229,12 +1229,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)
> >
> > need_fbc_vtd_wa() perhaps?
>
> Right now, yes. I left it open just in case - but that's most likely a
> false hope.
>
> > > +{
> > > +#ifdef CONFIG_INTEL_IOMMU
> > > + /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl */
> > > + if (intel_iommu_gfx_mapped && IS_SKYLAKE(dev_priv)) {
> >
> > BXT needs this as well AFAICS.
>
> Will IS_GEN9() suit? +skl,bxt in the description.
Looks like KBL doesn't need this w/a.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-04 7:14 ` Ville Syrjälä
@ 2016-08-04 7:43 ` Chris Wilson
0 siblings, 0 replies; 13+ messages in thread
From: Chris Wilson @ 2016-08-04 7:43 UTC (permalink / raw)
To: intel-gfx; +Cc: Chris Wilson, Paulo Zanoni, Ville Syrjälä, stable
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,bxt and also dug out that it
affects Broxton.
v2: Log when the quirk is applied.
v3: Ensure i915.enable_fbc is false when !HAS_FBC()
v4: Fix function name after rebase
v5: Add Broxton to the workaround
Note for backporting to stable, we need to add
((struct intel_device_info *)INTEL_INFO(ptr))
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>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/i915/intel_fbc.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 8147eb9e8475..d4be07615aa9 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1229,12 +1229,29 @@ 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_vtd_wa(struct drm_i915_private *dev_priv)
+{
+#ifdef CONFIG_INTEL_IOMMU
+ /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
+ if (intel_iommu_gfx_mapped &&
+ (IS_SKYLAKE(dev_priv) || IS_BROXTON(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
@@ -1252,6 +1269,9 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
fbc->active = false;
fbc->work.scheduled = false;
+ if (need_fbc_vtd_wa(dev_priv))
+ mkwrite_device_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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* ✗ Ro.CI.BAT: failure for drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev3)
2016-08-03 16:11 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-03 16:16 ` [PATCH v2] " 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 ` Patchwork
2 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2016-08-04 9:12 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake (rev3)
URL : https://patchwork.freedesktop.org/series/10606/
State : failure
== Summary ==
Series 10606v3 drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
http://patchwork.freedesktop.org/api/1.0/series/10606/revisions/3/mbox
Test kms_cursor_legacy:
Subgroup basic-flip-vs-cursor-legacy:
fail -> PASS (ro-bdw-i7-5600u)
fail -> PASS (ro-bdw-i5-5250u)
pass -> FAIL (ro-skl3-i5-6260u)
fi-hsw-i7-4770k total:240 pass:218 dwarn:0 dfail:0 fail:0 skip:22
fi-kbl-qkkr total:240 pass:182 dwarn:29 dfail:0 fail:3 skip:26
fi-skl-i5-6260u total:240 pass:224 dwarn:0 dfail:0 fail:2 skip:14
fi-skl-i7-6700k total:240 pass:208 dwarn:0 dfail:0 fail:4 skip:28
fi-snb-i7-2600 total:240 pass:198 dwarn:0 dfail:0 fail:0 skip:42
ro-bdw-i5-5250u total:240 pass:219 dwarn:4 dfail:0 fail:1 skip:16
ro-bdw-i7-5557U total:240 pass:224 dwarn:0 dfail:0 fail:0 skip:16
ro-bdw-i7-5600u total:240 pass:207 dwarn:0 dfail:0 fail:1 skip:32
ro-bsw-n3050 total:240 pass:194 dwarn:0 dfail:0 fail:4 skip:42
ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40
ro-hsw-i3-4010u total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26
ro-hsw-i7-4770r total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26
ro-ilk-i7-620lm total:240 pass:173 dwarn:1 dfail:0 fail:1 skip:65
ro-ilk1-i5-650 total:235 pass:173 dwarn:0 dfail:0 fail:2 skip:60
ro-ivb-i7-3770 total:240 pass:205 dwarn:0 dfail:0 fail:0 skip:35
ro-ivb2-i7-3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31
ro-skl3-i5-6260u total:240 pass:222 dwarn:0 dfail:0 fail:4 skip:14
ro-snb-i7-2620M total:240 pass:198 dwarn:0 dfail:0 fail:1 skip:41
Results at /archive/results/CI_IGT_test/RO_Patchwork_1700/
4a66cc6 drm-intel-nightly: 2016y-08m-04d-08h-20m-44s UTC integration manifest
a02d00e drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] drm/i915/fbc: FBC causes display flicker when VT-d is enabled on Skylake
2016-08-04 6:31 ` Jani Nikula
@ 2016-08-04 16:41 ` Daniel Vetter
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Vetter @ 2016-08-04 16:41 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Paulo Zanoni
On Thu, Aug 04, 2016 at 09:31:20AM +0300, Jani Nikula wrote:
> On Wed, 03 Aug 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > 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()
> > v4: Fix function name after rebase
> >
> > 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>
>
> Cc: stable@vger.kernel.org
fbc isn't enabled by default, so imo no.
-Daniel
>
> ?
>
> > ---
> > 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 8147eb9e8475..b673c7c54a46 100644
> > --- a/drivers/gpu/drm/i915/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/intel_fbc.c
> > @@ -1229,12 +1229,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
> > @@ -1252,6 +1268,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_device_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);
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [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).