[Intel-gfx] Legacy backlight control with KMS and BACKLIGHT property

Matthew Garrett mjg59 at srcf.ucam.org
Mon Aug 17 00:21:16 CEST 2009


On Sun, Aug 16, 2009 at 03:10:03PM -0700, Greg KH wrote:
> On Sun, Aug 16, 2009 at 02:26:22PM +0100, Matthew Garrett wrote:
> > This seems basically right, but I don't think DMI's the correct 
> > approach. We should be trying the registers on any device that doesn't 
> > implement the ACPI code and doesn't provide a more generic 
> > platform-specific interface.
> 
> How do we know this?  I'll gladly change the driver if there is some
> other better way.  Right now I'm only adding laptops that we know need
> this kind of configuration as there is no ACPI interface for the
> control.

The probability of the backlight control registers being hooked up is 
massively greater than the probability of it being done entirely in some 
out of band manner, and even then you'll just have register writes that 
do nothing. As Jesse says, the proper solution includes supporting the 
hardware with off-chip backlight controllers - but I don't think docs on 
how those are handled have been released by Intel.

What you probably do want to be doing is checking the mmio backlight 
register and seeing whether the chip's in legacy, native or combination 
mode. The opregion code already does this, so that probably wants to be 
factored out and another entry point added for systems without any other 
control method. DMI-strings and hardcoded PCI config writes will work, 
but it's not really the correct solution.

> > Speaking of which, are we sure there isn't a Samsung-specific
> > interface? Using a platform interface is always preferable to hitting
> > the registers directly, since that way we don't have the firmware
> > getting out of sync with the hardware.
> 
> From the rumors I have heard from some samsung contacts, they
> recommended touching the pci config space directly, which implies that
> there is no other way to do this right now :(

Fair enough.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org



More information about the Intel-gfx mailing list