Subject : rc6+ regression - backlight reset to 0 on boot after 7c0ea45be4f114d85ee35caeead8e1660699c46f
Submitter : Andrey Borzenkov <email@example.com>
Date : 2008-04-02 22:53
References : http://lkml.org/lkml/2008/4/2/366
This entry is being used for tracking a regression from 2.6.24. Please don't
close it until the problem is fixed in the mainline.
Author: Zhao Yakui <firstname.lastname@example.org>
Date: Tue Mar 11 16:56:47 2008 +0800
ACPI: Ignore _BQC object when registering backlight device
Signed-off-by: Zhao Yakui <email@example.com>
Signed-off-by: Zhang Rui <firstname.lastname@example.org>
Signed-off-by: Len Brown <email@example.com>
Created attachment 15586 [details]
try the debug patch
Will you please try the debug patch and see whether the problem still exists?
It is unnecessary to update the status of backligth in boot phase if the _BQC object is missing.
Created attachment 15588 [details]
acpidump from Toshiba Portege 4000
Will you please try the debug patch in comment #2 and see whether the problem still exists?
well, it removes this immediate problem but I still think this commit has to be removed and discussed more; see detailed explanations in LKML thread.
Shouldn't the brightness set at boot/init time once if there is no _BQC, or better set/assume brightness->curr to max_brightness in this case?
Everything is better than zero if there is no BQC?
device->backlight->props.max_brightness = device->brightness->count-3;
+ if (!device->cap._BQC)
+ device->brightness->curr = device->backlight->props.max_brightness;
It is OK to set the max brightness when there is no _BQC object.
In this case brightness->curr can be initialized correctly.
It is *not* OK to set brightness to some arbitrary value. There is no reason to believe it is initialized to max either (what if user boots on battery?).
The only sane thing we can do - do not touch it at all and clearly indicate it to user. Then it is up to user to (try to) change it.
After discussion with Richard I will try to provide patch later this week that
a) initialize brightness to -1 if no _BQC
b) never tries to change brightness in HW if it is -1
c) emits warning on init if no _BQC so user at least knows what's going on
d) always returns -1 if _BQC is not available indicating to user that this value is not known
(In reply to comment #8)
> After discussion with Richard I will try to provide patch later this week
> d) always returns -1 if _BQC is not available indicating to user that this
> value is not known
this doesn't make sense to me.
If it always returns -1, how can user get to know the current brightness levels? how can user set the current brightness level?
IMO, if a value gotten from _BCL can be set to _BCM correctly, we can say that it is the current brightness level, even without _BQC method. :)
Fixed by: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=797de7bdb253624c16144f40b72ec65d63cdcca2