All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
@ 2019-09-04  7:01 Gaurav K Singh
  2019-09-04  7:43 ` ✗ Fi.CI.BUILD: failure for " Patchwork
  2019-09-04  8:30 ` [PATCH] " kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Gaurav K Singh @ 2019-09-04  7:01 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 16ed44bfd734..71f2568ea5a3 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -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);
 }
 
-- 
1.9.1

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

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

* ✗ Fi.CI.BUILD: failure for drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
  2019-09-04  7:01 [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks Gaurav K Singh
@ 2019-09-04  7:43 ` Patchwork
  2019-09-04  8:30 ` [PATCH] " kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-09-04  7:43 UTC (permalink / raw)
  To: Gaurav K Singh; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
URL   : https://patchwork.freedesktop.org/series/66196/
State : failure

== Summary ==

CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  AR      drivers/gpu/drm/i915/built-in.a
  CC [M]  drivers/gpu/drm/i915/display/intel_fbc.o
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_GEN
cc1: all warnings being treated as errors
scripts/Makefile.build:280: recipe for target 'drivers/gpu/drm/i915/display/intel_fbc.o' failed
make[4]: *** [drivers/gpu/drm/i915/display/intel_fbc.o] Error 1
scripts/Makefile.build:497: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:497: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:497: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1083: 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] 3+ messages in thread

* Re: [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks
  2019-09-04  7:01 [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks Gaurav K Singh
  2019-09-04  7:43 ` ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2019-09-04  8:30 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2019-09-04  8:30 UTC (permalink / raw)
  To: Gaurav K Singh; +Cc: intel-gfx, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3247 bytes --]

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-20190903]
[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/20190904-151433
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-defconfig (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=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

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_GEN
   cc1: 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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28068 bytes --]

[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

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

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

end of thread, other threads:[~2019-09-04  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04  7:01 [PATCH] drm/i915: Fix corruption lines on the screen on Gen9 chromebooks Gaurav K Singh
2019-09-04  7:43 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2019-09-04  8:30 ` [PATCH] " kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.