On Tue, Dec 10, 2002 at 01:45:09PM +0100, Charl P. Botha wrote:
>On Tue, 2002-12-10 at 13:36, Alan Hourihane wrote:
>> One thing though. It doesn't look like it's hooked to any APM events.
>> 
>> It's just run generically everytime on ModeInit. What happens when you
>> VT switch - does it handle them cases too ?
>
>At the moment it's called from RADEONEnterVT() in radeon_driver.c - so
>the code is called after every VT switch.  During normal operation this
>doesn't cause any problems as it's idempotent.  I would prefer hooking
>it more specifically to a power event... however, last time I checked
>the infrastructure for non-APM power events didn't seem to be ready. 
>Many people are using this on ACPI-only laptops with swsusp for software
>suspension.

If you're restoring HW state required for the correct operation of the
driver, and especially if it's state that something else driving the
video card might change while the X server doesn't have control over
it, then it should be done from EnterVT().  As a general rule, any HW
state that's set in ScreenInit() should also be set in EnterVT().

By default, XFree86 handles APM events via EnterVT/LeaveVT.  It's possible
for a driver to provide a separate function to handle PM events, but in
most cases it shouldn't be needed.

I just had another look at your patch, and I didn't see any obvious
problem with the way it's structured.  Send it to [EMAIL PROTECTED],
and Kevin Martin can review it.

David
--
David Dawes
Release Engineer/Architect                      The XFree86 Project
www.XFree86.org/~dawes


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to