[Intel-gfx] [PATCH] CHROMIUM: i915: Select non-alternate SSC frequency for some systems
Simon Que
sque at chromium.org
Fri Oct 7 00:24:52 CEST 2011
> 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,
I am not expecting any other settings. Having an alternate init path
isn't quite what I have in mind. This patch is specifically for
intel_bios_ssc_frequency, which has 2 choices for frequency (primary &
alternate).
You do bring up a good point about other settings though. What if,
for example, there were another system that wanted lvds_dither=0 and
another wanted edp.bpp=8 and another wanted edp.bpp=16?. It would be
impractical to define separate functions for them -- we would have to
accommodate each of these system-specific settings independently.
Instead, I think we could introduce a function that would allow for
quick DMI checks, without having to define bulky DMI tables:
static bool is_product(const char *name) {
struct dmi_system_id id[] = {
{
.callback = NULL,
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, name),
}
},
{}
}
return dmi_check_system(id);
}
In this current patch, we can simply have:
if (is_product("Lumpy"))
dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 0);
else
dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1);
In the future, if others want to add the example defaults I listed
earlier (lvds_dither and edp.bpp), they can do something like:
if (is_product("AAA") || is_product("BBB"))
dev_priv->lvds_dither = 1;
else
dev_priv->lvds_dither = 0;
...
if (is_product("CCC") || is_product("DDD"))
dev_priv->edp.bpp = 8;
else if (is_product("EEE"))
dev_priv->edp.bpp = 16;
else
dev_priv->edp.bpp = 18;
These selections are all independent of each other. All this will
still happen within init_vbt_defaults() but without the need to define
more DMI structures for each check.
Some ideas for developing this further:
- Create more quick DMI check functions for the other possible DMI
match criteria.
- Include all these functions in the DMI API, so all modules can use them.
Thanks,
Simon
More information about the Intel-gfx
mailing list