Re: Backlight device class redesign

From: Zhang Rui
Date: Thu Dec 03 2009 - 20:50:26 EST


On Thu, 2009-12-03 at 18:52 +0800, Henrique de Moraes Holschuh wrote:
> On Thu, 03 Dec 2009, Zhang Rui wrote:
> > For example, device /sys/class/backlight/panel0 is created the first
> > time a backlight_ops for this display is registered.
> > And create the symbol link from the backlight class device to "physical
> > device" (device that invokes backlight_device_register) in the backlight
> > class device driver, if we really need it.
> > Remove and recreate a link pointing to the new physical device when the
> > backlight mode is changed.
>
> FWIW, I agree the above solution is simple enough and quite good enough.
>
> I just have absolutely _NO_ idea whatsoever how a platform driver can ask
> the PCI or APCI layer "where is the video device driving the LVDS panel so
> that I can bind to it"...
>
well. this is the question I want to ask. :)

IMO, if we want to create one device for one display, we must have a
unique ID for each display and the ID must be generic enough so that
both ACPI & platform & graphics driver can understand it.

ACPI&platform drivers have no idea about the display info it's bind to.
But they're always used to control the integrated panel, no?
we can use something like DEFAULT_ACPI_DISPLAY/DEFAULT_PLATFORM_DISPLAY
which stands for the integrated LVDS panel, which can also be understood
by the graphics driver.

ACPI video driver -->ACPI_DISPLAY-->|
|
platform driver->PLATFORM_DISPLAY-->|--->/sys/class/backlight/panel0
|
|-->integrated panel----->|
|
graphics |-->TV------------------->|--->/sys/class/backlight/tv0
|
|-->external LCD--------->|--->...

I'm not a graphics guy so I don't if there are any other ways to control
the TV/external LCD device, if yes, they can use something else as the
unique ID, say EDID, right?

thanks,
rui

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/