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

Bryan Freed bfreed at chromium.org
Fri Oct 14 22:33:35 CEST 2011


On Thu, Oct 6, 2011 at 8:09 AM, Jesse Barnes <jbarnes at virtuousgeek.org>wrote:

> On Wed, 5 Oct 2011 22:45:55 -0700
> Simon Que <sque at 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 <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 */
>
> 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
>

Hi Jesse.

Thanks for the response.
Let me try to get this thread going again.

We do expect to have more settings trickle in as we develop new boards, but
no additional settings are expected for this board.

Our BIOS boots in two different modes: dev mode which turns on the display
and provides VBT to the kernel, and normal mode which does not turn on the
screen or provide VBT.  When we get VBT from the BIOS, we want to honor it.

When we do not get VBT from BIOS, we want the i915 driver to give us usable
settings.  Indeed, about a year ago we added init_vbt_defaults() to do this
for us.

Now we want to differentiate these defaults (really just the lvds_ssc_freq
setting for now) for different systems, and the proposed solution is to
use dmi_check_system() for this.
When our next board comes along, it too may need the "non-alternate" ssc
frequency.  So making this a list of matches seems to make sense.

So we still want to call intel_parse_bios(), setup our defaults, then let
VBT processing proceed or fail as the case may be.

Thanks,

bryan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20111014/e38ad109/attachment.html>


More information about the Intel-gfx mailing list