summaryrefslogtreecommitdiff
path: root/src/backlight.h
AgeCommit message (Collapse)Author
2015-06-17backlight: Factor known names into preferred interfacesChris Wilson
Since the /sys/device/backlight never turned up we face an issue with disambiguating the backlight on multi-GPU devices. Both intel_backlight and nv_backlight are presented are raw interfaces, and on modern systems the ACPI interface is defunct, so we need a way to distinguish them. So, we fallback to our priority table of known interfaces and rank them accordingly, first by class (platform, native, raw) and then by priority. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-11backlight: Expose interface to switch backlight on/off entirelyChris Wilson
A feature in recent kernels is to disambiguate between the meaning of brightness=0, between disabling the the backlight entirely or setting the lowest valid brightness. As such, we now have an extra knob in sysfs to explicitly request that the backlight be turned off. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23backlight: Remove unused 'original' member from structureChris Wilson
This was accidentally added with no users. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23backlight: Set structure to safe values when not initialisedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20backlight: Make search routine for device specific backlight commonChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-15backlight: Amalgamate hardcoded priority tablesChris Wilson
Our fallback path for finding the backlight interface uses a hardcoded table of known backlight controllers in proirity order. Rather than maintain this table twice in the midst of the KMS logic, push it to the new set of common backlight routines. This incorporates bugfixes from SNA to handle unknown backlights, but usable, gracefully. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-15intel: Add a helper for setting backlight without root rightsChris Wilson
Once the xserver stops running as root on kms capabable systems, we will need some other way to access the backlight. The approach taken in this patch moves most of the heavy lifting to a helper that runs with root privileges and pipes our requested brightness into the sysfs backlight interface. Where required, we use pkexec to launch the helper with the elevated privilege. v2: Amalgamate much more of the duplicate code. Keep the daemon and pipe alive for the lifetime of the backlight interface. Provide an alternative for systems without PolicyKit. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [v1] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>