[Intel-gfx] [PATCH] drm/i915: warn if Pineview CxSR can't be enabled

Jesse Barnes jbarnes at virtuousgeek.org
Thu Dec 3 18:52:43 CET 2009


On Wed, 2 Dec 2009 19:44:06 -0800
Arjan van de Ven <arjan at infradead.org> wrote:

> On Wed, 2 Dec 2009 09:49:20 -0800
> Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> 
> > If we don't detect a supported memory configuration, we can't enable
> > CxSR.  Warn the user in this case so they can file a bug.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c index 33113c7..874f303 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -4527,6 +4527,11 @@ void intel_modeset_init(struct drm_device
> > *dev) (unsigned long)dev);
> >  
> >  	intel_setup_overlay(dev);
> > +
> > +	if (IS_IGD(dev) && !intel_get_cxsr_latency(IS_IGDG(dev),
> > +
> > dev_priv->fsb_freq,
> > +
> > dev_priv->mem_freq))
> > +		DRM_ERROR("failed to find CxSR latency, disabling
> > CxSR\n"); }
> >  
> >  void intel_modeset_cleanup(struct drm_device *dev)
> 
> are there diagnostics you'd want to do something if a user comes to
> you with "powertop gave me this message" ....?
> if so maybe it should be part of this message already ;-)

Right, here's an updated patch.  Eric I think it's ok to apply as long
as Shaohua doesn't have problems with it.

--

From aa11d123c2b7980e4021dc158e2c8e8cb3b16466 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Thu, 3 Dec 2009 09:48:29 -0800
Subject: [PATCH] drm/i915: warn on Pineview if we can't enable CxSR due to unknown mem config

In order to enable CxSR on Pineview, we need to know the memory configuration
so we can use the correct latencies in our watermark calculations.  If we fail
to find a known configuration, print a warning as this prevents significant
power savings.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 65b76ff..951b2e9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4730,6 +4730,13 @@ void intel_modeset_init(struct drm_device *dev)
 		    (unsigned long)dev);
 
 	intel_setup_overlay(dev);
+
+	if (IS_IGD(dev) && !intel_get_cxsr_latency(IS_IGDG(dev),
+						   dev_priv->fsb_freq,
+						   dev_priv->mem_freq))
+		DRM_INFO("failed to find known CxSR latency "
+			 "(found fsb freq %d, mem freq %d), disabling CxSR\n",
+			 dev_priv->fsb_freq, dev_priv->mem_freq);
 }
 
 void intel_modeset_cleanup(struct drm_device *dev)
-- 
1.6.3.3





More information about the Intel-gfx mailing list