Radeon MC setup cleanup

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Mar 2 12:21:53 PST 2008


On Fri, 2008-02-29 at 17:31 +0100, Maciej Cencora wrote:
> Hi all,
> 
> I'm trying to understand and cleanup MC setup in Radeon DDX driver. 
> Currently it's overcomplicated and sometimes unreliable.
> 
> That's how I understand how MC should be setup. Please check if I 
> understand it correctly.
> 
> When DRI is disabled, fb/agp locations should not change during whole 
> session (even when doing VT switch) so there is no need to save/restore 
> them.

That isn't true. There are machines where the default setup of the MC
will cause the card to crash on the first attempt at using 2D accel.

The memory map must always be sanitized, and hence, saved/restored.
 
> Below I describe the cases when DRI is enabled.
> -- User starts the machine --
> Initial reg values are set by BIOS.

Or by radeonfb or other stuff happening before X takes over.

> -- User starts X --
> 1. Store regs in info->SavedReg.
> 2. Init DRI (it sets new values to fb/agp location regs).
> 3. Save new fb/agp location values to info->ModeReg.

Changing the values is actually hard. As you can see in the code we have
in the server and the numerous comments around it, simply changing thoes
values require interesting "hoops". Maybe AMD can help if there are
still issues in that area.

However, the value change shouldn't be tied to DRI as I said above
-unless- we switch to a model where mode setting etc... is done by the
DRM. In that case, we can probably move the entire low level control on
the aperture setting to the kernel driver, but this has nothing to do
with whether the CP is used or DRI (ie. 3D) is used.

> -- User calls LeaveVT --
> Restore regs from info->SavedReg and do the rest of LeaveVT.
> 
> -- User backs to X (EnterVT) --
> Restore regs from info->ModeReg and do the rest of EnterVT.
> 
> -- User closes X -- (that case is similar to LeaveVT)
> Restore regs from info->SavedReg and do the rest of LeaveVT.

This is -approx- what is done today already no ?

Ben.





More information about the xorg mailing list