Bug 52423 - Broken backlight selected when apple gmux backlight driver present
Summary: Broken backlight selected when apple gmux backlight driver present
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 02:11 UTC by Austin Lund
Modified: 2012-07-25 11:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Prioritize apple gmux backlight driver (368 bytes, patch)
2012-07-24 02:11 UTC, Austin Lund
no flags Details | Splinter Review

Description Austin Lund 2012-07-24 02:11:48 UTC
Created attachment 64580 [details] [review]
Prioritize apple gmux backlight driver

When the apple graphics muxer hardware is present then it is always the best choice for controlling the display backlight.  Currently the acpi0 driver is chosen which is completely broken on apple hardware when UEFI booting.
Comment 1 Chris Wilson 2012-07-25 08:09:04 UTC
Can you quickly test whether the native/platform/raw backlight detection of SNA works correctly?

commit de707b7dc853a3b315ead9789d5ca541412c99bc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 25 09:05:46 2012 +0100

    uxa: Add Apple's gmux to the list of known preferred backlights
    
    Reported-by: Austin Lund <austin.lund@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52423
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 2 Austin Lund 2012-07-25 10:53:02 UTC
In SNA accel method the backlight isn't working.

I get:

(II) intel(0): found backlight control interface acpi_video0 (type 
'firmware')

This is the present but non-functional backlight control
Comment 3 Chris Wilson 2012-07-25 11:04:35 UTC
Hmm, so much for believing the kernel to advertise a method to choose. This definitely contradicts the 'only one driver per device' rule...

Can you please tell me what /sys/class/backlight/gmux_backlight/type describes itself as?
Comment 4 Austin Lund 2012-07-25 11:12:47 UTC
$ cat /sys/class/backlight/gmux_backlight/type   
platform


Just as a note, this buggyness with the backlights is known by the kernel devs.  There were patches applied to unregister backlights which weren't working in BIOS compatibility mode.  But in UEFI mode there is no way for the kernel to know that the acpi methods just don't do anything to the actual brightness of the backlight.  It seems there is no way currently for the kernel to unreigster the acpi backlight when the gmux backlight driver finds the gmux hardware (as it is always the best choice if the gmuxer is present).
Comment 5 Chris Wilson 2012-07-25 11:26:26 UTC
A bit of greping confirms that only the ACPI are marked as firmware devices and we have preferred the known 'platform' devices in the past over those...

commit 0ab6d7a50d37cf4454577cb8c333d4b8683aa054
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 25 12:20:36 2012 +0100

    sna: Prefer platform backlight devices over firmware
    
    This is in contrast to libbacklight but closer to our original code as
    we prefer a known custom backlight controller over the ACPI interfaces.
    As only the ACPI interfaces are marked as firmware, and the custom
    backlight controllers as platform, we therefore need to prefer platform
    backlight devices.
    
    Reported-by: Austin Lund <austin.lund@gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=52423
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 6 Austin Lund 2012-07-25 11:37:21 UTC
Those commits make it all work for SNA accel.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.