All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Disable self-refresh for untiled fbs on i915gm
@ 2014-04-07  6:54 Daniel Vetter
  2014-04-07  6:57 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2014-04-07  6:54 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Krzysztof Mazur, stable

Apparently it doesn't work. X-tiled self-refresh works flawlessly
otoh. It's unclear whether this just borked wm setup from our side or
a hw restriction, but just disabling gets things going.

Note that this regression was only brought to light with

commit 3f2dc5ac05714711fc14f2bf0ee5e42d5c08c581
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Jan 10 14:06:47 2014 +0200

    drm/i915: Fix 915GM self-refresh enable/disable

before that self-refresh for i915GM didn't work at all.

Kudos to Ville for spotting a little bug in the original patch I've
attached to the bug.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76103
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index c849986b40de..6e1a644b6330 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1545,6 +1545,14 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
 
 	DRM_DEBUG_KMS("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
 
+	if (IS_I915GM(dev) && enabled) {
+		struct intel_framebuffer *fb = to_intel_framebuffer(enabled->fb);
+
+		/* self-refresh seems busted with untiled */
+		if (fb->obj->tiling_mode == I915_TILING_NONE)
+			enabled = NULL;
+	}
+
 	/*
 	 * Overlay gets an aggressive default since video jitter is bad.
 	 */
-- 
1.8.5.2

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

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

* Re: [PATCH] drm/i915: Disable self-refresh for untiled fbs on i915gm
  2014-04-07  6:54 [PATCH] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
@ 2014-04-07  6:57 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-04-07  6:57 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Krzysztof Mazur, stable

On Mon, Apr 07, 2014 at 08:54:21AM +0200, Daniel Vetter wrote:
> Apparently it doesn't work. X-tiled self-refresh works flawlessly
> otoh. It's unclear whether this just borked wm setup from our side or
> a hw restriction, but just disabling gets things going.

Oops, I've forgotten to add that apparently X still works correctly with
linear framebuffers, so might just be an issue with the initial modeset.
Whatever, this gets that old gen3 chip going again ;-)
-Daniel

> 
> Note that this regression was only brought to light with
> 
> commit 3f2dc5ac05714711fc14f2bf0ee5e42d5c08c581
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Fri Jan 10 14:06:47 2014 +0200
> 
>     drm/i915: Fix 915GM self-refresh enable/disable
> 
> before that self-refresh for i915GM didn't work at all.
> 
> Kudos to Ville for spotting a little bug in the original patch I've
> attached to the bug.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76103
> Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
> Cc: Krzysztof Mazur <krzysiek@podlesie.net>
> Cc: stable@vger.kernel.org
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index c849986b40de..6e1a644b6330 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1545,6 +1545,14 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
>  
>  	DRM_DEBUG_KMS("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
>  
> +	if (IS_I915GM(dev) && enabled) {
> +		struct intel_framebuffer *fb = to_intel_framebuffer(enabled->fb);
> +
> +		/* self-refresh seems busted with untiled */
> +		if (fb->obj->tiling_mode == I915_TILING_NONE)
> +			enabled = NULL;
> +	}
> +
>  	/*
>  	 * Overlay gets an aggressive default since video jitter is bad.
>  	 */
> -- 
> 1.8.5.2
> 

-- 
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-04-07  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07  6:54 [PATCH] drm/i915: Disable self-refresh for untiled fbs on i915gm Daniel Vetter
2014-04-07  6:57 ` 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.