On Wed, 5 Oct 2011 22:45:55 -0700
Simon Que <s...@chromium.org> wrote:

> 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 <s...@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 */

Do you expect to have other settings that you won't get from a VBIOS VBT
(e.g. video timings, dual refresh info)?

If so, it might make more sense to have an alternate init path for the
non-VBT values to replace all the VBT parsing.  I.e. if your DMI match
happens, call into something other than our init_bios routine to set up
defaults for the platform.

-- 
Jesse Barnes, Intel Open Source Technology Center

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to