xfree86: vgaarb: fix device decoding interface to send resources type properly

Right now, when there is more than one vide card on the machine, we're
adopting a pessimistic approach and setting all cards to decode VGA legacy
address.

Some cards may want to skip the arbitration and the only way to do so is
through pci_device_vgaarb_decodes. Therefore, send the desired kind of
resource instead force the worst case.

Note that xf86VGAarbiterDeviceDecodes is not being used so far by any
open-source driver. Even so, API break.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
This commit is contained in:
Tiago Vignatti 2010-05-12 13:03:14 +03:00
parent 7fbf3e7cf4
commit 6546665293
2 changed files with 4 additions and 3 deletions

View File

@ -138,11 +138,12 @@ xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn)
}
void
xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn)
xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc)
{
if (vga_no_arb)
return;
pci_device_vgaarb_decodes(VGA_ARB_RSRC_LEGACY_MEM | VGA_ARB_RSRC_LEGACY_IO);
pci_device_vgaarb_set_target(pScrn->vgaDev);
pci_device_vgaarb_decodes(rsrc);
}
Bool

View File

@ -40,7 +40,7 @@ extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
/* allow a driver to remove itself from arbiter - really should be
* done in the kernel though */
extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn);
extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
/* DRI and arbiter are really not possible together,
* you really want to remove the card from arbitration if you can */
extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);