On Fri, 14 Oct 2011 13:33:35 -0700 Bryan Freed <[email protected]> wrote:
> On Thu, Oct 6, 2011 at 8:09 AM, Jesse Barnes <[email protected]>wrote: > > > On Wed, 5 Oct 2011 22:45:55 -0700 > > Simon Que <[email protected]> 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 <[email protected]> > > > --- > > > 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. Ok that's fine. This patch has my acked-by for now. We can look at abstracting things better as you add more boards here. -- Jesse Barnes, Intel Open Source Technology Center
signature.asc
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
