diff options
-rw-r--r-- | src/atimach64.c | 30 | ||||
-rw-r--r-- | src/atimach64accel.h | 4 |
2 files changed, 25 insertions, 9 deletions
diff --git a/src/atimach64.c b/src/atimach64.c index 5cb991dd..cc3a3cb0 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -84,7 +84,6 @@ ATIMach64PreInit ) { CARD32 bus_cntl, config_cntl; - int tmp; #ifndef AVOID_CPIO @@ -258,12 +257,29 @@ ATIMach64PreInit pATIHW->src_cntl = SRC_LINE_X_DIR; /* Initialise scissor, allowing for offscreen areas */ - pATIHW->sc_right = (pATI->displayWidth * pATI->XModifier) - 1; - tmp = pATI->displayWidth * pATI->bitsPerPixel; - tmp = (((pScreenInfo->videoRam * (1024 * 8)) + tmp - 1) / tmp) - 1; - if (tmp > ATIMach64MaxY) - tmp = ATIMach64MaxY; - pATIHW->sc_bottom = tmp; +#ifdef USE_XAA + if (!pATI->useEXA) + { + int width, height, total; + + pATIHW->sc_right = (pATI->displayWidth * pATI->XModifier) - 1; + width = pATI->displayWidth * pATI->bitsPerPixel; + total = pScreenInfo->videoRam * (1024 * 8); + height = (total + width - 1) / width; + if (height > ATIMach64MaxY + 1) + height = ATIMach64MaxY + 1; + pATIHW->sc_bottom = height - 1; + } +#endif /* USE_XAA */ + +#ifdef USE_EXA + if (pATI->useEXA) + { + pATIHW->sc_right = ATIMach64MaxX; + pATIHW->sc_bottom = ATIMach64MaxY; + } +#endif /* USE_EXA */ + pATI->sc_left_right = SetWord(pATI->NewHW.sc_right, 1) | SetWord(pATI->NewHW.sc_left, 0); pATI->sc_top_bottom = SetWord(pATI->NewHW.sc_bottom, 1) | diff --git a/src/atimach64accel.h b/src/atimach64accel.h index 2917b7a4..973f2ba8 100644 --- a/src/atimach64accel.h +++ b/src/atimach64accel.h @@ -29,8 +29,8 @@ #include "xaa.h" #include "exa.h" -#define ATIMach64MaxX 8191 -#define ATIMach64MaxY 32767 +#define ATIMach64MaxX 4095 +#define ATIMach64MaxY 16383 #ifdef USE_EXA extern Bool ATIMach64ExaInit(ScreenPtr); |