[Intel-gfx] [PATCH] CHROMIUM: i915: Select non-alternate SSC frequency for some systems

Simon Que sque at chromium.org
Thu Oct 6 07:45:55 CEST 2011


Hi,

Here's a patch to introduce a DMI-based SSC frequency selection in
intel_bios.c.  Instead of always selecting the "alternate" SSC
frequency as default during initialization, this patch lets some
systems have the non-alternate frequency by default.

Thanks,
Simon
=====================================================
drivers: i915: Select non-alternate SSC frequency for some systems

When initializing VBT default values, the alternate BIOS SSC frequency
is selected.  This patch allows the non-alternate frequency to be
selected as a default, for specified systems.  There is a DMI match list
for systems that are to use the non-alternate frequency.  Currently,
only Lumpy is on the list.

Signed-off-by: Simon Que <sque at chromium.org>
---
 drivers/gpu/drm/i915/intel_bios.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c
b/drivers/gpu/drm/i915/intel_bios.c
index 927442a..ec75f15 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -25,6 +25,7 @@
  *
  */
 #include <drm/drm_dp_helper.h>
+#include <linux/dmi.h>
 #include "drmP.h"
 #include "drm.h"
 #include "i915_drm.h"
@@ -565,6 +566,17 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
 	return;
 }

+static const struct dmi_system_id lvds_do_not_use_alternate_frequency[] = {
+	{
+		.callback = NULL,
+		.ident = "Lumpy",
+		.matches = {
+			DMI_MATCH(DMI_PRODUCT_NAME, "Lumpy"),
+		}
+	},
+	{ }
+};
+
 static void
 init_vbt_defaults(struct drm_i915_private *dev_priv)
 {
@@ -585,7 +597,10 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)

 	/* Default to using SSC */
 	dev_priv->lvds_use_ssc = 1;
-	dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1);
+	if (dmi_check_system(lvds_do_not_use_alternate_frequency))
+		dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 0);
+	else
+		dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1);
 	DRM_DEBUG("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq);

 	/* eDP data */
-- 
1.7.2.3



More information about the Intel-gfx mailing list