Re: Check for ACPI backlight support otherwise use vendor ACPIdrivers - version 4

Yves-Alexis Perez
2008-08-05T05:57:25Z

[-- Attachment #1: Type: text/plain, Size: 2881 bytes --]

On lun, 2008-08-04 at 21:01 -0300, Henrique de Moraes Holschuh wrote:
> On Mon, 04 Aug 2008, Thomas Renninger wrote:
> > On Monday 04 August 2008 08:09:52 Yves-Alexis Perez wrote:
> > > When booting to single user with acpi_backlight=vendor, thinkpad-acpi
> > > takes over backlight:
> > >
> > > Aug 4 07:54:38 hidalgo kernel:
> > > thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
>
> See that one?

Hmhm yeah but then I have:
Aug 4 07:54:38 hidalgo kernel: thinkpad_acpi: Standard ACPI backlight interface not available, thinkpad_acpi driver will take over control

> > > But when in user mode, brightness keys doesn't do anything either.
> > > Echo'ing to /proc/acpi/ibm/brightness doesn't work, but echoing
> > > to /sys/class/backlight/thinkpad_screen/brightness works.
> > That /proc/acpi/ibm/brightness does not and
> > /sys/class/backlight/thinkpad_screen/brightness
> > works is strange, this should be a bug?
>
> No. It is just that the driver expects ACPI video to be sending the events,
> and it isn't, so you need to change some code in hotkey_init to stop
> disabling brightness events in the (ACPI video support in DSDT, ACPI video
> disabled and thinkpad-acpi is to handle the backlight) case.

Hmhm ok, so the thinkpad-acpi related patch miss some case handling
anyway?

> > Attached patch might help you (with acpi_backlight=vendor)?
> > You should be able to apply this on my latest patchset, but use this patch
> > instead of the thinkpad_acpi one.
>
> HEAVY NAK on the thinkpad-acpi hunks in this one. It is good for testing,
> but I don't want any automated handling of the brightness hotkeys in
> thinkpad-acpi unless we absolutely HAVE to emulate the older non-Vista
> firmware for some weird reason. More on this at the end of this post.

Anyway I'd prefer going the “normal” way and use video.ko.

>
> Please check if updating hotkey_init doesn't solve the issue. I am sorry I
> didn't recall that detail to remind you about it when I looked your patches
> over.

How should I update hotkey_init? Check for acpi_backlight=vendor and not
disable brightness event?

> > > Cat'ing /proc/acpi/events still gives:
> > > video LCD0 00000086 00000000
> > > video LCD0 00000087 00000000
> > >
> > > At one time I get the 750ms delay, but I don't have the
> > > ibm/hotkey HKEY 00000080 00005010 at all.
>
> This is caused by EC+ACPI DSDT access. Switch thinkpad-acpi brightness_mode
> to use only ACPI DSDT ("CMOS" mode), and it should go away. This should be
> the default on all Lenovo, though.

Hmmh, that's weird because I don't think I'm messing with the
brightness_mode options. But I can force it to use only CMOS mode and
test.

Anyway, I wasn't yet able to test Matthew's patches, they're not yet in
drm-2.6/master.

Cheers,
--
Yves-Alexis

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]