All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] DRM/i915: Remove magic to prevent blank screen on gen4 chipsets
@ 2014-07-07 16:20 Egbert Eich
  2014-07-07 16:29 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Egbert Eich @ 2014-07-07 16:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: Egbert Eich, Daniel Vetter

Since the root cause is understood now and with the fix

   commit 564ed191f5d816d24501664296991ec70327e2bc
   Author: Imre Deak <imre.deak@intel.com>
   Date:   Fri Jun 13 14:54:21 2014 +0300

       drm/i915: gmch: fix stuck primary plane due to memory self-refresh mode

in place the magic for G4x chipsets introduced with commit

   commit 61bc95c1fbbb6a08b55bbe161fdf1ea5493fc595
   Author: Egbert Eich <eich@suse.com>
   Date:   Mon Mar 4 09:24:38 2013 -0500

       DRM/i915: On G45 enable cursor plane briefly after enabling the display plane.

to avoided occasional screen blanking on mode changes can finally
be removed.
It's been verified that Imre's fix also resolves the said issue.

Signed-off-by: Egbert Eich <eich@suse.de>
Tested-by: Stefan Dirsch <sndirsch@suse.de>
---
 drivers/gpu/drm/i915/intel_display.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b9bc030..8c3dcdf 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3894,30 +3894,6 @@ static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
 	 */
 }
 
-/**
- * i9xx_fixup_plane - ugly workaround for G45 to fire up the hardware
- * cursor plane briefly if not already running after enabling the display
- * plane.
- * This workaround avoids occasional blank screens when self refresh is
- * enabled.
- */
-static void
-g4x_fixup_plane(struct drm_i915_private *dev_priv, enum pipe pipe)
-{
-	u32 cntl = I915_READ(CURCNTR(pipe));
-
-	if ((cntl & CURSOR_MODE) == 0) {
-		u32 fw_bcl_self = I915_READ(FW_BLC_SELF);
-
-		I915_WRITE(FW_BLC_SELF, fw_bcl_self & ~FW_BLC_SELF_EN);
-		I915_WRITE(CURCNTR(pipe), CURSOR_MODE_64_ARGB_AX);
-		intel_wait_for_vblank(dev_priv->dev, pipe);
-		I915_WRITE(CURCNTR(pipe), cntl);
-		I915_WRITE(CURBASE(pipe), I915_READ(CURBASE(pipe)));
-		I915_WRITE(FW_BLC_SELF, fw_bcl_self);
-	}
-}
-
 static void intel_crtc_enable_planes(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
@@ -3930,9 +3906,6 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
 
 	intel_enable_primary_hw_plane(dev_priv, plane, pipe);
 	intel_enable_planes(crtc);
-	/* The fixup needs to happen before cursor is enabled */
-	if (IS_G4X(dev))
-		g4x_fixup_plane(dev_priv, pipe);
 	intel_crtc_update_cursor(crtc, true);
 	intel_crtc_dpms_overlay(intel_crtc, true);
 
-- 
1.8.4.5

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

* Re: [PATCH] DRM/i915: Remove magic to prevent blank screen on gen4 chipsets
  2014-07-07 16:20 [PATCH] DRM/i915: Remove magic to prevent blank screen on gen4 chipsets Egbert Eich
@ 2014-07-07 16:29 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-07-07 16:29 UTC (permalink / raw)
  To: Egbert Eich; +Cc: Daniel Vetter, intel-gfx

On Mon, Jul 07, 2014 at 06:20:34PM +0200, Egbert Eich wrote:
> Since the root cause is understood now and with the fix
> 
>    commit 564ed191f5d816d24501664296991ec70327e2bc
>    Author: Imre Deak <imre.deak@intel.com>
>    Date:   Fri Jun 13 14:54:21 2014 +0300
> 
>        drm/i915: gmch: fix stuck primary plane due to memory self-refresh mode
> 
> in place the magic for G4x chipsets introduced with commit
> 
>    commit 61bc95c1fbbb6a08b55bbe161fdf1ea5493fc595
>    Author: Egbert Eich <eich@suse.com>
>    Date:   Mon Mar 4 09:24:38 2013 -0500
> 
>        DRM/i915: On G45 enable cursor plane briefly after enabling the display plane.
> 
> to avoided occasional screen blanking on mode changes can finally
> be removed.
> It's been verified that Imre's fix also resolves the said issue.
> 
> Signed-off-by: Egbert Eich <eich@suse.de>
> Tested-by: Stefan Dirsch <sndirsch@suse.de>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b9bc030..8c3dcdf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3894,30 +3894,6 @@ static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
>  	 */
>  }
>  
> -/**
> - * i9xx_fixup_plane - ugly workaround for G45 to fire up the hardware
> - * cursor plane briefly if not already running after enabling the display
> - * plane.
> - * This workaround avoids occasional blank screens when self refresh is
> - * enabled.
> - */
> -static void
> -g4x_fixup_plane(struct drm_i915_private *dev_priv, enum pipe pipe)
> -{
> -	u32 cntl = I915_READ(CURCNTR(pipe));
> -
> -	if ((cntl & CURSOR_MODE) == 0) {
> -		u32 fw_bcl_self = I915_READ(FW_BLC_SELF);
> -
> -		I915_WRITE(FW_BLC_SELF, fw_bcl_self & ~FW_BLC_SELF_EN);
> -		I915_WRITE(CURCNTR(pipe), CURSOR_MODE_64_ARGB_AX);
> -		intel_wait_for_vblank(dev_priv->dev, pipe);
> -		I915_WRITE(CURCNTR(pipe), cntl);
> -		I915_WRITE(CURBASE(pipe), I915_READ(CURBASE(pipe)));
> -		I915_WRITE(FW_BLC_SELF, fw_bcl_self);
> -	}
> -}
> -
>  static void intel_crtc_enable_planes(struct drm_crtc *crtc)
>  {
>  	struct drm_device *dev = crtc->dev;
> @@ -3930,9 +3906,6 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
>  
>  	intel_enable_primary_hw_plane(dev_priv, plane, pipe);
>  	intel_enable_planes(crtc);
> -	/* The fixup needs to happen before cursor is enabled */
> -	if (IS_G4X(dev))
> -		g4x_fixup_plane(dev_priv, pipe);
>  	intel_crtc_update_cursor(crtc, true);
>  	intel_crtc_dpms_overlay(intel_crtc, true);
>  
> -- 
> 1.8.4.5
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2014-07-07 16:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 16:20 [PATCH] DRM/i915: Remove magic to prevent blank screen on gen4 chipsets Egbert Eich
2014-07-07 16:29 ` Daniel Vetter

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.