On 06/15/2013 01:29 AM, Matthew Garrett wrote: > On Fri, 2013-06-14 at 14:47 +0800, Aaron Lu wrote: > >> What about a priority based solution? We can introduce a new field named >> priority to backlight_device and instead of calling another module's >> function like the unregister one here(which cause unnecessary module >> dependency), we only need to boost priority for its own interface. This >> field will be exported to sysfs, so user can change it during runtime >> too. And we can also introduce a new kernel command line as >> backlight.force_interface=raw/firmware/platform, to overcome the limited >> functionality provided by acpi_backlight=video/vendor, which does not >> involve GPU's interface. > > How would that work with existing userspace? User space tool will need to be updated to use this as stated in the gist page, I've patches for gsd-backlight-helper and xorg-x11-drv-intel, for others we can add I think if the priority based solution is deemed useful. > >> And we can place the quirk code in backlight layer instead of individual >> backlight functionality provider module. Suppose we have a backlight >> manager there, for all win8 systems, we can boost the raw type's >> priority on its registration, so no need to add code in >> intel/amd/etc./'s GPU driver code. > > But we'd need to add code to every piece of userspace that currently > uses the backlight, right? Yes that's the case. > >> With priority based solution, all backlight control interfaces stay, >> the priority field is an indication given by kernel to user space. > > We shouldn't export interfaces if we don't expect them to work. It's not easy to decide if they work or not sometimes, e.g. I came across a system that claims win8 in ACPI table and has an Intel GPU, while its ACPI video interface also works. With this patch, the working ACPI video interface is removed, while with the priority based solution, the GPU's interface priority gets higher, but the ACPI video interface still stays. Thanks, Aaron _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel