drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
Subsystems (3)
PATCH 1/1 drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
On Gen9 chromebooks, we are seeing the screen shows several
large blue horizontal stripes over the top. Also, corruption happens when we switch from a chrome browser tab to VT2 mode(by pressing Ctrl+Alt+F2) and then back to chrome tab.
As per the display workaround #1200, FBC needs wait for vblank before enabling and before disabling FBC.
--- drivers/gpu/drm/i915/display/intel_fbc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_fbc.c +6 -1
@@ -1097,6 +1097,8 @@ void intel_fbc_enable(struct intel_crtc *crtc,if (fbc->crtc == crtc) {WARN_ON (!crtc_state->enable_fbc);WARN_ON (fbc->active); +if (IS_GEN9 (dev_priv)) +intel_wait_for_vblank (dev_priv, crtc->pipe); } goto out; }
@@ -1137,8 +1139,11 @@ void intel_fbc_disable(struct intel_crtc *crtc)return ;mutex_lock (&fbc->lock); -if (fbc->crtc == crtc) +if (fbc->crtc == crtc) {__intel_fbc_disable (dev_priv); +if (IS_GEN9 (dev_priv)) +intel_wait_for_vblank (dev_priv, crtc->pipe); + }mutex_unlock (&fbc->lock); }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi Gaurav,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[cannot apply to v5.3-rc7 next-20190904]
[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/Gaurav-K-Singh/drm-i915-Fix-corruption-lines-on-the-screen-on-Gen9-chromebooks/20190905-052832 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-rhel (attached as .config) compiler: gcc-7 (Debian 7.4.0-11) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/display/intel_fbc.c: In function 'intel_fbc_enable':
>> drivers/gpu/drm/i915/display/intel_fbc.c:1100:8: error: implicit declaration of function 'IS_GEN9'; did you mean 'IS_GEN'? [-Werror=implicit-function-declaration]
if (IS_GEN9(dev_priv))
^~~~~~~
IS_GENcc1: some warnings being treated as errors
vim +1100 drivers/gpu/drm/i915/display/intel_fbc.c
1071
1072 /**
1073 * intel_fbc_enable: tries to enable FBC on the CRTC
1074 * @crtc: the CRTC
1075 * @crtc_state: corresponding &drm_crtc_state for @crtc
1076 * @plane_state: corresponding &drm_plane_state for the primary plane of @crtc
1077 *
1078 * This function checks if the given CRTC was chosen for FBC, then enables it if
1079 * possible. Notice that it doesn't activate FBC. It is valid to call
1080 * intel_fbc_enable multiple times for the same pipe without an
1081 * intel_fbc_disable in the middle, as long as it is deactivated.
1082 */
1083 void intel_fbc_enable(struct intel_crtc *crtc,
1084 struct intel_crtc_state *crtc_state,
1085 struct intel_plane_state *plane_state)
1086 {
1087 struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1088 struct intel_fbc *fbc = &dev_priv->fbc;
1089
1090 if (!fbc_supported(dev_priv))
1091 return;
1092
1093 mutex_lock(&fbc->lock);
1094
1095 if (fbc->enabled) {
1096 WARN_ON(fbc->crtc == NULL);
1097 if (fbc->crtc == crtc) {
1098 WARN_ON(!crtc_state->enable_fbc);
1099 WARN_ON(fbc->active);
> 1100 if (IS_GEN9(dev_priv))
1101 intel_wait_for_vblank(dev_priv, crtc->pipe);
1102 }
1103 goto out;
1104 }
1105
1106 if (!crtc_state->enable_fbc)
1107 goto out;
1108
1109 WARN_ON(fbc->active);
1110 WARN_ON(fbc->crtc != NULL);
1111
1112 intel_fbc_update_state_cache(crtc, crtc_state, plane_state);
1113 if (intel_fbc_alloc_cfb(crtc)) {
1114 fbc->no_fbc_reason = "not enough stolen memory";
1115 goto out;
1116 }
1117
1118 DRM_DEBUG_KMS("Enabling FBC on pipe %c\n", pipe_name(crtc->pipe));
1119 fbc->no_fbc_reason = "FBC enabled but not active yet\n";
1120
1121 fbc->enabled = true;
1122 fbc->crtc = crtc;
1123 out:
1124 mutex_unlock(&fbc->lock);
1125 }
1126
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx