[ltp] Re: Comparison: rovclock and PowerPlay

Alex Deucher linux-thinkpad@linux-thinkpad.org
Wed, 30 Aug 2006 22:42:55 -0400


On 8/30/06, TNKS <0osz0s302@sneakemail.com> wrote:
> David, Alex, (everybody),
>
> In light of the discussion in this thread, I'm a bit confused about what
> fglrx might be doing.
>
> David clearly has ibm_acpi set to translate Fn+F7 keystrokes into ACPI
> events and not mess with the video BIOS (he has some acpid scripts that are
> hooked to these events and they seem to be active).
>
> He also mentioned (in another thread, I think) that messing with
> the /proc/acpi/ibm/video interface directly causes his CRT to flash, but
> nothing more.  He speculated this was because he had fglrx active.
>
> David, I think you're right.  Can you shut down X and see if
> the /proc/acpi/ibm/video interface works for you?  Maybe, just to be safe,
> also "modprobe -r fglrx" as well after shutting down X.  I'm curious
> if /proc/acpi/ibm/video behaves then (at least for the console).
>
> Also, do we have any speculation as to what fglrx might be doing?  I know
> it's pure speculation, but I'm curious none-the-less.

fglrx writes to the hardware directly.  see below for more.

>
> David, I think you alluded that unmasking Fn+F7 from /proc/acpi/ibm/hotkey
> disabled fglrx's video toggling?  If that's the case, do we think that
> fglrx or atieventd is catching ACPI events and translating them to video
> BIOS calls?  Furthermore, these ACPI events are being passed through so
> acpid can catch them too (maybe that's a default behavior of the ACPI spec;
> I don't know).

unmasking the hotkeys reliquishes ibm_acpi's control of them, so
rather then producing acpi events, they function as they are
programmed to in the bios (generally calls into the video bios to
enable or disable outputs).

fglrx, and aticonfig probably don't use the video bios at all.  they
program the registers directly.  I suspect what atieventd does is
listen for acpi events and then programs the the hardware based on the
event it receives.

>
> I have another question that involves my system.  /proc/acpi/ibm/video just
> doesn't work for me, with fglrx active or not.  So I'm assuming that the

IIRC, this doesn't work on every thinkpad.  the acpi methods vary from
thinkpad to thinkpad.  see the chart here:
http://ibm-acpi.sourceforge.net/  You may have to do some additional
work in the ibm-acpi driver to get it working properly.  the acpi dsdt
tables are sort of human readable.  you can disassemble yours using
iasl and read through it.  that's how the ibm-acpi module was written.


> interface to video BIOS is incomplete or broken for my system.  Yet somehow
> `aticonfig --enable-monitor` is able to do what calls to the video BIOS are
> supposed to do.  How is that?  What else might `aticonfig --enable-monitor`
> be doing if not calls to the video BIOS?  Alex, you're probably in a nice
> position to speculate if you've developed the ati open driver.
>


aticonfig has nothing to do with the video bios per se.  It just so
happens that they produce the same result.  the video bios is
basically a mini-driver that resides in the a rom on your video card
and sets the initial mode on your card and provides a standard
interface to some basic funtions like enabling outputs or setting
modes.  So lets say to enable the the CRT port we need to set bit 4 on
register 0x0345 and bits 2 and 3 on register 0x1235.  the video bios
function that fn-f7 calls would set those bits.  when you press fn-f7,
the bios executes the video bios function that writes the approriate
bits to those registers.  when you call aticonfig --enable-monitor,
aticonfig also sets those bits.  A device driver is basically a little
program that writes the appropiate bits to the appopriate registers at
the right time.  The driver (fglrx or radeon) are like more advanced
versions of the video bios.

I hope this clears things up.

Alex


> Thanks for any help in clearing my these questions I have.
>
> - Sukant
>
>