aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-09-16 18:05:00 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 17:43:27 -0400
commitc1a1cdc159e211f045290f61ac95092e9708f5bc (patch)
tree79ce3088cfc82f0a93a5d315fcd380d274c7dd08 /drivers/gpu
parent06891e27a9b5dba5268bb80e41a283f51335afe7 (diff)
drm/i915: fix startup hang on some non-mobile platforms
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d814b6957936..a9c671529885 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -941,7 +941,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
941 941
942#define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IGDNG(dev)) 942#define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IGDNG(dev))
943#define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IGDNG(dev)) 943#define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IGDNG(dev))
944#define I915_HAS_FBC(dev) (IS_I9XX(dev) || IS_I965G(dev)) 944#define I915_HAS_FBC(dev) (IS_MOBILE(dev) && (IS_I9XX(dev) || IS_I965G(dev)))
945 945
946#define PRIMARY_RINGBUFFER_SIZE (128*1024) 946#define PRIMARY_RINGBUFFER_SIZE (128*1024)
947 947
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 42cd68da74ab..f9fe9894637a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1005,6 +1005,9 @@ void i8xx_disable_fbc(struct drm_device *dev)
1005 struct drm_i915_private *dev_priv = dev->dev_private; 1005 struct drm_i915_private *dev_priv = dev->dev_private;
1006 u32 fbc_ctl; 1006 u32 fbc_ctl;
1007 1007
1008 if (!I915_HAS_FBC(dev))
1009 return;
1010
1008 /* Disable compression */ 1011 /* Disable compression */
1009 fbc_ctl = I915_READ(FBC_CONTROL); 1012 fbc_ctl = I915_READ(FBC_CONTROL);
1010 fbc_ctl &= ~FBC_CTL_EN; 1013 fbc_ctl &= ~FBC_CTL_EN;