diff options
author | Dave Airlie <airlied@redhat.com> | 2012-07-17 14:52:05 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-17 14:52:05 +1000 |
commit | a57b784ddfdc9369f6dfe498333c25bfea883e8f (patch) | |
tree | d969d99de2b293faf0423a5f78b3fd49e30669c3 | |
parent | d9a3071242724325d4e3672b3e70d8457f993f78 (diff) |
apm: convert to new screen conversion apis.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/apm_accel.c | 8 | ||||
-rw-r--r-- | src/apm_cursor.c | 6 | ||||
-rw-r--r-- | src/apm_dga.c | 2 | ||||
-rw-r--r-- | src/apm_driver.c | 2 | ||||
-rw-r--r-- | src/apm_regs.h | 6 | ||||
-rw-r--r-- | src/apm_video.c | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/apm_accel.c b/src/apm_accel.c index 140b44e..181b938 100644 --- a/src/apm_accel.c +++ b/src/apm_accel.c @@ -207,7 +207,7 @@ void ApmAccelReserveSpace(ApmPtr pApm) { memType mem, ScratchMemOffset; - mem = xf86Screens[pApm->pScreen->myNum]->videoRam << 10; + mem = xf86ScreenToScrn(pApm->pScreen)->videoRam << 10; /* * Reserve at least four lines for mono to color expansion */ @@ -225,7 +225,7 @@ void ApmAccelReserveSpace(ApmPtr pApm) int ApmAccelInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); APMDECL(pScrn); XAAInfoRecPtr pXAAinfo; BoxRec AvailFBArea; @@ -356,7 +356,7 @@ void ApmSetupXAAInfo(ApmPtr pApm, XAAInfoRecPtr pXAAinfo) pApm->CurrentLayout.Setup_DEC |= DEC_BITDEPTH_32; break; default: - xf86DrvMsg(xf86Screens[pApm->pScreen->myNum]->scrnIndex, X_WARNING, + xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_WARNING, "Cannot set up drawing engine control for bpp = %d\n", pApm->CurrentLayout.bitsPerPixel); break; @@ -383,7 +383,7 @@ void ApmSetupXAAInfo(ApmPtr pApm, XAAInfoRecPtr pXAAinfo) pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_1600; break; default: - xf86DrvMsg(xf86Screens[pApm->pScreen->myNum]->scrnIndex, X_WARNING, + xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_WARNING, "Cannot set up drawing engine control " "for screen width = %d\n", pApm->CurrentLayout.displayWidth); break; diff --git a/src/apm_cursor.c b/src/apm_cursor.c index 3638cf2..1b5d895 100644 --- a/src/apm_cursor.c +++ b/src/apm_cursor.c @@ -56,14 +56,14 @@ void ApmHWCursorReserveSpace(ApmPtr pApm) { pApm->OffscreenReserved += 2 * CURSORALIGN; pApm->DisplayedCursorAddress = pApm->BaseCursorAddress = - pApm->CursorAddress = 1024 * xf86Screens[pApm->pScreen->myNum]->videoRam - + pApm->CursorAddress = 1024 * xf86ScreenToScrn(pApm->pScreen)->videoRam - pApm->OffscreenReserved; } int ApmHWCursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); APMDECL(pScrn); xf86CursorInfoPtr infoPtr; u32 i; @@ -116,7 +116,7 @@ ApmHideCursor(ScrnInfoPtr pScrn) static Bool ApmUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) { - return APMPTR(xf86Screens[pScreen->myNum])->CurrentLayout.bitsPerPixel >= 8; + return APMPTR(xf86ScreenToScrn(pScreen))->CurrentLayout.bitsPerPixel >= 8; } static void diff --git a/src/apm_dga.c b/src/apm_dga.c index dc95a6f..6e92123 100644 --- a/src/apm_dga.c +++ b/src/apm_dga.c @@ -171,7 +171,7 @@ SECOND_PASS: Bool ApmDGAInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); APMDECL(pScrn); DGAModePtr modes = NULL; int num = 0; diff --git a/src/apm_driver.c b/src/apm_driver.c index 62389b0..e40e1c2 100644 --- a/src/apm_driver.c +++ b/src/apm_driver.c @@ -2100,7 +2100,7 @@ ApmDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, static Bool ApmSaveScreen(ScreenPtr pScreen, int mode) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); Bool unblank; unblank = xf86IsUnblank(mode); diff --git a/src/apm_regs.h b/src/apm_regs.h index 3f60eef..8fa8514 100644 --- a/src/apm_regs.h +++ b/src/apm_regs.h @@ -29,19 +29,19 @@ #define RDXL_M(addr) (MMIO_IN32(pApm->MemMap, (addr))) #define WRXB_M(addr,val) do { if (check08((addr), (val))) { \ MMIO_OUT8 (pApm->MemMap, (addr), (val)); \ - /*xf86DrvMsg(xf86Screens[pApm->pScreen->myNum]->scrnIndex, X_INFO, \ + /*xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_INFO, \ "File %s, line %d, %02X <- %02X\n", \ __FILE__, __LINE__, (addr), (val) & 255); */\ curr08[MIN((addr), 0x80)] = (val); }} while (0) #define WRXW_M(addr,val) do { if (check16((addr), (val))) { \ MMIO_OUT16(pApm->MemMap, (addr), (val)); \ - /*xf86DrvMsg(xf86Screens[pApm->pScreen->myNum]->scrnIndex, X_INFO, \ + /*xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_INFO, \ "File %s, line %d, %02X <- %04X\n", \ __FILE__, __LINE__, (addr), (val)&65535); */\ curr16[MIN(((addr) / 2), 0x40)] = (val); }} while (0) #define WRXL_M(addr,val) do { if (check32((addr), (val))) { \ MMIO_OUT32(pApm->MemMap, (addr), (val)); \ - /*xf86DrvMsg(xf86Screens[pApm->pScreen->myNum]->scrnIndex, X_INFO, \ + /*xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_INFO, \ "File %s, line %d, %02X <- %08X\n", \ __FILE__, __LINE__, (addr), (val)); */\ curr32[MIN(((addr) / 4), 0x20)] = (val); }} while (0) diff --git a/src/apm_video.c b/src/apm_video.c index 4b8f132..9b5b601 100644 --- a/src/apm_video.c +++ b/src/apm_video.c @@ -43,7 +43,7 @@ static void A(XvRemoveCB)(FBAreaPtr); void A(InitVideo)(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr *adaptors, *newAdaptors; XF86VideoAdaptorPtr newAdaptor; APMDECL(pScrn); @@ -296,7 +296,7 @@ A(ResetVideo)(ScrnInfoPtr pScrn) static XF86VideoAdaptorPtr A(SetupImageVideo)(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); APMDECL(pScrn); XF86VideoAdaptorPtr adapt; ApmPortPrivPtr pPriv; |