pciaccess clean up
jbarnes at virtuousgeek.org
Mon Mar 3 09:28:11 PST 2008
On Sunday, March 02, 2008 8:32 pm Tiago Vignatti wrote:
> Tiago Vignatti escreveu:
> > I'm tracing why Xorg isn't posting correctly the secondary cards and for
> > sure there's a lot of code (basically xf86pciBus.c) that will be also
> > nuked after this be fixed (btw, is there anyone being able to start a
> > secondary card under master branch today?).
> Hi guys,
> I spent some time comparing what the Xorg without pciaccess (server-1.4
> branch) does different from Xorg with pciaccess (master branch) trying
> to understand what we're missing in this problem above .
> In Xorg without pciaccess the scheme to enable the resources of a given
> card on server initialization is as follows:
> 1. Disable all pci accesses: the bus and pci devices
> 2. Enable current VGA card access:
> xf86EnableAccess() -> pciSetBusAccess()
> xf86EnableAccess() -> pciIo_MemAccessEnable()
> 3. PreInit() phase: if the card is not yet the one which is routing
> the informations, initialize it through int10:
> 4. xf86PostScreenInit() phase:
> xf86EnterServerState() -> setAccess() -> pciMemAccessEnable()
> while in the pciaccess Xorg, only the step 2 is performed. So strange.
> I see that a lot of functions concerning to enable/disable the resources
> in Xorg with pciaccess are commented. In a frustrated attempt I
> uncomment it out but my machine hard frozen and then I preferred to ask
> for some guidance here.
> An interesting thing that motivated me to think that this way of
> enable/disable the resources is the correct to follow was because when I
> initialize one video card using 1.4 branch, exit it nicely and then try
> to initialize the *same* card using the master branch, all succeed fine.
> But when I initialize one video card using 1.4 branch and then
> initialize another one using master branch, the Xorg doesn't runs. IOW,
> Xorg 1.4 knows how to route informations to a given card even if the
> routing is disabled for that card. OTOH, Xorg master doesn't know, so we
> must hook some of that commented code to do these tasks.
> Am I in the right way?
I'm not sure if this is a blocker (guess that would be up to Adam) but yeah it
sounds like we really need your VGA arbitration & routing stuff to land. I
think one advantage of your work over what the old X server did is that it
can coordinate with other drivers...
More information about the xorg