Bug 11647

Summary: Multiple virtual ACPI backlight devices created for a single LCD
Product: ACPI Reporter: Mario Limonciello (superm1)
Component: Power-VideoAssignee: Thomas Renninger (trenn)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, Matt_Domsch, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-rc7 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Decompiled DSDT
/sys tree showing multiple backlight devices

Description Mario Limonciello 2008-09-25 11:39:08 UTC
Distribution: Ubuntu 8.10
Hardware Environment: Dell Inspiron 1420, XPS M1330, Inspiron 1525
Problem Description:
It appears that the DSDT from these machines is causing multiple virtual backlight devices to get created in /sys.  Likely this is because the DSDT will work both with the discrete and uma case.

Steps to reproduce:
Browse /sys tree for directory containing backlight devices.  Observe that multiple backlight devices exist and are functional.
Comment 1 Mario Limonciello 2008-09-25 11:41:21 UTC
Created attachment 18042 [details]
Decompiled DSDT

Here is the DSDT from an Inspiron 1420.
Comment 2 Mario Limonciello 2008-09-25 11:42:35 UTC
Created attachment 18043 [details]
/sys tree showing multiple backlight devices
Comment 3 Zhang Rui 2008-09-25 18:06:35 UTC
the _BCM methods of the two video device, which is used to control the backlight, are the same.
So I don't think the AML code is well written.

also there is a patch set from matthew which should fix the duplicate device problem, please give it a try.
in order to get the source code, you need to:

> git-clone git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6
> acpi_test
> git-branch -r
> git-branch --track test origin/test
> git-checkout test
Comment 4 Zhang Rui 2008-09-25 18:12:55 UTC
*** Bug 11557 has been marked as a duplicate of this bug. ***
Comment 5 Mario Limonciello 2008-10-03 14:09:50 UTC
Hi Zhang Rui:

I added this patch to my local video.ko:
http://git.kernel.org/?p=linux/kernel/git/ak/linux-acpi-2.6.git;a=commitdiff;h=3fa2cdcc45a0176de15cac9dbf4ed2834ebf8932#patch1

It does work as expected and restores all 8 video levels.
Comment 6 Zhang Rui 2008-10-05 19:50:02 UTC
good news.
This patch has already been in acpi test tree.
Comment 7 Len Brown 2008-10-16 12:55:42 UTC
exactly what patch what release fixes this issue?
Is this related to bug 9995, for which we tried a patch
and then reverted it?
Comment 8 Mario Limonciello 2008-10-16 13:00:14 UTC
Yes it's that exact same patch that was applied and reverted.
Comment 9 Zhang Rui 2008-10-16 18:06:02 UTC
right.
The patch was dropped because it caused a regression:
The ACPI video backlight I/F for T61 doesn't work any more.
we've root caused that this is a BIOS bug,
and use dmi check to prevent this BOX from using ACPI video backlight I/F.
All this is done in thomas' "video detection" patch set.
Comment 10 Zhang Rui 2008-10-30 00:45:29 UTC
It seems that len forgot to take thomas' "video detection" patch set in Andi's tree.
Thomas is going to post them again. :p

Re-assign this bug to thomas, and we can close it once the patches are sent out.
Comment 11 Zhang Rui 2008-11-17 00:31:50 UTC
patch shipped in 2.6.28-rc4