[Intel-gfx] BACKLIGHT property for KMS case

Jesse Barnes jbarnes at virtuousgeek.org
Tue Aug 18 18:25:26 CEST 2009


On Tue, 18 Aug 2009 11:07:08 +0800
ykzhao <yakui.zhao at intel.com> wrote:
> The two boxes are based on the g4x platform. And the acpi backlight
> interface can work well on one box. And there is no acpi backlight
> interface on another box.
> In fact I check the vbios dump on several other boxes and the length
> of backlight section is 21. So IMO the backlight section is not
> reliable and we can't use it to parse the backlight interface.
>

None of the VBIOS dumps I have seem to have this sort of corruption;
most have a length of 97, which is correct given the size of the
backlight info struct we're using.  But like I said, on 965+ platforms
it doesn't matter, since they'll have OpRegion support (they're
required to afaik).

> > > Another issue is that the brightness level is so big when the
> > > native/combo mode is used. For example: 0-65535 for the native
> > > control method. The user will be confused by so many brightness
> > > levels.
> > 
> > User won't see them directly, so there should be no confusion.
> > Brightness is generally exposed as a slider or a series of steps
> > with the brightness keys.
> But this interface can be found in /sys/class/backlight/*. Maybe it is
> used to adjust the brightness by user. In such case too many
> brightness levels are exposed to user.

If the user is poking /sys/class/backlight directly, they should be
technical enough to not be confused by large numbers.

> > > How about using the legacy control method?
> > 
> > Yes, we have to modify the legacy registers in some cases.  But
> > modifying them exclusively would be a problem...
> How can we modify the legacy registers in the two different paths if
> we expose only one interface to user space?

If the legacy registers are active, they'll usually be used by firmware
code to adjust the backlight quickly & easily.  If the firmware adjusts
them to 0, we may have to increase the value when we get a request
through the backlight interface we export, or the brightness will
remain at 0.  In most other cases we'll only adjust the PWM value.

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list