xserver-xorg-video-ati: Changes to 'upstream-experimental'
src/aticonfig.c | 25 +++++-----
src/atimach64exa.c | 9 ---
src/atipreinit.c | 125 ++++++++++++++++-------------------------------------
src/atistruct.h | 1
4 files changed, 52 insertions(+), 108 deletions(-)
New commits:
commit fa30ec6d5cd9bf4eb1a960592ca7311175219e4b
Author: George Sapountzis <gsap7@yahoo.gr>
Date: Tue Feb 13 15:35:32 2007 +0200
[mach64] PreInit: maxPitch, minor cosmetic.
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 9ba6676..e18e27a 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -2241,29 +2241,25 @@ #endif /* AVOID_CPIO */
pitchInc = minPitch * pATI->bitsPerPixel;
- {
- pScreenInfo->maxHValue = (MaxBits(CRTC_H_TOTAL) + 1) << 3;
-
- if (pATI->Chip < ATI_CHIP_264VT)
- {
- /*
- * ATI finally fixed accelerated doublescanning in the 264VT
- * and later. On 88800's, the bit is documented to exist, but
- * only doubles the vertical timings. On the 264CT and 264ET,
- * the bit is ignored.
- */
- ATIClockRange.doubleScanAllowed = FALSE;
-
- /* CRTC_H_TOTAL is one bit narrower */
- pScreenInfo->maxHValue >>= 1;
- }
+ pScreenInfo->maxHValue = (MaxBits(CRTC_H_TOTAL) + 1) << 3;
- pScreenInfo->maxVValue = MaxBits(CRTC_V_TOTAL) + 1;
+ if (pATI->Chip < ATI_CHIP_264VT)
+ {
+ /*
+ * ATI finally fixed accelerated doublescanning in the 264VT
+ * and later. On 88800's, the bit is documented to exist, but
+ * only doubles the vertical timings. On the 264CT and 264ET,
+ * the bit is ignored.
+ */
+ ATIClockRange.doubleScanAllowed = FALSE;
- maxPitch = MaxBits(CRTC_PITCH);
+ /* CRTC_H_TOTAL is one bit narrower */
+ pScreenInfo->maxHValue >>= 1;
}
- maxPitch *= minPitch;
+ pScreenInfo->maxVValue = MaxBits(CRTC_V_TOTAL) + 1;
+
+ maxPitch = minPitch * MaxBits(CRTC_PITCH);
if (pATI->OptionAccel)
{
@@ -2273,6 +2269,7 @@ #endif /* AVOID_CPIO */
*/
if (maxPitch > (ATIMach64MaxX / pATI->XModifier))
maxPitch = ATIMach64MaxX / pATI->XModifier;
+
maxHeight = ATIMach64MaxY;
/*
commit 1777dcc1956d910073e13322767d9a3de41a949b
Author: George Sapountzis <gsap7@yahoo.gr>
Date: Tue Feb 13 15:03:40 2007 +0200
[mach64] PreInit: pitchInc is local.
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 9c3b619..9ba6676 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -181,7 +181,7 @@ # define BIOSLong(_n) ((C
int MinX, MinY;
ClockRange ATIClockRange = {NULL, 0, 80000, -1, TRUE, TRUE, 1, 1, 0};
int DefaultmaxClock = 0;
- int minPitch, maxPitch = 0xFFU, maxHeight = 0;
+ int minPitch, maxPitch = 0xFFU, pitchInc, maxHeight = 0;
int ApertureSize = 0x00010000U;
int ModeType = M_T_BUILTIN;
LookupModeFlags Strategy = LOOKUP_CLOSEST_CLOCK;
@@ -2239,11 +2239,7 @@ #endif /* AVOID_CPIO */
minPitch = 16;
}
- pATI->pitchInc = minPitch;
-
- {
- pATI->pitchInc *= pATI->bitsPerPixel;
- }
+ pitchInc = minPitch * pATI->bitsPerPixel;
{
pScreenInfo->maxHValue = (MaxBits(CRTC_H_TOTAL) + 1) << 3;
@@ -2286,7 +2282,7 @@ #endif /* AVOID_CPIO */
if ((pATI->Chip >= ATI_CHIP_264CT) &&
((pATI->Chip >= ATI_CHIP_264VTB) ||
(pATI->MemoryType >= MEM_264_SGRAM)))
- pATI->pitchInc = pATI->XModifier * (64 * 8);
+ pitchInc = pATI->XModifier * (64 * 8);
}
if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0))
@@ -2415,7 +2411,7 @@ #endif /* AVOID_CPIO */
i = xf86ValidateModes(pScreenInfo,
pScreenInfo->monitor->Modes, pScreenInfo->display->modes,
&ATIClockRange, NULL, minPitch, maxPitch,
- pATI->pitchInc, 0, maxHeight,
+ pitchInc, 0, maxHeight,
pScreenInfo->display->virtualX, pScreenInfo->display->virtualY,
ApertureSize, Strategy);
if (i <= 0)
diff --git a/src/atistruct.h b/src/atistruct.h
index e50cbb5..99be359 100644
--- a/src/atistruct.h
+++ b/src/atistruct.h
@@ -382,7 +382,6 @@ #endif
DisplayModePtr currentMode;
CARD8 depth, bitsPerPixel;
short int displayWidth;
- int pitchInc;
rgb weight;
#ifndef AVOID_DGA
commit 9cdf4fcc3a93a4e20244286392dc31a0b8e6a10a
Author: George Sapountzis <gsap7@yahoo.gr>
Date: Tue Feb 13 11:53:42 2007 +0200
[mach64] PreInit: Use goto bail.
Match ATILock - ATIUnlock.
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 62c32bb..9c3b619 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -186,6 +186,7 @@ # define BIOSLong(_n) ((C
int ModeType = M_T_BUILTIN;
LookupModeFlags Strategy = LOOKUP_CLOSEST_CLOCK;
int DefaultDepth;
+ Bool PreInitSuccess = FALSE;
# define pATIHW (&pATI->OldHW)
@@ -1070,10 +1071,7 @@ #endif /* AVOID_CPIO */
{
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"A linear aperture is not available.\n");
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
/*
@@ -1086,12 +1084,7 @@ #endif /* AVOID_CPIO */
pScreenInfo->rgbBits = 8;
pATI->rgbBits = pScreenInfo->rgbBits;
if (!xf86SetWeight(pScreenInfo, defaultWeight, defaultWeight))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ goto bail;
if ((pScreenInfo->depth > 8) &&
((pScreenInfo->weight.red != pScreenInfo->weight.blue) ||
@@ -1104,10 +1097,7 @@ #endif /* AVOID_CPIO */
"Driver does not support weight %d%d%d for depth %d.\n",
(int)pScreenInfo->weight.red, (int)pScreenInfo->weight.green,
(int)pScreenInfo->weight.blue, pScreenInfo->depth);
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
/*
@@ -1115,12 +1105,7 @@ #endif /* AVOID_CPIO */
*/
if (!xf86SetDefaultVisual(pScreenInfo, -1))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ goto bail;
if ((pScreenInfo->depth > 8) &&
(((pScreenInfo->defaultVisual | DynamicClass) != DirectColor) ||
@@ -1131,22 +1116,15 @@ #endif /* AVOID_CPIO */
"Driver does not support default visual %s for depth %d.\n",
xf86GetVisualName(pScreenInfo->defaultVisual),
pScreenInfo->depth);
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
/*
* Set colour gamma.
*/
- if (!xf86SetGamma(pScreenInfo, defaultGamma))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+
+ if (!xf86SetGamma(pScreenInfo, defaultGamma))
+ goto bail;
pATI->depth = pScreenInfo->depth;
pATI->bitsPerPixel = pScreenInfo->bitsPerPixel;
@@ -1709,10 +1687,7 @@ #endif /* AVOID_CPIO */
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"Unable to determine dimensions of panel.\n");
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
/* If the mode on entry wasn't stretched, adjust timings */
@@ -1941,10 +1916,7 @@ #endif /* X_BYTE_ORDER */
{
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"Linear aperture not available.\n");
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
if (pATI->Block0Base)
@@ -2095,12 +2067,7 @@ #endif /* AVOID_CPIO */
/* 264VT-B's and later have DSP registers */
if ((pATI->Chip >= ATI_CHIP_264VTB) &&
!ATIDSPPreInit(pScreenInfo->scrnIndex, pATI))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ goto bail;
/*
* Determine minClock and maxClock. For adapters with supported
@@ -2253,9 +2220,7 @@ #endif /* AVOID_CPIO */
{
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
"Unsupported or non-programmable clock generator.\n");
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
+ goto bail;
}
ATIClockPreInit(pScreenInfo, pATI);
@@ -2454,12 +2419,7 @@ #endif /* AVOID_CPIO */
pScreenInfo->display->virtualX, pScreenInfo->display->virtualY,
ApertureSize, Strategy);
if (i <= 0)
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ goto bail;
/* Remove invalid modes */
xf86PruneDriverModes(pScreenInfo);
@@ -2475,12 +2435,7 @@ #endif /* AVOID_CPIO */
/* Load required modules */
if (!ATILoadModules(pScreenInfo, pATI))
- {
- ATILock(pATI);
- ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
- ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return FALSE;
- }
+ goto bail;
pATI->displayWidth = pScreenInfo->displayWidth;
@@ -2521,9 +2476,12 @@ #endif /* AVOID_CPIO */
if (!pScreenInfo->chipset || !*pScreenInfo->chipset)
pScreenInfo->chipset = "mach64";
+ PreInitSuccess = TRUE;
+
+bail:
ATILock(pATI);
ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize);
ATIUnmapApertures(pScreenInfo->scrnIndex, pATI);
- return TRUE;
+ return PreInitSuccess;
}
commit 482b85144fee42b6543dcc97a75899e363e05e9e
Author: George Sapountzis <gsap7@yahoo.gr>
Date: Mon Feb 12 14:27:37 2007 +0200
[mach64] Enable RENDER acceleration on the Pro variants.
diff --git a/src/aticonfig.c b/src/aticonfig.c
index 37cc9cd..eeb0a70 100644
--- a/src/aticonfig.c
+++ b/src/aticonfig.c
@@ -156,25 +156,26 @@ # define ReferenceClock \
xf86CollectOptions(pScreenInfo, NULL);
/* Set non-zero defaults */
- {
- Accel = CacheMMIO = HWCursor = TRUE;
-
-#ifdef TV_OUT
-
- TvStd = "None"; /* No tv standard change requested */
-
-#endif
- }
+ Accel = CacheMMIO = HWCursor = TRUE;
ReferenceClock = ((double)157500000.0) / ((double)11.0);
ShadowFB = TRUE;
Blend = PanelDisplay = TRUE;
+
+#ifdef USE_EXA
+ RenderAccel = TRUE;
+#endif
+
#ifdef XF86DRI_DEVEL
DMAMode = "async";
#endif
+#ifdef TV_OUT
+ TvStd = "None"; /* No tv standard change requested */
+#endif
+
xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options,
PublicOption);
xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options,
@@ -315,9 +316,11 @@ #endif /* USE_EXA */
pATI->useEXA ? "EXA" : "XAA");
#if defined(USE_EXA)
- pATI->RenderAccelEnabled = FALSE;
- if (pATI->useEXA && RenderAccel)
+ if (pATI->useEXA && pATI->Chip >= ATI_CHIP_264GTPRO)
pATI->RenderAccelEnabled = TRUE;
+
+ if (pATI->useEXA && !RenderAccel)
+ pATI->RenderAccelEnabled = FALSE;
#endif
}
diff --git a/src/atimach64exa.c b/src/atimach64exa.c
index a2f1afe..67c5f22 100644
--- a/src/atimach64exa.c
+++ b/src/atimach64exa.c
@@ -638,15 +638,6 @@ Bool ATIMach64ExaInit(ScreenPtr pScreen)
ATIPtr pATI = ATIPTR(pScreenInfo);
ExaDriverPtr pExa;
- /* FIXME: which chips support EXA ? */
- if (pATI->Chip < ATI_CHIP_264CT)
- {
- xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
- "EXA is not supported for ATI chips earlier than "
- "the ATI Mach64.\n");
- return FALSE;
- }
-
pExa = exaDriverAlloc();
if (!pExa)
return FALSE;
Reply to: