summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-06-04 17:10:07 -0400
committerAdam Jackson <ajax@redhat.com>2010-06-04 17:29:49 -0400
commit413eee03287b6e161ce0337df712099b585aa722 (patch)
tree860f9dd3ebf0e161f9f90885f72dce7bfbc43c43
parentaa26b72a5f76012e8246de1e885f707f29e5fc4c (diff)
Remove non-linear framebuffer mapping
It hasn't worked since the pciaccess conversion anyway. Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--man/apm.man4
-rw-r--r--src/apm.h1
-rw-r--r--src/apm_accel.c493
-rw-r--r--src/apm_dga.c16
-rw-r--r--src/apm_driver.c255
-rw-r--r--src/apm_funcs.c38
-rw-r--r--src/apm_video.c9
7 files changed, 229 insertions, 587 deletions
diff --git a/man/apm.man b/man/apm.man
index 62535fc..15e501d 100644
--- a/man/apm.man
+++ b/man/apm.man
@@ -67,10 +67,6 @@ Enable or disable the hardware cursor. Default: on.
.BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable or enable acceleration. Default: acceleration is enabled.
.TP
-.BI "Option \*qNoLinear\*q \*q" boolean \*q
-Disable or enable use of linear frame buffer. Default: on.
-Note: it may or may not work. Tell me if you need it.
-.TP
.BI "Option \*qPciRetry\*q \*q" boolean \*q
Enable or disable PCI retries. Default: off.
.TP
diff --git a/src/apm.h b/src/apm.h
index bc66714..c51c258 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -116,7 +116,6 @@ typedef struct {
unsigned int saveCmd;
pointer FontInfo;
Bool hwCursor;
- Bool noLinear;
ApmRegStr ModeReg, SavedReg;
CloseScreenProcPtr CloseScreen;
Bool UsePCIRetry; /* Do we use PCI-retry or busy-waiting */
diff --git a/src/apm_accel.c b/src/apm_accel.c
index 4526097..ed73d8d 100644
--- a/src/apm_accel.c
+++ b/src/apm_accel.c
@@ -32,14 +32,7 @@ static unsigned char apmROP[] = {
#include "apm_funcs.c"
-#define IOP_ACCESS
-#include "apm_funcs.c"
-
-#define PSZ 24
-#include "apm_funcs.c"
-
#define PSZ 24
-#define IOP_ACCESS
#include "apm_funcs.c"
static void
@@ -279,21 +272,11 @@ ApmAccelInit(ScreenPtr pScreen)
i = 4;
else
i = 8;
- if (pApm->noLinear) {
- stat = RDXL_IOP(0x1FC);
- while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) ||
- ((stat & STATUS_FIFO) < i)) {
- WRXB_IOP(0x1FC, 0);
- stat = RDXL_IOP(0x1FC);
- }
- }
- else {
+ stat = RDXL_M(0x1FC);
+ while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) ||
+ ((stat & STATUS_FIFO) < i)) {
+ WRXB_M(0x1FC, 0);
stat = RDXL_M(0x1FC);
- while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) ||
- ((stat & STATUS_FIFO) < i)) {
- WRXB_M(0x1FC, 0);
- stat = RDXL_M(0x1FC);
- }
}
/* Setup current register values */
@@ -316,26 +299,14 @@ ApmAccelInit(ScreenPtr pScreen)
ApmSetupXAAInfo(pApm, pXAAinfo);
- if (!pApm->noLinear) {
- pApm->SetupForSolidFill = ApmSetupForSolidFill;
- pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect;
- pApm->SetupForSolidFill24 = ApmSetupForSolidFill24;
- pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24;
- pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy;
- pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy;
- pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24;
- pApm->SubsequentScreenToScreenCopy24 = ApmSubsequentScreenToScreenCopy24;
- }
- else {
- pApm->SetupForSolidFill = ApmSetupForSolidFill_IOP;
- pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect_IOP;
- pApm->SetupForSolidFill24 = ApmSetupForSolidFill24_IOP;
- pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24_IOP;
- pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy_IOP;
- pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy_IOP;
- pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24_IOP;
- pApm->SubsequentScreenToScreenCopy24 = ApmSubsequentScreenToScreenCopy24_IOP;
- }
+ pApm->SetupForSolidFill = ApmSetupForSolidFill;
+ pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect;
+ pApm->SetupForSolidFill24 = ApmSetupForSolidFill24;
+ pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24;
+ pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy;
+ pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy;
+ pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24;
+ pApm->SubsequentScreenToScreenCopy24= ApmSubsequentScreenToScreenCopy24;
/*
* Init Rush extension.
@@ -427,334 +398,168 @@ void ApmSetupXAAInfo(ApmPtr pApm, XAAInfoRecPtr pXAAinfo)
pXAAinfo->CacheMonoStipple = ApmCacheMonoStipple;
if (pApm->CurrentLayout.bitsPerPixel != 24) {
- if (!pApm->noLinear) {
#define XAA(s) pXAAinfo->s = Apm##s
- if (pApm->Chipset < AT24)
- pXAAinfo->Sync = ApmSync6422;
- else
- XAA(Sync);
-
- /* Accelerated filled rectangles */
- pXAAinfo->SolidFillFlags = NO_PLANEMASK;
- XAA(SetupForSolidFill);
- XAA(SubsequentSolidFillRect);
-
- /* Accelerated screen to screen color expansion */
- pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenColorExpandFill);
- XAA(SubsequentScreenToScreenColorExpandFill);
-
-#if 0
- The constraints of the transfer range are incompatible with the
- XAA architecture. I rewrote the XAA functions using ImageWrite
- /* Accelerated CPU to screen color expansion */
- if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
- pApm->Chipset == AT3D) {
- pXAAinfo->CPUToScreenColorExpandFillFlags =
- NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
- | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
- LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
- XAA(SetupForCPUToScreenColorExpandFill);
- XAA(SubsequentCPUToScreenColorExpandFill);
- pXAAinfo->ColorExpandBase = pApm->BltMap;
- pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
- }
-
- /* Accelerated image transfers */
- pXAAinfo->ImageWriteFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
- SYNC_AFTER_IMAGE_WRITE;
- pXAAinfo->ImageWriteBase = pApm->BltMap;
- pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
- XAA(SetupForImageWrite);
- XAA(SubsequentImageWriteRect);
-#endif
- pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(WritePixmap);
- pXAAinfo->FillImageWriteRectsFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(FillImageWriteRects);
- pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
- BIT_ORDER_IN_BYTE_LSBFIRST;
- XAA(WriteBitmap);
- pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(TEGlyphRenderer);
-
- /* Accelerated screen-screen bitblts */
- pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenCopy);
- XAA(SubsequentScreenToScreenCopy);
-
- /* Accelerated Line drawing */
- pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
- XAA(SetClippingRectangle);
- pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
-
- if (pApm->Chipset >= AT24) {
- XAA(SubsequentSolidBresenhamLine);
-
- /* Pattern fill */
- pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK |
- HARDWARE_PATTERN_PROGRAMMED_BITS |
- HARDWARE_PATTERN_SCREEN_ORIGIN;
- XAA(SetupForMono8x8PatternFill);
- XAA(SubsequentMono8x8PatternFillRect);
- if (pApm->CurrentLayout.bitsPerPixel == 8) {
- pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
- HARDWARE_PATTERN_SCREEN_ORIGIN;
- XAA(SetupForColor8x8PatternFill);
- XAA(SubsequentColor8x8PatternFillRect);
- }
- }
- else
- pXAAinfo->SubsequentSolidBresenhamLine =
- ApmSubsequentSolidBresenhamLine6422;
-#undef XAA
- }
- else {
-#define XAA(s) pXAAinfo->s = Apm##s##_IOP
- if (pApm->Chipset < AT24)
- pXAAinfo->Sync = ApmSync6422_IOP;
- else
- XAA(Sync);
-
- /* Accelerated filled rectangles */
- pXAAinfo->SolidFillFlags = NO_PLANEMASK;
- XAA(SetupForSolidFill);
- XAA(SubsequentSolidFillRect);
-
- /* Accelerated screen to screen color expansion */
- pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenColorExpandFill);
- XAA(SubsequentScreenToScreenColorExpandFill);
-
-#if 0
- The constraints of the transfer range are incompatible with the
- XAA architecture. I rewrote the XAA functions using ImageWrite
- /* Accelerated CPU to screen color expansion */
- if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
- pApm->Chipset == AT3D) {
- pXAAinfo->CPUToScreenColorExpandFillFlags =
- NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
- | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
- LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
- XAA(SetupForCPUToScreenColorExpandFill);
- XAA(SubsequentCPUToScreenColorExpandFill);
- pXAAinfo->ColorExpandBase = pApm->BltMap;
- pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
- }
-
- /* Accelerated image transfers */
- pXAAinfo->ImageWriteFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD;
- pXAAinfo->ImageWriteBase = pApm->BltMap;
- pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
- XAA(SetupForImageWrite);
- XAA(SubsequentImageWriteRect);
-#endif
- pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(WritePixmap);
- pXAAinfo->FillImageWriteRectsFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(FillImageWriteRects);
- pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
- BIT_ORDER_IN_BYTE_LSBFIRST;
- XAA(WriteBitmap);
- pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(TEGlyphRenderer);
-
- /* Accelerated screen-screen bitblts */
- pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenCopy);
- XAA(SubsequentScreenToScreenCopy);
-
- /* Accelerated Line drawing */
- pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
- XAA(SetClippingRectangle);
- pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
-
- if (pApm->Chipset >= AT24) {
- XAA(SubsequentSolidBresenhamLine);
-
- /* Pattern fill */
- pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK |
- HARDWARE_PATTERN_PROGRAMMED_BITS |
- HARDWARE_PATTERN_SCREEN_ORIGIN;
- XAA(SetupForMono8x8PatternFill);
- XAA(SubsequentMono8x8PatternFillRect);
- if (pApm->CurrentLayout.bitsPerPixel == 8) {
- pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
- HARDWARE_PATTERN_SCREEN_ORIGIN;
- XAA(SetupForColor8x8PatternFill);
- XAA(SubsequentColor8x8PatternFillRect);
- }
- }
- else
- pXAAinfo->SubsequentSolidBresenhamLine =
- ApmSubsequentSolidBresenhamLine6422_IOP;
-#undef XAA
- }
- }
- else {
- if (!pApm->noLinear) {
-#define XAA(s) pXAAinfo->s = Apm##s##24
+ if (pApm->Chipset < AT24)
+ pXAAinfo->Sync = ApmSync6422;
+ else
XAA(Sync);
- /* Accelerated filled rectangles */
- pXAAinfo->SolidFillFlags = NO_PLANEMASK;
- XAA(SetupForSolidFill);
- XAA(SubsequentSolidFillRect);
+ /* Accelerated filled rectangles */
+ pXAAinfo->SolidFillFlags = NO_PLANEMASK;
+ XAA(SetupForSolidFill);
+ XAA(SubsequentSolidFillRect);
-#if 0
- /* Accelerated screen to screen color expansion */
- pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenColorExpandFill);
- XAA(SubsequentScreenToScreenColorExpandFill);
+ /* Accelerated screen to screen color expansion */
+ pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
+ XAA(SetupForScreenToScreenColorExpandFill);
+ XAA(SubsequentScreenToScreenColorExpandFill);
#if 0
- The constraints of the transfer range are incompatible with the
- XAA architecture. I rewrote the XAA functions using ImageWrite
- /* Accelerated CPU to screen color expansion */
- if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
- pXAAinfo->CPUToScreenColorExpandFillFlags =
- NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
- | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
- LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
- XAA(SetupForCPUToScreenColorExpandFill);
- XAA(SubsequentCPUToScreenColorExpandFill);
- pXAAinfo->ColorExpandBase = pApm->BltMap;
- pXAAinfo->ColorExpandRange = 32*1024;
- }
+ The constraints of the transfer range are incompatible with the
+ XAA architecture. I rewrote the XAA functions using ImageWrite
+ /* Accelerated CPU to screen color expansion */
+ if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
+ pApm->Chipset == AT3D) {
+ pXAAinfo->CPUToScreenColorExpandFillFlags =
+ NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
+ | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
+ XAA(SetupForCPUToScreenColorExpandFill);
+ XAA(SubsequentCPUToScreenColorExpandFill);
+ pXAAinfo->ColorExpandBase = pApm->BltMap;
+ pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
+ }
- /* Accelerated image transfers */
- pXAAinfo->ImageWriteFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
- SYNC_AFTER_IMAGE_WRITE;
- pXAAinfo->ImageWriteBase = pApm->BltMap;
- pXAAinfo->ImageWriteRange = 32*1024;
- XAA(SetupForImageWrite);
- XAA(SubsequentImageWriteRect);
+ /* Accelerated image transfers */
+ pXAAinfo->ImageWriteFlags =
+ LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X |
+ SYNC_AFTER_IMAGE_WRITE;
+ pXAAinfo->ImageWriteBase = pApm->BltMap;
+ pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
+ XAA(SetupForImageWrite);
+ XAA(SubsequentImageWriteRect);
#endif
- pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(WritePixmap);
- pXAAinfo->FillImageWriteRectsFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(FillImageWriteRects);
- pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
- BIT_ORDER_IN_BYTE_LSBFIRST;
- XAA(WriteBitmap);
- pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(TEGlyphRenderer);
-
- /* Accelerated Line drawing */
- pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
+ pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(WritePixmap);
+ pXAAinfo->FillImageWriteRectsFlags =
+ LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(FillImageWriteRects);
+ pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X |
+ BIT_ORDER_IN_BYTE_LSBFIRST;
+ XAA(WriteBitmap);
+ pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(TEGlyphRenderer);
+
+ /* Accelerated screen-screen bitblts */
+ pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK;
+ XAA(SetupForScreenToScreenCopy);
+ XAA(SubsequentScreenToScreenCopy);
+
+ /* Accelerated Line drawing */
+ pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
+ XAA(SetClippingRectangle);
+ pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
+
+ if (pApm->Chipset >= AT24) {
XAA(SubsequentSolidBresenhamLine);
- XAA(SetClippingRectangle);
- pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
/* Pattern fill */
- pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
+ pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_PROGRAMMED_BITS |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect);
-#endif
-
- /* Accelerated screen-screen bitblts */
- pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
- XAA(SetupForScreenToScreenCopy);
- XAA(SubsequentScreenToScreenCopy);
-#undef XAA
+ if (pApm->CurrentLayout.bitsPerPixel == 8) {
+ pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
+ HARDWARE_PATTERN_SCREEN_ORIGIN;
+ XAA(SetupForColor8x8PatternFill);
+ XAA(SubsequentColor8x8PatternFillRect);
+ }
}
- else {
-#define XAA(s) pXAAinfo->s = Apm##s##24##_IOP
- XAA(Sync);
+ else
+ pXAAinfo->SubsequentSolidBresenhamLine =
+ ApmSubsequentSolidBresenhamLine6422;
+#undef XAA
+ }
+ else {
+#define XAA(s) pXAAinfo->s = Apm##s##24
+ XAA(Sync);
- /* Accelerated filled rectangles */
- pXAAinfo->SolidFillFlags = NO_PLANEMASK;
- XAA(SetupForSolidFill);
- XAA(SubsequentSolidFillRect);
+ /* Accelerated filled rectangles */
+ pXAAinfo->SolidFillFlags = NO_PLANEMASK;
+ XAA(SetupForSolidFill);
+ XAA(SubsequentSolidFillRect);
#if 0
- /* Accelerated screen to screen color expansion */
- pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
- XAA(SetupForScreenToScreenColorExpandFill);
- XAA(SubsequentScreenToScreenColorExpandFill);
+ /* Accelerated screen to screen color expansion */
+ pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
+ XAA(SetupForScreenToScreenColorExpandFill);
+ XAA(SubsequentScreenToScreenColorExpandFill);
#if 0
- The constraints of the transfer range are incompatible with the
- XAA architecture. I rewrote the XAA functions using ImageWrite
- /* Accelerated CPU to screen color expansion */
- if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
- pXAAinfo->CPUToScreenColorExpandFillFlags =
- NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
- | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
- LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
- XAA(SetupForCPUToScreenColorExpandFill);
- XAA(SubsequentCPUToScreenColorExpandFill);
- pXAAinfo->ColorExpandBase = pApm->BltMap;
- pXAAinfo->ColorExpandRange = 32*1024;
- }
+ The constraints of the transfer range are incompatible with the
+ XAA architecture. I rewrote the XAA functions using ImageWrite
+ /* Accelerated CPU to screen color expansion */
+ if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
+ pXAAinfo->CPUToScreenColorExpandFillFlags =
+ NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
+ | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
+ XAA(SetupForCPUToScreenColorExpandFill);
+ XAA(SubsequentCPUToScreenColorExpandFill);
+ pXAAinfo->ColorExpandBase = pApm->BltMap;
+ pXAAinfo->ColorExpandRange = 32*1024;
+ }
- /* Accelerated image transfers */
- pXAAinfo->ImageWriteFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD;
- pXAAinfo->ImageWriteBase = pApm->BltMap;
- pXAAinfo->ImageWriteRange = 32*1024;
- XAA(SetupForImageWrite);
- XAA(SubsequentImageWriteRect);
+ /* Accelerated image transfers */
+ pXAAinfo->ImageWriteFlags =
+ LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
+ SYNC_AFTER_IMAGE_WRITE;
+ pXAAinfo->ImageWriteBase = pApm->BltMap;
+ pXAAinfo->ImageWriteRange = 32*1024;
+ XAA(SetupForImageWrite);
+ XAA(SubsequentImageWriteRect);
#endif
- pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(WritePixmap);
- pXAAinfo->FillImageWriteRectsFlags =
- LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(FillImageWriteRects);
- pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
- BIT_ORDER_IN_BYTE_LSBFIRST;
- XAA(WriteBitmap);
- pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X;
- XAA(TEGlyphRenderer);
-
- /* Accelerated Line drawing */
- pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
- XAA(SubsequentSolidBresenhamLine);
- XAA(SetClippingRectangle);
- pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
-
- /* Pattern fill */
- pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
- HARDWARE_PATTERN_PROGRAMMED_BITS |
- HARDWARE_PATTERN_SCREEN_ORIGIN;
- XAA(SetupForMono8x8PatternFill);
- XAA(SubsequentMono8x8PatternFillRect);
+ pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(WritePixmap);
+ pXAAinfo->FillImageWriteRectsFlags =
+ LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(FillImageWriteRects);
+ pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X |
+ BIT_ORDER_IN_BYTE_LSBFIRST;
+ XAA(WriteBitmap);
+ pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
+ LEFT_EDGE_CLIPPING_NEGATIVE_X;
+ XAA(TEGlyphRenderer);
+
+ /* Accelerated Line drawing */
+ pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
+ XAA(SubsequentSolidBresenhamLine);
+ XAA(SetClippingRectangle);
+ pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
+
+ /* Pattern fill */
+ pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
+ HARDWARE_PATTERN_PROGRAMMED_BITS |
+ HARDWARE_PATTERN_SCREEN_ORIGIN;
+ XAA(SetupForMono8x8PatternFill);
+ XAA(SubsequentMono8x8PatternFillRect);
#endif
- /* Accelerated screen-screen bitblts */
- pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
- XAA(SetupForScreenToScreenCopy);
- XAA(SubsequentScreenToScreenCopy);
+ /* Accelerated screen-screen bitblts */
+ pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
+ XAA(SetupForScreenToScreenCopy);
+ XAA(SubsequentScreenToScreenCopy);
#undef XAA
- }
}
}
diff --git a/src/apm_dga.c b/src/apm_dga.c
index 313d03b..30079e2 100644
--- a/src/apm_dga.c
+++ b/src/apm_dga.c
@@ -316,18 +316,10 @@ ApmSetViewport(
* This is just an attempt, because Daryll is tampering with MY
* registers.
*/
- if (!pApm->noLinear) {
- tmp = (RDXB(0xDB) & 0xF4) | 0x0A;
- WRXB(0xDB, tmp);
- ApmWriteSeq(0x1B, 0x20);
- ApmWriteSeq(0x1C, 0x2F);
- }
- else {
- tmp = (RDXB_IOP(0xDB) & 0xF4) | 0x0A;
- WRXB_IOP(0xDB, tmp);
- wrinx(pApm->xport, 0x1B, 0x20);
- wrinx(pApm->xport, 0x1C, 0x2F);
- }
+ tmp = (RDXB(0xDB) & 0xF4) | 0x0A;
+ WRXB(0xDB, tmp);
+ ApmWriteSeq(0x1B, 0x20);
+ ApmWriteSeq(0x1C, 0x2F);
pApm->apmLock = FALSE;
}
pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags);
diff --git a/src/apm_driver.c b/src/apm_driver.c
index f172bab..8ee708f 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -200,7 +200,7 @@ ApmFreeRec(ScrnInfoPtr pScrn)
static void
ApmUnlock(ApmPtr pApm)
{
- if (pApm->Chipset >= AT3D && !pApm->noLinear)
+ if (pApm->Chipset >= AT3D)
ApmWriteSeq(0x10, 0x12);
else
wrinx(pApm->xport, 0x10, 0x12);
@@ -210,7 +210,7 @@ ApmUnlock(ApmPtr pApm)
static void
ApmLock(ApmPtr pApm)
{
- if (pApm->Chipset >= AT3D && !pApm->noLinear)
+ if (pApm->Chipset >= AT3D)
ApmWriteSeq(0x10, pApm->savedSR10 ? 0 : 0x12);
else
wrinx(pApm->xport, 0x10, pApm->savedSR10 ? 0 : 0x12);
@@ -494,21 +494,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
/* Default to 8 */
pScrn->rgbBits = 8;
}
-#ifndef XSERVER_LIBPCIACCESS
- /* you're getting a linear framebuffer with pciaccess */
- if (xf86ReturnOptValBool(pApm->Options, OPTION_NOLINEAR, FALSE)) {
- pApm->noLinear = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "No linear framebuffer\n");
- }
-#else
- pApm->noLinear = FALSE;
-#endif
from = X_DEFAULT;
pApm->hwCursor = FALSE;
if (xf86GetOptValBool(pApm->Options, OPTION_HW_CURSOR, &pApm->hwCursor))
from = X_CONFIG;
- if (pApm->noLinear ||
- xf86ReturnOptValBool(pApm->Options, OPTION_SW_CURSOR, FALSE)) {
+ if (xf86ReturnOptValBool(pApm->Options, OPTION_SW_CURSOR, FALSE)) {
from = X_CONFIG;
pApm->hwCursor = FALSE;
}
@@ -683,23 +673,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
}
}
- if (pApm->noLinear) {
- /*
- * TODO not AT3D.
- * XXX ICI XXX
- */
- pApm->LinMapSize = 4 * 1024 * 1024 /* 0x10000 */;
- pApm->FbMapSize = 4 * 1024 * 1024 /* 0x10000 */;
- if (pApm->Chipset >= AT3D)
- pApm->LinAddress += 8 * 1024 * 1024 /* 0xA0000 */;
- }
- else {
- if (pApm->Chipset >= AT3D)
- pApm->LinMapSize = 16 * 1024 * 1024;
- else
- pApm->LinMapSize = 6 * 1024 * 1024;
- pApm->FbMapSize = 4 * 1024 * 1024;
- }
+ if (pApm->Chipset >= AT3D)
+ pApm->LinMapSize = 16 * 1024 * 1024;
+ else
+ pApm->LinMapSize = 6 * 1024 * 1024;
+ pApm->FbMapSize = 4 * 1024 * 1024;
if (xf86LoadSubModule(pScrn, "int10")) {
void *ptr;
@@ -722,7 +700,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
if (pEnt->device->videoRam != 0) {
pScrn->videoRam = pEnt->device->videoRam;
from = X_CONFIG;
- } else if (!pApm->noLinear && pApm->Chipset >= AT3D) {
+ } else if (pApm->Chipset >= AT3D) {
unsigned char d9, db, uc;
/*unsigned long save;*/
volatile unsigned char *LinMap;
@@ -1077,55 +1055,42 @@ ApmMapMem(ScrnInfoPtr pScrn)
if (pApm->LinMap == NULL)
return FALSE;
- if (!pApm->noLinear) {
- if (pApm->Chipset >= AT3D) {
- pApm->FbBase = (void *)(((char *)pApm->LinMap) + 0x800000);
- pApm->VGAMap = ((char *)pApm->LinMap) + 0xFFF000;
- pApm->MemMap = ((char *)pApm->LinMap) + 0xFFEC00;
- pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
+ if (pApm->Chipset >= AT3D) {
+ pApm->FbBase = (void *)(((char *)pApm->LinMap) + 0x800000);
+ pApm->VGAMap = ((char *)pApm->LinMap) + 0xFFF000;
+ pApm->MemMap = ((char *)pApm->LinMap) + 0xFFEC00;
+ pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
+ }
+ else {
+ pApm->FbBase = (void *)pApm->LinMap;
+ pApm->VGAMap = NULL;
+ if (pScrn->videoRam == 6 * 1024 - 32) {
+ pApm->MemMap = ((char *)pApm->LinMap) + 0x5FF800;
+ pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x5F8000);
}
else {
- pApm->FbBase = (void *)pApm->LinMap;
- pApm->VGAMap = NULL;
- if (pScrn->videoRam == 6 * 1024 - 32) {
- pApm->MemMap = ((char *)pApm->LinMap) + 0x5FF800;
- pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x5F8000);
- }
- else {
- pApm->MemMap = ((char *)pApm->LinMap) + 0x3FF800;
- pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
- }
+ pApm->MemMap = ((char *)pApm->LinMap) + 0x3FF800;
+ pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
}
+ }
- /*
- * Initialize chipset
- */
- pApm->c9 = RDXB(0xC9);
- if (pApm->Chipset >= AT3D) {
- pApm->d9 = RDXB(0xD9);
- pApm->db = RDXB(0xDB);
+ /*
+ * Initialize chipset
+ */
+ pApm->c9 = RDXB(0xC9);
+ if (pApm->Chipset >= AT3D) {
+ pApm->d9 = RDXB(0xD9);
+ pApm->db = RDXB(0xDB);
- /* If you change these two, change them also in apm_funcs.c */
- WRXB(0xDB, (pApm->db & 0xF4) | 0x0A);
- WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
+ /* If you change these two, change them also in apm_funcs.c */
+ WRXB(0xDB, (pApm->db & 0xF4) | 0x0A);
+ WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
- vgaHWSetMmioFuncs(hwp, (CARD8 *)pApm->LinMap, 0xFFF000);
- }
- if (pApm->Chipset >= AP6422)
- WRXB(0xC9, pApm->c9 | 0x10);
+ vgaHWSetMmioFuncs(hwp, (CARD8 *)pApm->LinMap, 0xFFF000);
}
- else {
- pApm->FbBase = pApm->LinMap;
+ if (pApm->Chipset >= AP6422)
+ WRXB(0xC9, pApm->c9 | 0x10);
- /*
- * Initialize chipset
- */
- if (pApm->Chipset >= AT3D) {
- pApm->d9 = RDXB_IOP(0xD9);
- pApm->db = RDXB_IOP(0xDB);
- WRXB_IOP(0xDB, pApm->db & 0xF4);
- }
- }
/*
* Save color mode
*/
@@ -1150,14 +1115,8 @@ ApmUnmapMem(ScrnInfoPtr pScrn)
hwp->writeMiscOut(hwp, pApm->MiscOut);
if (pApm->LinMap) {
if (pApm->Chipset >= AT3D) {
- if (!pApm->noLinear) {
- WRXB(0xD9, pApm->d9);
- WRXB(0xDB, pApm->db);
- }
- else {
- WRXB_IOP(0xD9, pApm->d9);
- WRXB_IOP(0xDB, pApm->db);
- }
+ WRXB(0xD9, pApm->d9);
+ WRXB(0xDB, pApm->db);
}
WRXB(0xC9, pApm->c9);
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, pApm->LinMapSize);
@@ -1239,18 +1198,10 @@ ApmSave(ScrnInfoPtr pScrn)
ApmReg->SEQ[0x1C] = rdinx(pApm->xport, 0x1C);
/* Hardware cursor registers. */
- if (pApm->noLinear) {
- ApmReg->EX[XR140] = RDXL_IOP(0x140);
- ApmReg->EX[XR144] = RDXW_IOP(0x144);
- ApmReg->EX[XR148] = RDXL_IOP(0x148);
- ApmReg->EX[XR14C] = RDXW_IOP(0x14C);
- }
- else {
- ApmReg->EX[XR140] = RDXL(0x140);
- ApmReg->EX[XR144] = RDXW(0x144);
- ApmReg->EX[XR148] = RDXL(0x148);
- ApmReg->EX[XR14C] = RDXW(0x14C);
- }
+ ApmReg->EX[XR140] = RDXL(0x140);
+ ApmReg->EX[XR144] = RDXW(0x144);
+ ApmReg->EX[XR148] = RDXL(0x148);
+ ApmReg->EX[XR14C] = RDXW(0x14C);
ApmReg->CRT[0x19] = rdinx(pApm->iobase + 0x3D4, 0x19);
ApmReg->CRT[0x1A] = rdinx(pApm->iobase + 0x3D4, 0x1A);
@@ -1259,26 +1210,14 @@ ApmSave(ScrnInfoPtr pScrn)
ApmReg->CRT[0x1D] = rdinx(pApm->iobase + 0x3D4, 0x1D);
ApmReg->CRT[0x1E] = rdinx(pApm->iobase + 0x3D4, 0x1E);
- if (pApm->noLinear) {
- /* RAMDAC registers. */
- ApmReg->EX[XRE8] = RDXL_IOP(0xE8);
- ApmReg->EX[XREC] = RDXL_IOP(0xEC);
-
- /* Color correction */
- ApmReg->EX[XRE0] = RDXL_IOP(0xE0);
-
- ApmReg->EX[XR80] = RDXB_IOP(0x80);
- }
- else {
- /* RAMDAC registers. */
- ApmReg->EX[XRE8] = RDXL(0xE8);
- ApmReg->EX[XREC] = RDXL(0xEC);
+ /* RAMDAC registers. */
+ ApmReg->EX[XRE8] = RDXL(0xE8);
+ ApmReg->EX[XREC] = RDXL(0xEC);
- /* Color correction */
- ApmReg->EX[XRE0] = RDXL(0xE0);
+ /* Color correction */
+ ApmReg->EX[XRE0] = RDXL(0xE0);
- ApmReg->EX[XR80] = RDXB(0x80);
- }
+ ApmReg->EX[XR80] = RDXB(0x80);
}
}
@@ -1539,10 +1478,8 @@ ApmModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
ApmReg->EX[XRE8] = 0x071F01E8; /* Enable 58MHz MCLK (actually 57.3 MHz)
This is what is used in the Windows
drivers. The BIOS sets it to 50MHz. */
- else if (!pApm->noLinear)
- ApmReg->EX[XRE8] = RDXL(0xE8); /* No change */
else
- ApmReg->EX[XRE8] = RDXL_IOP(0xE8); /* No change */
+ ApmReg->EX[XRE8] = RDXL(0xE8); /* No change */
ApmReg->EX[XRE0] = 0x10;
@@ -1626,10 +1563,7 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
}
else {
/* Set aperture index to 0. */
- if (pApm->noLinear)
- WRXW_IOP(0xC0, 0);
- else
- WRXW(0xC0, 0);
+ WRXW(0xC0, 0);
/*
* Write the extended registers first
@@ -1638,18 +1572,10 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
wrinx(pApm->xport, 0x1C, ApmReg->SEQ[0x1C]);
/* Hardware cursor registers. */
- if (pApm->noLinear) {
- WRXL_IOP(0x140, ApmReg->EX[XR140]);
- WRXW_IOP(0x144, ApmReg->EX[XR144]);
- WRXL_IOP(0x148, ApmReg->EX[XR148]);
- WRXW_IOP(0x14C, ApmReg->EX[XR14C]);
- }
- else {
- WRXL(0x140, ApmReg->EX[XR140]);
- WRXW(0x144, ApmReg->EX[XR144]);
- WRXL(0x148, ApmReg->EX[XR148]);
- WRXW(0x14C, ApmReg->EX[XR14C]);
- }
+ WRXL(0x140, ApmReg->EX[XR140]);
+ WRXW(0x144, ApmReg->EX[XR144]);
+ WRXL(0x148, ApmReg->EX[XR148]);
+ WRXW(0x14C, ApmReg->EX[XR14C]);
wrinx(pApm->iobase + 0x3D4, 0x19, ApmReg->CRT[0x19]);
wrinx(pApm->iobase + 0x3D4, 0x1A, ApmReg->CRT[0x1A]);
@@ -1659,27 +1585,14 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
wrinx(pApm->iobase + 0x3D4, 0x1E, ApmReg->CRT[0x1E]);
/* RAMDAC registers. */
- if (pApm->noLinear) {
- WRXL_IOP(0xE8, ApmReg->EX[XRE8]);
- WRXL_IOP(0xEC, ApmReg->EX[XREC] & ~(1 << 7));
- WRXL_IOP(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
- }
- else {
- WRXL(0xE8, ApmReg->EX[XRE8]);
- WRXL(0xEC, ApmReg->EX[XREC] & ~(1 << 7));
- WRXL(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
- }
+ WRXL(0xE8, ApmReg->EX[XRE8]);
+ WRXL(0xEC, ApmReg->EX[XREC] & ~(1 << 7));
+ WRXL(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
/* Color correction */
- if (pApm->noLinear)
- WRXL_IOP(0xE0, ApmReg->EX[XRE0]);
- else
- WRXL(0xE0, ApmReg->EX[XRE0]);
+ WRXL(0xE0, ApmReg->EX[XRE0]);
- if (pApm->noLinear)
- WRXB_IOP(0x80, ApmReg->EX[XR80]);
- else
- WRXB(0x80, ApmReg->EX[XR80]);
+ WRXB(0x80, ApmReg->EX[XR80]);
/*
* This function handles restoring the generic VGA registers.
@@ -1735,17 +1648,8 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pApm->pScreen = pScreen;
/* Map the chip memory and MMIO areas */
- if (pApm->noLinear) {
- PCI_READ_LONG(pApm->PciInfo, &pApm->saveCmd, PCI_CMD_STAT_REG);
- PCI_WRITE_LONG(pApm->PciInfo, pApm->saveCmd | (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE), PCI_CMD_STAT_REG);
-#ifndef XSERVER_LIBPCIACCESS
- pApm->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
- pApm->PciTag, 0xA0000, 0x10000);
-#endif
- }
- else
- if (!ApmMapMem(pScrn))
- return FALSE;
+ if (!ApmMapMem(pScrn))
+ return FALSE;
/* No memory reserved yet */
pApm->OffscreenReserved = 0;
@@ -1895,10 +1799,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86DPMSInit(pScreen, ApmDisplayPowerManagementSet, 0);
- if (pApm->noLinear)
- ApmInitVideo_IOP(pScreen);
- else
- ApmInitVideo(pScreen);
+ ApmInitVideo(pScreen);
pScreen->SaveScreen = ApmSaveScreen;
@@ -2023,14 +1924,9 @@ ApmEnterVT(int scrnIndex, int flags)
vgaHWPtr hwp = VGAHWPTR(pScrn);
if (pApm->Chipset >= AT3D) {
- if (!pApm->noLinear) {
- /* If you change it, change it also in apm_funcs.c */
- WRXB(0xDB, (pApm->db & 0xF4) | 0x0A | pApm->Rush);
- WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
- }
- else {
- WRXB_IOP(0xDB, pApm->db & 0xF4);
- }
+ /* If you change it, change it also in apm_funcs.c */
+ WRXB(0xDB, (pApm->db & 0xF4) | 0x0A | pApm->Rush);
+ WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
}
if (pApm->Chipset >= AP6422)
WRXB(0xC9, pApm->c9 | 0x10);
@@ -2064,14 +1960,8 @@ ApmLeaveVT(int scrnIndex, int flags)
vgaHWLock(hwp);
ApmLock(pApm);
if (pApm->Chipset >= AT3D) {
- if (!pApm->noLinear) {
- WRXB(0xD9, pApm->d9);
- WRXB(0xDB, pApm->db);
- }
- else {
- WRXB_IOP(0xD9, pApm->d9);
- WRXB_IOP(0xDB, pApm->db);
- }
+ WRXB(0xD9, pApm->d9);
+ WRXB(0xDB, pApm->db);
}
WRXB(0xC9, pApm->c9);
@@ -2178,13 +2068,8 @@ ApmDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
default:
dpmsreg = 0;
}
- if (pApm->noLinear) {
- tmp = RDXB_IOP(0xD0);
- WRXB_IOP(0xD0, (tmp & 0xFC) | dpmsreg);
- } else {
- tmp = RDXB(0xD0);
- WRXB(0xD0, (tmp & 0xFC) | dpmsreg);
- }
+ tmp = RDXB(0xD0);
+ WRXB(0xD0, (tmp & 0xFC) | dpmsreg);
}
static Bool
diff --git a/src/apm_funcs.c b/src/apm_funcs.c
index 01d50c3..48e5ad6 100644
--- a/src/apm_funcs.c
+++ b/src/apm_funcs.c
@@ -7,41 +7,15 @@
#ifndef PSZ
#define PSZ 8
#endif
-#ifdef IOP_ACCESS
-# define APM_SUFF_IOP "_IOP"
-# undef RDXB
-# undef RDXW
-# undef RDXL
-# undef WRXB
-# undef WRXW
-# undef WRXL
-# undef ApmWriteSeq
-# define RDXB RDXB_IOP
-# define RDXW RDXW_IOP
-# define RDXL RDXL_IOP
-# define WRXB WRXB_IOP
-# define WRXW WRXW_IOP
-# define WRXL WRXL_IOP
-# define ApmWriteSeq(i, v) wrinx(pApm->xport, i, v)
-#else
-# define APM_SUFF_IOP ""
-#endif
+
#if PSZ == 24
# define APM_SUFF_24 "24"
-# ifdef IOP_ACCESS
-# define A(s) Apm##s##24##_IOP
-# else
-# define A(s) Apm##s##24
-# endif
+# define A(s) Apm##s##24
#else
# define APM_SUFF_24 ""
-# ifdef IOP_ACCESS
-# define A(s) Apm##s##_IOP
-# else
-# define A(s) Apm##s
-# endif
+# define A(s) Apm##s
#endif
-#define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 6, "Apm" #s APM_SUFF_24 APM_SUFF_IOP "\n"); } while (0)
+#define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 6, "Apm" #s APM_SUFF_24 "\n"); } while (0)
#if PSZ == 24
#undef SETSOURCEXY
@@ -1495,7 +1469,7 @@ A(Sync)(ScrnInfoPtr pScrn)
WRXB(0x1FF, 0);
if (!xf86ServerIsExiting())
- FatalError("Hung in ApmSync" APM_SUFF_24 APM_SUFF_IOP "(%d) (Status = 0x%08X)\n", pScrn->pScreen->myNum, status);
+ FatalError("Hung in ApmSync" APM_SUFF_24 "(%d) (Status = 0x%08X)\n", pScrn->pScreen->myNum, status);
}
if (pApm->apmClip) {
SETCLIP_CTRL(0);
@@ -1559,6 +1533,4 @@ A(Sync6422)(ScrnInfoPtr pScrn)
#undef A
#undef DEPTH
#undef PSZ
-#undef IOP_ACCESS
#undef APM_SUFF_24
-#undef APM_SUFF_IOP
diff --git a/src/apm_video.c b/src/apm_video.c
index 9a9bc39..d8b69fb 100644
--- a/src/apm_video.c
+++ b/src/apm_video.c
@@ -19,7 +19,6 @@ static XF86VideoAdaptorPtr A(SetupImageVideo)(ScreenPtr);
static void A(StopVideo)(ScrnInfoPtr, pointer, Bool);
static int A(SetPortAttribute)(ScrnInfoPtr, Atom, INT32, pointer);
-#ifndef IOP_ACCESS
static int ApmGetPortAttribute(ScrnInfoPtr, Atom ,INT32 *, pointer);
static void ApmQueryBestSize(ScrnInfoPtr, Bool, short, short, short,
short, unsigned int *, unsigned int *,
@@ -27,7 +26,6 @@ static void ApmQueryBestSize(ScrnInfoPtr, Bool, short, short, short,
static int ApmQueryImageAttributes(ScrnInfoPtr, int,
unsigned short *, unsigned short *,
int *, int *);
-#endif
static int A(ReputImage)(ScrnInfoPtr, short, short, RegionPtr, pointer,
DrawablePtr);
static int A(PutImage)(ScrnInfoPtr, short, short, short, short, short,
@@ -358,7 +356,6 @@ A(SetupImageVideo)(ScreenPtr pScreen)
return adapt;
}
-#ifndef IOP_ACCESS
/* ApmClipVideo -
Takes the dst box in standard X BoxRec form (top and left
@@ -420,7 +417,6 @@ ApmClipVideo(BoxPtr dst, INT32 *x1, INT32 *x2, INT32 *y1, INT32 *y2,
else
*scaley = ((*y2 - *y1) / (dst->y2 - dst->y1)) >> 4;
}
-#endif
static void
A(StopVideo)(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
@@ -457,7 +453,6 @@ A(SetPortAttribute)(ScrnInfoPtr pScrn, Atom attribute, INT32 value,
return Success;
}
-#ifndef IOP_ACCESS
static int
ApmGetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value,
pointer data)
@@ -485,7 +480,6 @@ ApmQueryBestSize(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h,
*p_w = drw_w & round;
*p_h = drw_h & round;
}
-#endif
static void A(XvMoveCB)(FBAreaPtr area1, FBAreaPtr area2)
{
@@ -903,7 +897,6 @@ A(PutImage)(ScrnInfoPtr pScrn, short src_x, short src_y,
return Success;
}
-#ifndef IOP_ACCESS
static int
ApmQueryImageAttributes(ScrnInfoPtr pScrn, int id,
unsigned short *w, unsigned short *h,
@@ -949,5 +942,5 @@ common:
return size;
}
-#endif
+
#endif