Merge remote branch 'vignatti/vgaarb-fixes'
This commit is contained in:
commit
fa22f97af6
|
@ -138,11 +138,12 @@ xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn)
|
xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc)
|
||||||
{
|
{
|
||||||
if (vga_no_arb)
|
if (vga_no_arb)
|
||||||
return;
|
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
|
Bool
|
||||||
|
@ -266,7 +267,7 @@ VGAarbiterBlockHandler(int i,
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
SCREEN_PROLOG(BlockHandler);
|
SCREEN_PROLOG(BlockHandler);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
|
pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
|
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
|
||||||
|
@ -277,7 +278,7 @@ VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr pScreen = screenInfo.screens[i];
|
||||||
SCREEN_PROLOG(WakeupHandler);
|
SCREEN_PROLOG(WakeupHandler);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
pScreen->WakeupHandler(i, blockData, result, pReadmask);
|
pScreen->WakeupHandler(i, blockData, result, pReadmask);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
|
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
|
||||||
|
@ -295,7 +296,7 @@ VGAarbiterGetImage (
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
SCREEN_PROLOG(GetImage);
|
SCREEN_PROLOG(GetImage);
|
||||||
// if (xf86Screens[pScreen->myNum]->vtSema) {
|
// if (xf86Screens[pScreen->myNum]->vtSema) {
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
// }
|
// }
|
||||||
(*pScreen->GetImage) (pDrawable, sx, sy, w, h,
|
(*pScreen->GetImage) (pDrawable, sx, sy, w, h,
|
||||||
format, planemask, pdstLine);
|
format, planemask, pdstLine);
|
||||||
|
@ -316,7 +317,7 @@ VGAarbiterGetSpans (
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
|
|
||||||
SCREEN_PROLOG (GetSpans);
|
SCREEN_PROLOG (GetSpans);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans);
|
SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans);
|
||||||
|
@ -329,7 +330,7 @@ VGAarbiterSourceValidate (
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
SCREEN_PROLOG (SourceValidate);
|
SCREEN_PROLOG (SourceValidate);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
if (pScreen->SourceValidate)
|
if (pScreen->SourceValidate)
|
||||||
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
|
@ -345,7 +346,7 @@ VGAarbiterCopyWindow(
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
SCREEN_PROLOG (CopyWindow);
|
SCREEN_PROLOG (CopyWindow);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
|
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow);
|
SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow);
|
||||||
|
@ -361,7 +362,7 @@ VGAarbiterClearToBackground (
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
SCREEN_PROLOG ( ClearToBackground);
|
SCREEN_PROLOG ( ClearToBackground);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures);
|
(*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground);
|
SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground);
|
||||||
|
@ -373,7 +374,7 @@ VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usag
|
||||||
PixmapPtr pPix;
|
PixmapPtr pPix;
|
||||||
|
|
||||||
SCREEN_PROLOG ( CreatePixmap);
|
SCREEN_PROLOG ( CreatePixmap);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
|
pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap);
|
SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap);
|
||||||
|
@ -387,7 +388,7 @@ VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank)
|
||||||
Bool val;
|
Bool val;
|
||||||
|
|
||||||
SCREEN_PROLOG (SaveScreen);
|
SCREEN_PROLOG (SaveScreen);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreen->SaveScreen) (pScreen, unblank);
|
val = (*pScreen->SaveScreen) (pScreen, unblank);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen);
|
SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen);
|
||||||
|
@ -404,7 +405,7 @@ VGAarbiterStoreColors (
|
||||||
ScreenPtr pScreen = pmap->pScreen;
|
ScreenPtr pScreen = pmap->pScreen;
|
||||||
|
|
||||||
SCREEN_PROLOG (StoreColors);
|
SCREEN_PROLOG (StoreColors);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreen->StoreColors) (pmap,ndef,pdefs);
|
(*pScreen->StoreColors) (pmap,ndef,pdefs);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors);
|
SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors);
|
||||||
|
@ -419,7 +420,7 @@ VGAarbiterRecolorCursor (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SCREEN_PROLOG (RecolorCursor);
|
SCREEN_PROLOG (RecolorCursor);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed);
|
(*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor);
|
SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor);
|
||||||
|
@ -435,7 +436,7 @@ VGAarbiterRealizeCursor (
|
||||||
Bool val;
|
Bool val;
|
||||||
|
|
||||||
SCREEN_PROLOG (RealizeCursor);
|
SCREEN_PROLOG (RealizeCursor);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor);
|
val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor);
|
SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor);
|
||||||
|
@ -452,7 +453,7 @@ VGAarbiterUnrealizeCursor (
|
||||||
Bool val;
|
Bool val;
|
||||||
|
|
||||||
SCREEN_PROLOG (UnrealizeCursor);
|
SCREEN_PROLOG (UnrealizeCursor);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor);
|
val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor);
|
SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor);
|
||||||
|
@ -469,7 +470,7 @@ VGAarbiterDisplayCursor (
|
||||||
Bool val;
|
Bool val;
|
||||||
|
|
||||||
SCREEN_PROLOG (DisplayCursor);
|
SCREEN_PROLOG (DisplayCursor);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
|
val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor);
|
SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor);
|
||||||
|
@ -486,7 +487,7 @@ VGAarbiterSetCursorPosition (
|
||||||
Bool val;
|
Bool val;
|
||||||
|
|
||||||
SCREEN_PROLOG (SetCursorPosition);
|
SCREEN_PROLOG (SetCursorPosition);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
|
val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition);
|
SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition);
|
||||||
|
@ -500,7 +501,7 @@ VGAarbiterAdjustFrame(int index, int x, int y, int flags)
|
||||||
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
||||||
&pScreen->devPrivates, VGAarbiterScreenKey);
|
&pScreen->devPrivates, VGAarbiterScreenKey);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreenPriv->AdjustFrame)(index, x, y, flags);
|
(*pScreenPriv->AdjustFrame)(index, x, y, flags);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
}
|
}
|
||||||
|
@ -513,7 +514,7 @@ VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags)
|
||||||
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
||||||
&pScreen->devPrivates, VGAarbiterScreenKey);
|
&pScreen->devPrivates, VGAarbiterScreenKey);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = (*pScreenPriv->SwitchMode)(index, mode, flags);
|
val = (*pScreenPriv->SwitchMode)(index, mode, flags);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
return val;
|
return val;
|
||||||
|
@ -528,7 +529,7 @@ VGAarbiterEnterVT(int index, int flags)
|
||||||
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
||||||
&pScreen->devPrivates, VGAarbiterScreenKey);
|
&pScreen->devPrivates, VGAarbiterScreenKey);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
pScrn->EnterVT = pScreenPriv->EnterVT;
|
pScrn->EnterVT = pScreenPriv->EnterVT;
|
||||||
val = (*pScrn->EnterVT)(index, flags);
|
val = (*pScrn->EnterVT)(index, flags);
|
||||||
pScreenPriv->EnterVT = pScrn->EnterVT;
|
pScreenPriv->EnterVT = pScrn->EnterVT;
|
||||||
|
@ -545,7 +546,7 @@ VGAarbiterLeaveVT(int index, int flags)
|
||||||
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
||||||
&pScreen->devPrivates, VGAarbiterScreenKey);
|
&pScreen->devPrivates, VGAarbiterScreenKey);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
pScrn->LeaveVT = pScreenPriv->LeaveVT;
|
pScrn->LeaveVT = pScreenPriv->LeaveVT;
|
||||||
(*pScreenPriv->LeaveVT)(index, flags);
|
(*pScreenPriv->LeaveVT)(index, flags);
|
||||||
pScreenPriv->LeaveVT = pScrn->LeaveVT;
|
pScreenPriv->LeaveVT = pScrn->LeaveVT;
|
||||||
|
@ -560,7 +561,7 @@ VGAarbiterFreeScreen(int index, int flags)
|
||||||
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
|
||||||
&pScreen->devPrivates, VGAarbiterScreenKey);
|
&pScreen->devPrivates, VGAarbiterScreenKey);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*pScreenPriv->FreeScreen)(index, flags);
|
(*pScreenPriv->FreeScreen)(index, flags);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
}
|
}
|
||||||
|
@ -573,7 +574,7 @@ VGAarbiterCreateGC(GCPtr pGC)
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
SCREEN_PROLOG(CreateGC);
|
SCREEN_PROLOG(CreateGC);
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
ret = (*pScreen->CreateGC)(pGC);
|
ret = (*pScreen->CreateGC)(pGC);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
|
@ -662,10 +663,11 @@ VGAarbiterFillSpans(
|
||||||
int *pwidthInit,
|
int *pwidthInit,
|
||||||
int fSorted )
|
int fSorted )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
|
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,10 +681,11 @@ VGAarbiterSetSpans(
|
||||||
int nspans,
|
int nspans,
|
||||||
int fSorted )
|
int fSorted )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
|
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,11 +699,12 @@ VGAarbiterPutImage(
|
||||||
int format,
|
int format,
|
||||||
char *pImage )
|
char *pImage )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
|
(*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
|
||||||
leftPad, format, pImage);
|
leftPad, format, pImage);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -714,12 +718,12 @@ VGAarbiterCopyArea(
|
||||||
int dstx, int dsty )
|
int dstx, int dsty )
|
||||||
{
|
{
|
||||||
RegionPtr ret;
|
RegionPtr ret;
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
ret = (*pGC->ops->CopyArea)(pSrc, pDst,
|
ret = (*pGC->ops->CopyArea)(pSrc, pDst,
|
||||||
pGC, srcx, srcy, width, height, dstx, dsty);
|
pGC, srcx, srcy, width, height, dstx, dsty);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -735,12 +739,12 @@ VGAarbiterCopyPlane(
|
||||||
unsigned long bitPlane )
|
unsigned long bitPlane )
|
||||||
{
|
{
|
||||||
RegionPtr ret;
|
RegionPtr ret;
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy,
|
ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy,
|
||||||
width, height, dstx, dsty, bitPlane);
|
width, height, dstx, dsty, bitPlane);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -753,10 +757,11 @@ VGAarbiterPolyPoint(
|
||||||
int npt,
|
int npt,
|
||||||
xPoint *pptInit )
|
xPoint *pptInit )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
|
(*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,10 +774,11 @@ VGAarbiterPolylines(
|
||||||
int npt,
|
int npt,
|
||||||
DDXPointPtr pptInit )
|
DDXPointPtr pptInit )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
|
(*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -783,10 +789,11 @@ VGAarbiterPolySegment(
|
||||||
int nseg,
|
int nseg,
|
||||||
xSegment *pSeg )
|
xSegment *pSeg )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
|
(*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -797,10 +804,11 @@ VGAarbiterPolyRectangle(
|
||||||
int nRectsInit,
|
int nRectsInit,
|
||||||
xRectangle *pRectsInit )
|
xRectangle *pRectsInit )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
|
(*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,10 +819,11 @@ VGAarbiterPolyArc(
|
||||||
int narcs,
|
int narcs,
|
||||||
xArc *parcs )
|
xArc *parcs )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
|
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -827,10 +836,11 @@ VGAarbiterFillPolygon(
|
||||||
int count,
|
int count,
|
||||||
DDXPointPtr ptsIn )
|
DDXPointPtr ptsIn )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn);
|
(*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -841,10 +851,11 @@ VGAarbiterPolyFillRect(
|
||||||
int nrectFill,
|
int nrectFill,
|
||||||
xRectangle *prectInit)
|
xRectangle *prectInit)
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
|
(*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,10 +866,11 @@ VGAarbiterPolyFillArc(
|
||||||
int narcs,
|
int narcs,
|
||||||
xArc *parcs )
|
xArc *parcs )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
|
(*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,11 +884,11 @@ VGAarbiterPolyText8(
|
||||||
char *chars )
|
char *chars )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
|
ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -891,11 +903,11 @@ VGAarbiterPolyText16(
|
||||||
unsigned short *chars )
|
unsigned short *chars )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
|
ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -909,10 +921,11 @@ VGAarbiterImageText8(
|
||||||
int count,
|
int count,
|
||||||
char *chars )
|
char *chars )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
|
(*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -925,10 +938,11 @@ VGAarbiterImageText16(
|
||||||
int count,
|
int count,
|
||||||
unsigned short *chars )
|
unsigned short *chars )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
|
(*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,11 +956,12 @@ VGAarbiterImageGlyphBlt(
|
||||||
CharInfoPtr *ppci,
|
CharInfoPtr *ppci,
|
||||||
pointer pglyphBase )
|
pointer pglyphBase )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit,
|
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit,
|
||||||
nglyph, ppci, pglyphBase);
|
nglyph, ppci, pglyphBase);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -959,11 +974,12 @@ VGAarbiterPolyGlyphBlt(
|
||||||
CharInfoPtr *ppci,
|
CharInfoPtr *ppci,
|
||||||
pointer pglyphBase )
|
pointer pglyphBase )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit,
|
(*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit,
|
||||||
nglyph, ppci, pglyphBase);
|
nglyph, ppci, pglyphBase);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,10 +990,11 @@ VGAarbiterPushPixels(
|
||||||
DrawablePtr pDraw,
|
DrawablePtr pDraw,
|
||||||
int dx, int dy, int xOrg, int yOrg )
|
int dx, int dy, int xOrg, int yOrg )
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pGC->pScreen;
|
||||||
GC_UNWRAP(pGC);
|
GC_UNWRAP(pGC);
|
||||||
VGAGet_GC();
|
VGAGet(pScreen);
|
||||||
(*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
|
(*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
|
||||||
VGAPut_GC();
|
VGAPut();
|
||||||
GC_WRAP(pGC);
|
GC_WRAP(pGC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -988,7 +1005,7 @@ VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pC
|
||||||
{
|
{
|
||||||
Bool val;
|
Bool val;
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur);
|
val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1000,7 +1017,7 @@ VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr
|
||||||
{
|
{
|
||||||
Bool val;
|
Bool val;
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur);
|
val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1011,7 +1028,7 @@ static void
|
||||||
VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y)
|
VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y)
|
||||||
{
|
{
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y);
|
PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1021,7 +1038,7 @@ static void
|
||||||
VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
||||||
{
|
{
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y);
|
PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1032,7 +1049,7 @@ VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
Bool val;
|
Bool val;
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
|
val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1043,7 +1060,7 @@ static void
|
||||||
VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
SPRITE_PROLOG;
|
SPRITE_PROLOG;
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
|
PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
SPRITE_EPILOG;
|
SPRITE_EPILOG;
|
||||||
|
@ -1060,7 +1077,7 @@ VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
|
||||||
|
|
||||||
PICTURE_PROLOGUE(Composite);
|
PICTURE_PROLOGUE(Composite);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst,
|
(*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst,
|
||||||
yDst, width, height);
|
yDst, width, height);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
|
@ -1077,7 +1094,7 @@ VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
|
|
||||||
PICTURE_PROLOGUE(Glyphs);
|
PICTURE_PROLOGUE(Glyphs);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
|
(*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs);
|
PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs);
|
||||||
|
@ -1092,7 +1109,7 @@ VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRe
|
||||||
|
|
||||||
PICTURE_PROLOGUE(CompositeRects);
|
PICTURE_PROLOGUE(CompositeRects);
|
||||||
|
|
||||||
VGAGet();
|
VGAGet(pScreen);
|
||||||
(*ps->CompositeRects)(op, pDst, color, nRect, rects);
|
(*ps->CompositeRects)(op, pDst, color, nRect, rects);
|
||||||
VGAPut();
|
VGAPut();
|
||||||
PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
|
PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects);
|
||||||
|
|
|
@ -40,7 +40,7 @@ extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
/* allow a driver to remove itself from arbiter - really should be
|
/* allow a driver to remove itself from arbiter - really should be
|
||||||
* done in the kernel though */
|
* 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,
|
/* DRI and arbiter are really not possible together,
|
||||||
* you really want to remove the card from arbitration if you can */
|
* you really want to remove the card from arbitration if you can */
|
||||||
extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
|
extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
|
||||||
|
|
|
@ -93,23 +93,16 @@
|
||||||
(VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\
|
(VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\
|
||||||
(x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs;
|
(x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs;
|
||||||
|
|
||||||
#define GC_SCREEN register ScrnInfoPtr pScrn = \
|
static inline void
|
||||||
xf86Screens[pGC->pScreen->myNum]
|
VGAGet(ScreenPtr pScreen) {
|
||||||
|
pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev);
|
||||||
#define VGAGet(x)\
|
|
||||||
pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev); \
|
|
||||||
pci_device_vgaarb_lock();
|
pci_device_vgaarb_lock();
|
||||||
|
}
|
||||||
|
|
||||||
#define VGAGet_GC(x)\
|
static inline void
|
||||||
pci_device_vgaarb_set_target(xf86Screens[pGC->pScreen->myNum]->vgaDev); \
|
VGAPut(void) {
|
||||||
pci_device_vgaarb_lock();
|
|
||||||
|
|
||||||
#define VGAPut(x)\
|
|
||||||
pci_device_vgaarb_unlock();
|
pci_device_vgaarb_unlock();
|
||||||
|
}
|
||||||
#define VGAPut_GC(x)\
|
|
||||||
pci_device_vgaarb_unlock();
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _VGAarbiterScreen {
|
typedef struct _VGAarbiterScreen {
|
||||||
CreateGCProcPtr CreateGC;
|
CreateGCProcPtr CreateGC;
|
||||||
|
|
Loading…
Reference in New Issue