Re: thinkpad z60m, linux git 2.6.24rcX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 22, 2007 5:29 AM, Arkadiusz Miskiewicz <arekm@xxxxxxxx> wrote:
>
> On Thursday 22 of November 2007, Henrique de Moraes Holschuh wrote:
> > On Thu, 22 Nov 2007, Arkadiusz Miskiewicz wrote:
> > > On Saturday 17 of November 2007, Arkadiusz Miskiewicz wrote:
> > > > On Saturday 17 of November 2007, you wrote:
> > > > > On Sat, 17 Nov 2007, Arkadiusz Miskiewicz wrote:
> > > > > > > I'm using currect linux from 2.6.24 git tree (pulled today). Few
> > > > > > > days ago brightness setting stopped working. Do you have any idea
> > > > > > > which patch could break things before I start bisecting?
> > > > > >
> > > > > > FYI: Tested v0.18-20071112 from sourceforge, too - the same
> > > > > > problem, brightness controll doesn't work.
> > > > >
> > > > > How do you control the brightnes?  Using the keyboard?  Using
> > > > > /proc/acpi/ibm/brightness?  Using something else?
> > > >
> > > > I've pasted log from my /proc tests in first email where I tried to
> > > > control brightness via ibm/brightness and ibm/cmos proc files. Both do
> > > > not work.
> > > >
> > > > Also fn+home, fn+end from keyboard doesn't cause any LCD brightness
> > > > change (only level value in /proc/acpi/ibm/brightness changes).
> > >
> > > I found guilty part. It was radeon opensource X.Org driver. It started
> > > messing with bios_4_scratch and bios_5_scratch (and 6_scratch) registers.
> > >
> > > For example it zeroes all bits in bios_4_scratch (0x0020). I found out
> > > that not touching 3 bit (counting from 0) in bios_4_scratch makes
> > > brightness setting possible again.
> > >
> > > Do you know meaning of this bit?
> >
> > No, but it looks like a "don't mess with it, it is for BIOS use" case to
> > me.
> >
> > > ati driver also messes with 0-3 bits (zeroes these; it actually writes
> > > 0xff00 into 5_scratch register) in bios_5_scratch (0x0024) which AFAIK
> > > keep brightness level, right?
> > >
> > > Are you aware of any other bits that have influence on backlight that
> > > should be not touched?
> >
> > IMO, it appears none of the bios_*_scratch registers should ever be
> > touched, *unless* one knows what they do (perhaps the X.org people *do*
> > know, but *I* don't, and I don't know if they know :-) ).
>
> AFAIK they want to prevent BIOS from messing with the hardware when X is
> active. From what I see this is done only on Mobility chips.
>
> > If they do know what they are doing (which is actually likely), and they do
> > intend to disable backlight control by the BIOS, it means that you need
> > extra setup on a lot of thinkpads when X.org loads.  Worse, it is
> > thinkpad-model dependant.
> >
> > Do you know the email address of the X.org developers responsible for these
> > drivers?  It seems it would be wise to talk to them, and get to know what
> > they need done, so that I can add the model-dependent knowledge inside
> > thinkpad-acpi.  Doing it in userspace (HAL) is going to be trouble.
>
> The change and email address is here (CCed anyway):
> http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-ati.git;a=commit;h=7afd04c1e4ffa6e4e5ba08ae90ba002237dc282b
>
> "RADEON: tell the bios not to muck with the hardware while the driver is
> active
>
> by toggling the appropriate bios scratch regs you can tell
> the bios not the touch the hw while the driver is active.
> This should prevent the bios from scrambling the hardware
> when users open the lid or toggle bios hotkeys."
>
> Which is related to:
> https://bugs.freedesktop.org/show_bug.cgi?id=12567

Just to follow up with this, Arkadiusz is correct.  The bios scratch
regs are used on the radeons to communicate between the bios and the
driver.  We know more or less what most of the bits do.  Arkadiusz'
patch looks correct, I just haven't had a chance to review it fully
yet as I've been on holiday the last few days.  There are several
methods for controlling the backlight on radeon-based laptops which
are unfortunately oem specific, so we'll probably just leave it to the
bios for now until I know more about it.  Starting in December, I will
be doing opensource development and community relations for AMD/ATI
and that's one of the many things I'll be looking into.

Alex

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux