aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-05-05 18:24:21 -0400
committerKeith Packard <keithp@keithp.com>2011-05-17 17:31:26 -0400
commitc1a9f047638b27e481d097910604316b8a0d132b (patch)
tree130ea4a623047efc776a9fbfa6ad21d52ff369e6
parent8547920fc6f0d288fcc57ca705ccb2d00920fc72 (diff)
drm/i915: add fbc enable flag, but disable by default
FBC has too many corner cases that we don't currently deal with, so disable it by default so we can enable more important features like RC6, which conflicts in some configurations. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31742 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c3
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c5
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
4 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 183eaac8980a..51c2257b11e6 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1065,6 +1065,9 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
1065 case FBC_MULTIPLE_PIPES: 1065 case FBC_MULTIPLE_PIPES:
1066 seq_printf(m, "multiple pipes are enabled"); 1066 seq_printf(m, "multiple pipes are enabled");
1067 break; 1067 break;
1068 case FBC_MODULE_PARAM:
1069 seq_printf(m, "disabled per module param (default off)");
1070 break;
1068 default: 1071 default:
1069 seq_printf(m, "unknown reason"); 1072 seq_printf(m, "unknown reason");
1070 } 1073 }
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8c4fcbb8a4cb..4c9e92f8abc2 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -55,6 +55,9 @@ module_param_named(semaphores, i915_semaphores, int, 0600);
55unsigned int i915_enable_rc6 = 0; 55unsigned int i915_enable_rc6 = 0;
56module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600); 56module_param_named(i915_enable_rc6, i915_enable_rc6, int, 0600);
57 57
58unsigned int i915_enable_fbc = 0;
59module_param_named(i915_enable_fbc, i915_enable_fbc, int, 0600);
60
58unsigned int i915_lvds_downclock = 0; 61unsigned int i915_lvds_downclock = 0;
59module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400); 62module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
60 63
@@ -169,7 +172,7 @@ static const struct intel_device_info intel_ironlake_d_info = {
169static const struct intel_device_info intel_ironlake_m_info = { 172static const struct intel_device_info intel_ironlake_m_info = {
170 .gen = 5, .is_mobile = 1, 173 .gen = 5, .is_mobile = 1,
171 .need_gfx_hws = 1, .has_hotplug = 1, 174 .need_gfx_hws = 1, .has_hotplug = 1,
172 .has_fbc = 0, /* disabled due to buggy hardware */ 175 .has_fbc = 1,
173 .has_bsd_ring = 1, 176 .has_bsd_ring = 1,
174}; 177};
175 178
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3a1c27718065..ee660355ae68 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -250,6 +250,7 @@ enum no_fbc_reason {
250 FBC_BAD_PLANE, /* fbc not supported on plane */ 250 FBC_BAD_PLANE, /* fbc not supported on plane */
251 FBC_NOT_TILED, /* buffer not tiled */ 251 FBC_NOT_TILED, /* buffer not tiled */
252 FBC_MULTIPLE_PIPES, /* more than one pipe active */ 252 FBC_MULTIPLE_PIPES, /* more than one pipe active */
253 FBC_MODULE_PARAM,
253}; 254};
254 255
255enum intel_pch { 256enum intel_pch {
@@ -995,6 +996,7 @@ extern unsigned int i915_lvds_downclock;
995extern unsigned int i915_panel_use_ssc; 996extern unsigned int i915_panel_use_ssc;
996extern int i915_vbt_sdvo_panel_type; 997extern int i915_vbt_sdvo_panel_type;
997extern unsigned int i915_enable_rc6; 998extern unsigned int i915_enable_rc6;
999extern unsigned int i915_enable_fbc;
998 1000
999extern int i915_suspend(struct drm_device *dev, pm_message_t state); 1001extern int i915_suspend(struct drm_device *dev, pm_message_t state);
1000extern int i915_resume(struct drm_device *dev); 1002extern int i915_resume(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5ec74df2627e..81ad654f3544 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1731,6 +1731,11 @@ static void intel_update_fbc(struct drm_device *dev)
1731 intel_fb = to_intel_framebuffer(fb); 1731 intel_fb = to_intel_framebuffer(fb);
1732 obj = intel_fb->obj; 1732 obj = intel_fb->obj;
1733 1733
1734 if (!i915_enable_fbc) {
1735 DRM_DEBUG_KMS("fbc disabled per module param (default off)\n");
1736 dev_priv->no_fbc_reason = FBC_MODULE_PARAM;
1737 goto out_disable;
1738 }
1734 if (intel_fb->obj->base.size > dev_priv->cfb_size) { 1739 if (intel_fb->obj->base.size > dev_priv->cfb_size) {
1735 DRM_DEBUG_KMS("framebuffer too large, disabling " 1740 DRM_DEBUG_KMS("framebuffer too large, disabling "
1736 "compression\n"); 1741 "compression\n");