Created attachment 56399 [details] acpidump of Clevo B7130 According to Section 3.1.6 on page 40 of the ACPI Integrated Graphics OpRegion Specification from http://intellinuxgraphics.org/ACPI_IGD_OpRegion_%20Spec.pdf, the driver is supposed to set the CADL field during boot and on every mode set process. An excerpt from the spec: ============================================================ Description This field indicates which display devices (monitors) are currently active. A maximum of eight monitors are assumed active on a given platform. The IDs should be the same as the enumerated monitor or connector IDs. The graphics driver determines active monitors during mode set times and during boot. Driver Access Writes: The graphics driver writes to this field on every mode set process and during boot. Reads: The graphics driver can read this field to update NADL. ============================================================ The struct member "cadl" from drivers/gpu/drm/i915/intel_opregion.c is read/written nowhere. This has as implication that the field is left uninitialized and and code that relies on that field cannot work. So far, the affected hardware I know of are the Clevo B7130 and Clevo H150HRM. The brightness hotkeys emit an ACPI event for the Embedded Controller that checks whether an monitor is connected or not. A part of method _Q11: ============================================================ If (LEqual (^^^GFX0.CDDS (0x0410), 0x1F)) { If (LEqual (OEM2, Zero)) { If (^^^^WMI.HKDR) { Store (0xE0, ^^^^WMI.EVNT) Notify (WMI, 0xD0) } } Else { Notify (^^^GFX0.LCD0, 0x87) } } ============================================================ The CDDS functions checks the fields of CADL, CAL2, ..., CAL8 and returns 0x1F if an active display equals its first argument: ============================================================ Method (CDDS, 1, NotSerialized) { Store (And (Arg0, 0x0F0F), Local0) If (LEqual (Zero, Local0)) { Return (0x1D) } If (LEqual (And (CADL, 0x0F0F), Local0)) { Return (0x1F) } ============================================================ This bug also makes the return value of ACPI method _DCS useless.
Distribution: Kubuntu 11.10 AMD64 Kernel: 3.2.2 (from kernel.org) Hardware: Intel i5 460M with HD graphics (+nvidia GT 425M, not important here) When writing the output of the \_SB.PCI0.GFX0.LCD0._ADR value to the DIDL field, brightness keys works.
More machine information for an earlier bugreport related to brightness via hotkeys is available at: https://bugs.launchpad.net/linux/+bug/806032
Created attachment 61006 [details] Clevo W150HRM acpidump Clevo W150HRM is equally affected: attaching acpidump (BIOS v1.09)
"Temporary" patch has been accepted, patch + acknowledgement: http://lists.freedesktop.org/archives/dri-devel/2012-June/024488.html http://lists.freedesktop.org/archives/dri-devel/2012-June/024529.html Therefore I am marking this bug as resolved.
Merged to dinq as: commit 3e52259264832dc8c8b94c91561f072ab1d192d8 Author: Lekensteyn <lekensteyn@gmail.com> Date: Tue Jun 26 00:36:24 2012 +0200 i915: initialize CADL in opregion
Reopening because the patch had to be dropped - it caused regressions. The issues are now root-caused (it simply brought a pre-existing bug to light), but we first need to fix these bugs before I can merge the cadl patch again. Please do not close this bug before the cadl patch has landed in drm-intel-next - I'll likely lose track of things otherwise ;-)
Okay, I'll let you handle the lock then :) For the interested, a discussion is going on here: http://lists.freedesktop.org/archives/dri-devel/2012-June/024661.html Have you already found out the root cause?
On Fri, Jun 29, 2012 at 5:08 PM, <bugzilla-daemon@freedesktop.org> wrote: > Have you already found out the root cause? Yep, see Message-ID: <20120629144850.GB5463@phenom.ffwll.local> on dri-devel and http://cgit.freedesktop.org/~danvet/drm/log/?h=cpu_edp-abomination for the totally hackish patches ...
Created attachment 64320 [details] acpidump of Asus X401A Hi Peter, Your patch works great on the Asus X401A here, which also has the same problem, i.e. CADL is queried when brightness keys are pressed. Its CDDS method also looks almost the same as the one of Clevo B7130. I have uploaded the acpidump of the Asus X401A, so you can check if your patch can apply equally well to this machine. Thanks!
In the patch code, it treat CADL and DIDL as the same, but from spec, they are different: DIDL is Supported Display Devices ID List and CADL is Currently Attached Display Devices List.So only these IDs in DIDL with connect status can add to CADL, not all IDS in DIDL.
On Tue, Jul 24, 2012 at 10:19 AM, <bugzilla-daemon@freedesktop.org> wrote: > --- Comment #10 from XiongZhang <xiong.y.zhang@intel.com> 2012-07-24 08:19:58 UTC --- > In the patch code, it treat CADL and DIDL as the same, but from spec, they are > different: DIDL is Supported Display Devices ID List and CADL is Currently > Attached Display Devices List.So only these IDs in DIDL with connect status can > add to CADL, not all IDS in DIDL. I know (I even suggested this approach), but this one here gets the job done, so I plan to merge it until something more accurate shows up. If something more accurate is required even.
*** Bug 52042 has been marked as a duplicate of this bug. ***
Created attachment 66537 [details] acpidump of Asus UX32VD
Aahh, at last I found this entry. I was debugging the dsdt from my Asus UX32VD and I came to pretty much similar result. The DID2 field is never initialized, which lets CDDS(DID2) return 0x1d and makes _DCS useless. _DCS is used in _Q0E and _Q0F. The lines in question: ============================================================ Store (And (Arg0, 0x0F0F), Local0) If (LEqual (Zero, Local0)) { Return (0x1D) } ============================================================ used by Q0F: ============================================================ If (LNotEqual (^^^GFX0.LCDD._DCS (), 0x1F)) { Return (One) } ============================================================ Since _DCS returns 0x1d, _Q0E and _Q0F returns silently one, instead of continuing until the Notify event is invoked. Q0E/0F looks similar to your Q11, although _Q0E/F is a little bit more complicated, but the overall structure is the same.
Ooops, wasn't the did2 field. It was exactly the same as the others. Uninitialized cadl. Tried the patch. Works for the UX32VD.
Patch merged (again) to drm-intel-next-queued: commit 036223401d50594c35fc5f7eafdbd2ddbe3ec921 Author: Lekensteyn <lekensteyn@gmail.com> Date: Tue Jun 26 00:36:24 2012 +0200 i915: initialize CADL in opregion
A patch referencing this bug report has been merged in Linux v3.7-rc1: commit d627b62ff8d4d36761adbcd90ff143d79c94ab22 Author: Lekensteyn <lekensteyn@gmail.com> Date: Tue Jun 26 00:36:24 2012 +0200 i915: initialize CADL in opregion
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.