drm/i915: Allow SSC parameter to override VBT value
authorKeith Packard <keithp@keithp.com>
Mon, 26 Sep 2011 23:09:45 +0000 (16:09 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 27 Sep 2011 18:12:40 +0000 (11:12 -0700)
Allow SSC to be enabled even when the BIOS disables it for testing SSC paths.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_display.c

index f07e4252b70834c103b19bc193ce6124dde3d67f..58480deacc07241bf163b66a334152ba160506e2 100644 (file)
@@ -79,11 +79,11 @@ MODULE_PARM_DESC(lvds_downclock,
                "Use panel (LVDS/eDP) downclocking for power savings "
                "(default: false)");
 
-unsigned int i915_panel_use_ssc __read_mostly = 1;
+unsigned int i915_panel_use_ssc __read_mostly = -1;
 module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
 MODULE_PARM_DESC(lvds_use_ssc,
                "Use Spread Spectrum Clock with panels [LVDS/eDP] "
-               "(default: true)");
+               "(default: auto from VBT)");
 
 int i915_vbt_sdvo_panel_type __read_mostly = -1;
 module_param_named(vbt_sdvo_panel_type, i915_vbt_sdvo_panel_type, int, 0600);
index 04411ad2e779c2f2b2d6c8d3a83a214c097bc0d9..603949622104d36dd8e266c839479f5a3fae60f6 100644 (file)
@@ -4584,7 +4584,9 @@ static void intel_update_watermarks(struct drm_device *dev)
 
 static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
 {
-       return dev_priv->lvds_use_ssc && i915_panel_use_ssc
+       if (i915_panel_use_ssc >= 0)
+               return i915_panel_use_ssc != 0;
+       return dev_priv->lvds_use_ssc
                && !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
 }