drm/i915: warn if Pineview CxSR can't be enabled
authorJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 3 Dec 2009 17:52:43 +0000 (09:52 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 7 Dec 2009 20:11:52 +0000 (12:11 -0800)
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.

drivers/gpu/drm/i915/intel_display.c

index 22dcd0851637afb041d8169bb2b0096aaa6d5e91..6b9dd672dd5950500cda28d2c1c4ad55e4502854 100644 (file)
@@ -4740,6 +4740,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)