* [PATCH] ACPI: Ignore _BQC object when registering backlight device
@ 2008-03-11 8:56 Zhao Yakui
0 siblings, 0 replies; 5+ messages in thread
From: Zhao Yakui @ 2008-03-11 8:56 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi
Subject: ACPI: Ignore _BQC object when registering backlight device
>From : Zhao Yakui <yakui.zhao@intel.com>
According to acpi spec , the objects of _BCL and _BCM are required if
integrated LCD is present and supports brightness level .The _BQC is
the optional object. So the _BQC object is ignored when the backlight device
is registered in ACPI video driver.
http://bugzilla.kernel.org/show_bug.cgi?id=10206
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/acpi/video.c
===================================================================
--- linux-2.6.orig/drivers/acpi/video.c
+++ linux-2.6/drivers/acpi/video.c
@@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(s
kfree(obj);
- if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+ if (device->cap._BCL && device->cap._BCM && max_level > 0) {
int result;
static int count = 0;
char *name;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ACPI: Ignore _BQC object when registering backlight device
@ 2008-05-29 3:25 Zhao Yakui
0 siblings, 0 replies; 5+ messages in thread
From: Zhao Yakui @ 2008-05-29 3:25 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi
Subject: ACPI: Ignore _BQC object when registering backlight device
>From : Zhao Yakui <yakui.zhao@intel.com>
According to acpi spec , the objectes of _BCL and _BCM are required if
integrated LCD is present and supports brightness level and the _BQC is
the optional object. So the _BQC object will be ignored when the backlight
device is registered.
At the same time when there is no _BQC object, the current brightness will be
set to the maximum.
http://bugzilla.kernel.org/show_bug.cgi?id=10206
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/video.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/acpi/video.c
===================================================================
--- linux-2.6.orig/drivers/acpi/video.c
+++ linux-2.6/drivers/acpi/video.c
@@ -720,7 +720,7 @@ static void acpi_video_device_find_cap(s
kfree(obj);
- if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+ if (device->cap._BCL && device->cap._BCM && max_level > 0) {
int result;
static int count = 0;
char *name;
@@ -732,7 +732,17 @@ static void acpi_video_device_find_cap(s
device->backlight = backlight_device_register(name,
NULL, device, &acpi_backlight_ops);
device->backlight->props.max_brightness = device->brightness->count-3;
- device->backlight->props.brightness = acpi_video_get_brightness(device->backlight);
+ /*
+ * If there exists the _BQC object, the _BQC object will be
+ * called to get the current backlight brightness. Otherwise
+ * the brightness will be set to the maximum.
+ */
+ if (device->cap._BQC)
+ device->backlight->props.brightness =
+ acpi_video_get_brightness(device->backlight);
+ else
+ device->backlight->props.brightness =
+ device->backlight->props.max_brightness;
backlight_update_status(device->backlight);
kfree(name);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ACPI: Ignore _BQC object when registering backlight device
@ 2008-07-17 2:46 Zhao Yakui
2008-07-17 12:44 ` Andi Kleen
0 siblings, 1 reply; 5+ messages in thread
From: Zhao Yakui @ 2008-07-17 2:46 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-acpi, lenb
>From : Zhao Yakui <yakui.zhao@intel.com>
According to acpi spec , the objectes of _BCL and _BCM are required if
integrated LCD is present and supports brightness level and the _BQC is
the optional object. So the _BQC object will be ignored when the backlight
device is registered.
At the same time when there is no _BQC object, the current brightness will be
set to the maximum.
http://bugzilla.kernel.org/show_bug.cgi?id=10206
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
drivers/acpi/video.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/acpi/video.c
===================================================================
--- linux-2.6.orig/drivers/acpi/video.c
+++ linux-2.6/drivers/acpi/video.c
@@ -741,7 +741,7 @@ static void acpi_video_device_find_cap(s
max_level = acpi_video_init_brightness(device);
- if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+ if (device->cap._BCL && device->cap._BCM && max_level > 0) {
int result;
static int count = 0;
char *name;
@@ -753,7 +753,17 @@ static void acpi_video_device_find_cap(s
device->backlight = backlight_device_register(name,
NULL, device, &acpi_backlight_ops);
device->backlight->props.max_brightness = device->brightness->count-3;
- device->backlight->props.brightness = acpi_video_get_brightness(device->backlight);
+ /*
+ * If there exists the _BQC object, the _BQC object will be
+ * called to get the current backlight brightness. Otherwise
+ * the brightness will be set to the maximum.
+ */
+ if (device->cap._BQC)
+ device->backlight->props.brightness =
+ acpi_video_get_brightness(device->backlight);
+ else
+ device->backlight->props.brightness =
+ device->backlight->props.max_brightness;
backlight_update_status(device->backlight);
kfree(name);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Ignore _BQC object when registering backlight device
2008-07-17 2:46 [PATCH] ACPI: Ignore _BQC object when registering backlight device Zhao Yakui
@ 2008-07-17 12:44 ` Andi Kleen
2008-07-17 13:09 ` Matthew Garrett
0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2008-07-17 12:44 UTC (permalink / raw)
To: Zhao Yakui; +Cc: linux-acpi, lenb
Zhao Yakui wrote:
>>From : Zhao Yakui <yakui.zhao@intel.com>
>
> According to acpi spec , the objectes of _BCL and _BCM are required if
> integrated LCD is present and supports brightness level and the _BQC is
> the optional object. So the _BQC object will be ignored when the backlight
> device is registered.
> At the same time when there is no _BQC object, the current brightness will be
> set to the maximum.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=10206
Hmm, but the original patch was reverted. How is this patch better
than the patch that was reverted by Linus?
-Andi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: Ignore _BQC object when registering backlight device
2008-07-17 12:44 ` Andi Kleen
@ 2008-07-17 13:09 ` Matthew Garrett
0 siblings, 0 replies; 5+ messages in thread
From: Matthew Garrett @ 2008-07-17 13:09 UTC (permalink / raw)
To: Andi Kleen; +Cc: Zhao Yakui, linux-acpi, lenb
On Thu, Jul 17, 2008 at 02:44:54PM +0200, Andi Kleen wrote:
> Hmm, but the original patch was reverted. How is this patch better
> than the patch that was reverted by Linus?
The initial patch would have resulted in the screen brightness being set
to minimum (which may be off on some hardware). The new one sets it to
maximum brightness if it's not possible to determine the current
brightness.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-17 13:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 2:46 [PATCH] ACPI: Ignore _BQC object when registering backlight device Zhao Yakui
2008-07-17 12:44 ` Andi Kleen
2008-07-17 13:09 ` Matthew Garrett
-- strict thread matches above, loose matches on Subject: below --
2008-05-29 3:25 Zhao Yakui
2008-03-11 8:56 Zhao Yakui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox