]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
drm/i915: fix startup hang on some non-mobile platforms
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 16 Sep 2009 22:05:00 +0000 (15:05 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 17 Sep 2009 21:43:27 +0000 (14:43 -0700)
Due to a bogus FBC support check and failing to check for FBC support
in the right places, mode setting on non-mobile platforms could fail
and hang in the FBC disable routine.  Fix it up.

This fix highlights the need for cleanups in this area (function
pointers and better feature support checks).  Patches for that to
follow.

Tested-by: Kenny Graunke <kenny@whitecape.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c

index d814b6957936b388d0e3378bfaf8974b4b937fa4..a9c671529885aae9febbca203031a24e79efbec0 100644 (file)
@@ -941,7 +941,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
 
 #define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IGDNG(dev))
 #define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IGDNG(dev))
-#define I915_HAS_FBC(dev) (IS_I9XX(dev) || IS_I965G(dev))
+#define I915_HAS_FBC(dev) (IS_MOBILE(dev) && (IS_I9XX(dev) || IS_I965G(dev)))
 
 #define PRIMARY_RINGBUFFER_SIZE         (128*1024)
 
index 42cd68da74ab1df7666d8374099698d651cec2ea..f9fe9894637a9f5db9838a127702175576414089 100644 (file)
@@ -1005,6 +1005,9 @@ void i8xx_disable_fbc(struct drm_device *dev)
        struct drm_i915_private *dev_priv = dev->dev_private;
        u32 fbc_ctl;
 
+       if (!I915_HAS_FBC(dev))
+               return;
+
        /* Disable compression */
        fbc_ctl = I915_READ(FBC_CONTROL);
        fbc_ctl &= ~FBC_CTL_EN;