Still use ACPI backlight control if _DOS doesn't exist
Subsystems (2)
This is a regression introduced by commitea9f8856bd6d4ed45885b06a338f7362cd6c60e5
https://bugzilla.kernel.org/show_bug.cgi?id=43168
Some platforms don't have _DOS control method, but the ACPI backlight still works.
We do not want to lose the backlight control ability on these platforms.
[airlied: this is breaking nouveau really badly on 3.4 and after and there is no movement on sending it upstream, so please apply]
--- drivers/acpi/video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/acpi/video.c +8 -2
@@ -565,8 +565,14 @@ acpi_video_bus_DOS(struct acpi_video_bus video->dos_setting = arg0.integer.value; status =acpi_evaluate_object (video->device->handle,"_DOS" , &args,NULL ); -if (ACPI_FAILURE (status)) -return -EIO ; +if (ACPI_FAILURE (status)) { +/* +* some platforms don't have _DOS, but the ACPI +* backlight control still works +*/ +ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"No _DOS\n" )); +return 0 ; + }return 0 ; }
Hi, Dave,
How about this one, which I think is better? :)
http://marc.info/?l=linux-acpi&m=134015703925079&w=2
can you give it a try?
thanks,
rui
Quoted 41 lines · Dave Airlie
This is a regression introduced by commit
ea9f8856bd6d4ed45885b06a338f7362cd6c60e5https://bugzilla.kernel.org/show_bug.cgi?id=43168
Some platforms don't have
_DOScontrol method, but the ACPI backlight still works.
We do not want to lose the backlight control ability on these platforms.[airlied: this is breaking nouveau really badly on 3.4 and after and there is no movement on sending it upstream, so please apply]
Cc Igor Murzov <[email protected]>Signed-off-by Zhang Rui <[email protected]>--- drivers/acpi/video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)Index:
rtd3/drivers/acpi/video.c
===================================================================drivers/acpi/video.c +8
-2@@ -565,8 +565,14 @@ acpi_video_bus_DOS(struct acpi_video_bus video->dos_setting = arg0.integer.value; status =acpi_evaluate_object (video->device->handle,"_DOS" , &args,NULL ); -if (ACPI_FAILURE (status)) -return -EIO ; +if (ACPI_FAILURE (status)) { +/* +* some platforms don't have _DOS, but the ACPI +* backlight control still works +*/ +ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"No _DOS\n" )); +return 0 ; + }return 0 ; }