aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-01-14 15:48:02 -0500
committerEric Anholt <eric@anholt.net>2010-01-15 17:08:01 -0500
commit33814341f22f13cec17e8d7fbf6f7e8000e3efa4 (patch)
tree7f43f096589e6900fb11db0033d3e68086d7c475 /drivers/gpu/drm
parent21bd770b9c90ee6a53a9dbb6293513a8c7654cfe (diff)
drm/i915: disable LVDS downclock by default
Many platform support this feature, and it can provide significant power savings when the reduced refresh rate is low. However, on some platforms a secondary (reduced) timing is provided but not actually supported by the hardware. This results in undesirable flicker at runtime. So disable the feature by default, but allow users to opt-in to the reduced clock behavior with a new module parameter, lvds_downclock, that can be set to 1 to enable the feature. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c3
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h1
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c3
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c3
4 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 66f7bac2ee55..46d88965852a 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -45,6 +45,9 @@ module_param_named(fbpercrtc, i915_fbpercrtc, int, 0400);
45unsigned int i915_powersave = 1; 45unsigned int i915_powersave = 1;
46module_param_named(powersave, i915_powersave, int, 0400); 46module_param_named(powersave, i915_powersave, int, 0400);
47 47
48unsigned int i915_lvds_downclock = 0;
49module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
50
48static struct drm_driver driver; 51static struct drm_driver driver;
49 52
50#define INTEL_VGA_DEVICE(id, info) { \ 53#define INTEL_VGA_DEVICE(id, info) { \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 445c49c6c397..5f781a74bf52 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -722,6 +722,7 @@ extern struct drm_ioctl_desc i915_ioctls[];
722extern int i915_max_ioctl; 722extern int i915_max_ioctl;
723extern unsigned int i915_fbpercrtc; 723extern unsigned int i915_fbpercrtc;
724extern unsigned int i915_powersave; 724extern unsigned int i915_powersave;
725extern unsigned int i915_lvds_downclock;
725 726
726extern void i915_save_display(struct drm_device *dev); 727extern void i915_save_display(struct drm_device *dev);
727extern void i915_restore_display(struct drm_device *dev); 728extern void i915_restore_display(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index f27567747580..b53c46f202f6 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -197,7 +197,8 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
197 memset(temp_mode, 0, sizeof(*temp_mode)); 197 memset(temp_mode, 0, sizeof(*temp_mode));
198 } 198 }
199 kfree(temp_mode); 199 kfree(temp_mode);
200 if (temp_downclock < panel_fixed_mode->clock) { 200 if (temp_downclock < panel_fixed_mode->clock &&
201 i915_lvds_downclock) {
201 dev_priv->lvds_downclock_avail = 1; 202 dev_priv->lvds_downclock_avail = 1;
202 dev_priv->lvds_downclock = temp_downclock; 203 dev_priv->lvds_downclock = temp_downclock;
203 DRM_DEBUG_KMS("LVDS downclock is found in VBT. ", 204 DRM_DEBUG_KMS("LVDS downclock is found in VBT. ",
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 5041590dfdc6..aa74e59bec61 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -926,7 +926,8 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
926 } 926 }
927 } 927 }
928 mutex_unlock(&dev->mode_config.mutex); 928 mutex_unlock(&dev->mode_config.mutex);
929 if (temp_downclock < panel_fixed_mode->clock) { 929 if (temp_downclock < panel_fixed_mode->clock &&
930 i915_lvds_downclock) {
930 /* We found the downclock for LVDS. */ 931 /* We found the downclock for LVDS. */
931 dev_priv->lvds_downclock_avail = 1; 932 dev_priv->lvds_downclock_avail = 1;
932 dev_priv->lvds_downclock = temp_downclock; 933 dev_priv->lvds_downclock = temp_downclock;