Commit bea8085e authored by Eric Anholt's avatar Eric Anholt

DRI trunk-20040613 import

parent 7b588cda
This diff is collapsed.
......@@ -19,6 +19,9 @@
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* DRI support by:
* Leif Delgass <ldelgass@retinalburn.net>
*/
#include "atiaccel.h"
......@@ -64,6 +67,12 @@ ATIInitializeAcceleration
#endif /* AVOID_CPIO */
#ifdef XF86DRI
/* If DRI is enabled, we've already set up the FB manager in ATIScreenInit */
if (!pATI->directRenderingEnabled)
#endif /* XF86DRI */
{
/*
* Note: If PixelArea exceeds the engine's maximum, the excess is
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atichip.c,v 1.35 2003/07/02 17:31:28 martin Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atichip.c,v 1.37 2003/10/07 22:47:11 martin Exp $ */
/*
* Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
*
......@@ -101,6 +101,7 @@ const char *ATIChipNames[] =
"ATI Radeon 9700/9500",
"ATI Radeon 9600",
"ATI Radeon 9800",
"ATI Radeon 9800XT",
"ATI Rage HDTV"
};
......@@ -673,14 +674,11 @@ ATIChipID
case NewChipID('Q', 'X'):
return ATI_CHIP_RV200;
case NewChipID('I', 'd'):
case NewChipID('I', 'e'):
case NewChipID('I', 'f'):
case NewChipID('I', 'g'):
return ATI_CHIP_RV250;
case NewChipID('L', 'd'):
case NewChipID('L', 'e'):
case NewChipID('L', 'f'):
case NewChipID('L', 'g'):
return ATI_CHIP_RADEONMOBILITY9;
......@@ -691,14 +689,12 @@ ATIChipID
case NewChipID('Y', '\''):
case NewChipID('Y', 'a'):
case NewChipID('I', 'b'):
case NewChipID('I', 'c'):
case NewChipID('Y', 'b'):
case NewChipID('Y', 'd'):
return ATI_CHIP_RV280;
case NewChipID('Y', 'h'):
case NewChipID('Y', 'i'):
case NewChipID('Y', 'j'):
case NewChipID('Y', 'k'):
case NewChipID('\\', 'a'):
case NewChipID('\\', 'c'):
return ATI_CHIP_RADEONMOBILITY9PLUS;
case NewChipID('A', 'D'):
......@@ -711,16 +707,32 @@ ATIChipID
case NewChipID('N', 'G'):
return ATI_CHIP_R300;
case NewChipID('A', 'H'):
case NewChipID('A', 'I'):
case NewChipID('A', 'J'):
case NewChipID('A', 'K'):
case NewChipID('N', 'H'):
case NewChipID('N', 'I'):
case NewChipID('N', 'K'):
return ATI_CHIP_R350;
case NewChipID('N', 'P'):
case NewChipID('A', 'P'):
case NewChipID('A', 'Q'):
case NewChipID('A', 'R'):
case NewChipID('A', 'S'):
case NewChipID('A', 'T'):
case NewChipID('A', 'V'):
case NewChipID('N', 'P'):
case NewChipID('N', 'Q'):
case NewChipID('N', 'R'):
case NewChipID('N', 'S'):
case NewChipID('N', 'T'):
case NewChipID('N', 'V'):
return ATI_CHIP_RV350;
case NewChipID('N', 'J'):
return ATI_CHIP_R360;
case NewChipID('H', 'D'):
return ATI_CHIP_HDTV;
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atichip.h,v 1.24 2003/07/02 17:31:29 martin Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atichip.h,v 1.25 2003/10/07 22:47:11 martin Exp $ */
/*
* Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
*
......@@ -103,6 +103,7 @@ typedef enum
ATI_CHIP_R300, /* R300 */
ATI_CHIP_RV350, /* RV350 */
ATI_CHIP_R350, /* R350 */
ATI_CHIP_R360, /* R360 */
ATI_CHIP_HDTV /* HDTV */
} ATIChipType;
......
......@@ -19,6 +19,9 @@
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* DRI support by:
* Leif Delgass <ldelgass@retinalburn.net>
*/
#include "ati.h"
......@@ -29,6 +32,8 @@
#include "atioption.h"
#include "atistruct.h"
#include "mach64_common.h"
/*
* Non-publicised XF86Config options.
*/
......@@ -109,6 +114,17 @@ ATIProcessOptions
#endif /* AVOID_CPIO */
#ifdef XF86DRI
# define IsPCI PublicOption[ATI_OPTION_IS_PCI].value.bool
# define DMAMode PublicOption[ATI_OPTION_DMA_MODE].value.str
# define AGPMode PublicOption[ATI_OPTION_AGP_MODE].value.num
# define AGPSize PublicOption[ATI_OPTION_AGP_SIZE].value.num
# define LocalTex PublicOption[ATI_OPTION_LOCAL_TEXTURES].value.bool
# define BufferSize PublicOption[ATI_OPTION_BUFFER_SIZE].value.num
#endif /* XF86DRI */
# define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.bool
# define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.bool
# define PanelDisplay PublicOption[ATI_OPTION_PANEL_DISPLAY].value.bool
......@@ -155,6 +171,7 @@ ATIProcessOptions
}
Blend = PanelDisplay = TRUE;
DMAMode = "mmio";
xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options,
PublicOption);
......@@ -200,6 +217,32 @@ ATIProcessOptions
else
pATI->OptionPanelDisplay = !CRTScreen;
#ifdef XF86DRI
pATI->OptionIsPCI = IsPCI;
pATI->OptionAGPMode = AGPMode;
pATI->OptionAGPSize = AGPSize;
pATI->OptionLocalTextures = LocalTex;
pATI->OptionBufferSize = BufferSize;
if (strcasecmp(DMAMode, "async")==0)
pATI->OptionDMAMode = MACH64_MODE_DMA_ASYNC;
else if (strcasecmp(DMAMode, "sync")==0)
pATI->OptionDMAMode = MACH64_MODE_DMA_SYNC;
else if (strcasecmp(DMAMode, "mmio")==0 )
pATI->OptionDMAMode = MACH64_MODE_MMIO;
else {
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
"Unkown dma_mode: '%s'\n", DMAMode);
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
"Valid dma_mode options are: 'async','sync','mmio'\n");
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
"Defaulting to async DMA mode\n");
pATI->OptionDMAMode = MACH64_MODE_DMA_ASYNC;
}
#endif /* XF86DRI */
/* Validate and set cursor options */
pATI->Cursor = ATI_CURSOR_SOFTWARE;
if (SWCursor || !HWCursor)
......
......@@ -19,19 +19,29 @@
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* DRI support by:
* Manuel Teira
* Leif Delgass <ldelgass@retinalburn.net>
*/
#include "ati.h"
#include "atiadapter.h"
#include "aticonsole.h"
#include "aticrtc.h"
#include "atii2c.h"
#include "atilock.h"
#include "atimach64.h"
#include "atimach64io.h"
#include "atimode.h"
#include "atistruct.h"
#include "ativga.h"
#include "atividmem.h"
#include "mach64_common.h"
#include "xf86.h"
/*
......@@ -242,7 +252,28 @@ ATISwitchMode
if (pScreenInfo->vtSema)
{
pScreenInfo->currentMode = pMode;
#ifdef XF86DRI
if (pATI->directRenderingEnabled)
{
DRILock(pScreenInfo->pScreen,0);
ATIDRIWaitForIdle(pATI);
}
#endif /* XF86DRI */
ATIModeSet(pScreenInfo, pATI, &pATI->NewHW);
#ifdef XF86DRI
if (pATI->directRenderingEnabled)
{
DRIUnlock(pScreenInfo->pScreen);
}
#endif /* XF86DRI */
}
SetTimeSinceLastInputEvent();
......@@ -274,7 +305,19 @@ ATIEnterVT
/* The rest of this isn't needed for shadowfb */
if (pATI->OptionShadowFB)
{
#ifdef XF86DRI
if (pATI->directRenderingEnabled)
{
DRIUnlock(pScreen);
}
#endif /* XF86DRI */
return TRUE;
}
#ifndef AVOID_CPIO
......@@ -299,6 +342,15 @@ ATIEnterVT
pScreenPixmap->devPrivate.ptr = NULL;
}
#ifdef XF86DRI
if (pATI->directRenderingEnabled)
{
DRIUnlock(pScreen);
}
#endif /* XF86DRI */
return Entered;
}
......@@ -316,6 +368,18 @@ ATILeaveVT
)
{
ScrnInfoPtr pScreenInfo = xf86Screens[iScreen];
ScreenPtr pScreen = pScreenInfo->pScreen;
ATIPtr pATI = ATIPTR(pScreenInfo);
#ifdef XF86DRI
if (pATI->directRenderingEnabled)
{
DRILock(pScreen,0);
ATIDRIWaitForIdle(pATI);
}
#endif /* XF86DRI */
ATILeaveGraphics(pScreenInfo, ATIPTR(pScreenInfo));
}
......
......@@ -19,6 +19,9 @@
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* DRI support by:
* Leif Delgass <ldelgass@retinalburn.net>
*/
#ifdef XFree86LOADER
......@@ -44,7 +47,7 @@ const char *ATIint10Symbols[] =
const char *ATIddcSymbols[] =
{
"xf86PrintEDID",
"xf86SetDDCProperties",
"xf86SetDDCproperties",
NULL
};
......@@ -72,6 +75,58 @@ const char *ATIxf4bppSymbols[] =
#endif /* AVOID_CPIO */
#ifdef XF86DRI
const char *ATIdrmSymbols[] = {
"drmAddBufs",
"drmAddMap",
"drmAgpAcquire",
"drmAgpAlloc",
"drmAgpBase",
"drmAgpBind",
"drmAgpDeviceId",
"drmAgpEnable",
"drmAgpFree",
"drmAgpGetMode",
"drmAgpRelease",
"drmAgpUnbind",
"drmAgpVendorId",
"drmAvailable",
"drmCommandNone",
"drmCommandRead",
"drmCommandWrite",
"drmCommandWriteRead",
"drmCtlInstHandler",
"drmCtlUninstHandler",
"drmFreeVersion",
"drmGetInterruptFromBusID",
"drmGetLibVersion",
"drmGetVersion",
"drmMap",
"drmMapBufs",
"drmDMA",
"drmUnmap",
"drmUnmapBufs",
NULL
};
const char *ATIdriSymbols[] = {
"DRICloseScreen",
"DRICreateInfoRec",
"DRIDestroyInfoRec",
"DRIFinishScreenInit",
"DRIGetSAREAPrivate",
"DRILock",
"DRIQueryVersion",
"DRIScreenInit",
"DRIUnlock",
"GlxSetVisualConfigs",
"DRICreatePCIBusID",
NULL
};
#endif /* XF86DRI */
const char *ATIfbSymbols[] =
{
"fbPictureInit",
......
......@@ -19,6 +19,9 @@
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* DRI support by:
* Leif Delgass <ldelgass@retinalburn.net>
*/
#ifndef ___ATILOAD_H___
......@@ -39,6 +42,12 @@ extern const char *ATIint10Symbols[], *ATIddcSymbols[], *ATIvbeSymbols[],
#endif /* AVOID_CPIO */
#ifdef XF86DRI
*ATIdrmSymbols[], *ATIdriSymbols[],
#endif /* XF86DRI */
*ATIfbSymbols[], *ATIshadowfbSymbols[], *ATIxaaSymbols[],
*ATIramdacSymbols[], *ATIi2cSymbols[];
......
......@@ -119,6 +119,15 @@ ATIUnlock
pATI->LockData.crtc_int_cntl = inr(CRTC_INT_CNTL);
outr(CRTC_INT_CNTL, (pATI->LockData.crtc_int_cntl & ~CRTC_INT_ENS) |
CRTC_INT_ACKS);
#ifdef XF86DRI
if (pATI->irq > 0)
outr(CRTC_INT_CNTL, (inr(CRTC_INT_CNTL) & ~CRTC_INT_ACKS) |
CRTC_VBLANK_INT_EN); /* Enable VBLANK interrupt - handled by DRM */
#endif /* XF86DRI */
pATI->LockData.gen_test_cntl = inr(GEN_TEST_CNTL) &
(GEN_OVR_OUTPUT_EN | GEN_OVR_POLARITY | GEN_CUR_EN |
GEN_BLOCK_WR_EN);
......
......@@ -20,6 +20,34 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* DRI support by:
* Manuel Teira
* Leif Delgass <ldelgass@retinalburn.net>
*/
#include "ati.h"
#include "atibus.h"
......@@ -197,8 +225,20 @@ ATIMach64PreInit
* When possible, max out command FIFO size.
*/
if (pATI->Chip >= ATI_CHIP_264VT4)
#ifdef XF86DRI
/* Changing the FIFO depth seems to interfere with DMA, so use
* default of 128 entries (0x01)
*/
pATIHW->gui_cntl = (inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE) | 0x01;
#else /* XF86DRI */
pATIHW->gui_cntl = inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE;
#endif /* XF86DRI */
/* Initialise destination registers */
pATIHW->dst_off_pitch =
SetBits((pATI->displayWidth * pATI->XModifier) >> 3, DST_PITCH);
......@@ -1083,6 +1123,13 @@ ATIMach64SetDPMSMode
return;
}
#ifdef XF86DRI
/* XAA Sync requires the DRM lock if DRI enabled */
ATIDRILock(pScreenInfo);
#endif /* XF86DRI */
ATIMach64Sync(pScreenInfo);
outr(CRTC_GEN_CNTL, crtc_gen_cntl);
......@@ -1178,4 +1225,11 @@ ATIMach64SetDPMSMode
}
}
}
#ifdef XF86DRI
ATIDRIUnlock(pScreenInfo);
#endif /* XF86DRI */
}
......@@ -43,6 +43,11 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* DRI support by:
* Manuel Teira
* Leif Delgass <ldelgass@retinalburn.net>
*/
#include "ati.h"
#include "atichip.h"
......@@ -51,6 +56,8 @@
#include "atipriv.h"
#include "atiregs.h"
#include "mach64_common.h"
#include "miline.h"
/* Used to test MMIO cache integrity in ATIMach64Sync() */
......@@ -130,12 +137,146 @@ ATIMach64Sync
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIMach64WaitForIdle(pATI);
if (pATI->pXAAInfo)
pATI->pXAAInfo->NeedToSync = FALSE;
#ifdef XF86DRI
if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache)
if ( pATI->directRenderingEnabled && pATI->NeedDRISync )
{
ATIHWPtr pATIHW = &pATI->NewHW;
if (pATI->OptionMMIOCache) {
/* "Invalidate" the MMIO cache so the cache slots get updated */
UncacheRegister(SRC_CNTL);
UncacheRegister(HOST_CNTL);
UncacheRegister(PAT_CNTL);
UncacheRegister(SC_LEFT_RIGHT);
UncacheRegister(SC_TOP_BOTTOM);
UncacheRegister(DP_BKGD_CLR);
UncacheRegister(DP_FRGD_CLR);
UncacheRegister(DP_WRITE_MASK);
UncacheRegister(DP_MIX);
UncacheRegister(CLR_CMP_CNTL);
}
ATIDRIWaitForIdle(pATI);
outr( BUS_CNTL, pATIHW->bus_cntl );
/* DRI uses GUI_TRAJ_CNTL, which is a composite of
* src_cntl, dst_cntl, pat_cntl, and host_cntl
*/
outf( SRC_CNTL, pATIHW->src_cntl );
outf( DST_CNTL, pATIHW->dst_cntl );
outf( PAT_CNTL, pATIHW->pat_cntl );
outf( HOST_CNTL, pATIHW->host_cntl );
outf( DST_OFF_PITCH, pATIHW->dst_off_pitch );
outf( SRC_OFF_PITCH, pATIHW->src_off_pitch );
outf( DP_SRC, pATIHW->dp_src );
outf( DP_MIX, pATIHW->dp_mix );
outf( DP_FRGD_CLR, pATIHW->dp_frgd_clr );
outf( DP_WRITE_MASK, pATIHW->dp_write_mask );
outf( DP_PIX_WIDTH, pATIHW->dp_pix_width );
outf( CLR_CMP_CNTL, pATIHW->clr_cmp_cntl );
outf( ALPHA_TST_CNTL, 0 );
outf( Z_CNTL, 0 );
outf( SCALE_3D_CNTL, 0 );
ATIMach64WaitForFIFO(pATI, 2);
outf( SC_LEFT_RIGHT,
SetWord(pATIHW->sc_right, 1) | SetWord(pATIHW->sc_left, 0) );
outf( SC_TOP_BOTTOM,
SetWord(pATIHW->sc_bottom, 1) | SetWord(pATIHW->sc_top, 0) );
if (pATI->OptionMMIOCache) {
/* Now that the cache slots reflect the register state, re-enable MMIO cache */
CacheRegister(SRC_CNTL);
CacheRegister(HOST_CNTL);
CacheRegister(PAT_CNTL);
CacheRegister(SC_LEFT_RIGHT);
CacheRegister(SC_TOP_BOTTOM);
CacheRegister(DP_BKGD_CLR);
CacheRegister(DP_FRGD_CLR);
CacheRegister(DP_WRITE_MASK);
CacheRegister(DP_MIX);
CacheRegister(CLR_CMP_CNTL);
}
ATIMach64WaitForIdle(pATI);
if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache) {
/* Only check registers we didn't restore */
TestRegisterCaching(PAT_REG0);
TestRegisterCaching(PAT_REG1);
TestRegisterCaching(CLR_CMP_CLR);
TestRegisterCaching(CLR_CMP_MSK);
if (pATI->Block1Base)
{
TestRegisterCaching(OVERLAY_Y_X_START);
TestRegisterCaching(OVERLAY_Y_X_END);
TestRegisterCaching(OVERLAY_GRAPHICS_KEY_CLR);
TestRegisterCaching(OVERLAY_GRAPHICS_KEY_MSK);
TestRegisterCaching(OVERLAY_KEY_CNTL);
TestRegisterCaching(OVERLAY_SCALE_INC);
TestRegisterCaching(OVERLAY_SCALE_CNTL);
TestRegisterCaching(SCALER_HEIGHT_WIDTH);
TestRegisterCaching(SCALER_TEST);
TestRegisterCaching(VIDEO_FORMAT);
if (pATI->Chip < ATI_CHIP_264VTB)
{
TestRegisterCaching(BUF0_OFFSET);
TestRegisterCaching(BUF0_PITCH);
TestRegisterCaching(BUF1_OFFSET);
TestRegisterCaching(BUF1_PITCH);
}
else
{
TestRegisterCaching(SCALER_BUF0_OFFSET);
TestRegisterCaching(SCALER_BUF1_OFFSET);
TestRegisterCaching(SCALER_BUF_PITCH);
TestRegisterCaching(OVERLAY_EXCLUSIVE_HORZ);
TestRegisterCaching(OVERLAY_EXCLUSIVE_VERT);
if (pATI->Chip >= ATI_CHIP_264GTPRO)
{
TestRegisterCaching(SCALER_COLOUR_CNTL);
TestRegisterCaching(SCALER_H_COEFF0);
TestRegisterCaching(SCALER_H_COEFF1);
TestRegisterCaching(SCALER_H_COEFF2);
TestRegisterCaching(SCALER_H_COEFF3);
TestRegisterCaching(SCALER_H_COEFF4);
TestRegisterCaching(SCALER_BUF0_OFFSET_U);
TestRegisterCaching(SCALER_BUF0_OFFSET_V);
TestRegisterCaching(SCALER_BUF1_OFFSET_U);
TestRegisterCaching(SCALER_BUF1_OFFSET_V);
}
}
}
}
pATI->NeedDRISync = FALSE;
}
else
#endif /* XF86DRI */
{
ATIMach64WaitForIdle(pATI);
if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache)
{
/*
* For debugging purposes, attempt to verify that each cached register
* should actually be cached.
......@@ -227,6 +368,7 @@ ATIMach64Sync
}
}
}
}
}
/*
......@@ -235,6 +377,9 @@ ATIMach64Sync
* caching of framebuffer data I haven't found any way of disabling, or
* otherwise circumventing. Thanks to Mark Vojkovich for the suggestion.
*/
if (pATI->pXAAInfo)
pATI->pXAAInfo->NeedToSync = FALSE;
pATI = *(volatile ATIPtr *)pATI->pMemory;
}
......@@ -257,6 +402,8 @@ ATIMach64SetupForScreenToScreenCopy
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);
ATIMach64WaitForFIFO(pATI, 3);
outf(DP_WRITE_MASK, planemask);
outf(DP_SRC, DP_MONO_SRC_ALLONES |
......@@ -319,6 +466,8 @@ ATIMach64SubsequentScreenToScreenCopy
xDst *= pATI->XModifier;
w *= pATI->XModifier;
ATIDRISync(pScreenInfo);
/* Disable clipping if it gets in the way */
ATIMach64ValidateClip(pATI, xDst, xDst + w - 1, yDst, yDst + h - 1);
......@@ -360,6 +509,8 @@ ATIMach64SetupForSolidFill
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);
ATIMach64WaitForFIFO(pATI, 5);
outf(DP_WRITE_MASK, planemask);
outf(DP_SRC, DP_MONO_SRC_ALLONES |
......@@ -390,6 +541,8 @@ ATIMach64SubsequentSolidFillRect
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);
if (pATI->XModifier != 1)
{
x *= pATI->XModifier;
......@@ -424,6 +577,8 @@ ATIMach64SetupForSolidLine
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);
ATIMach64WaitForFIFO(pATI, 5);
outf(DP_WRITE_MASK, planemask);
outf(DP_SRC, DP_MONO_SRC_ALLONES |
......@@ -455,6 +610,8 @@ ATIMach64SubsequentSolidHorVertLine
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);
ATIMach64WaitForFIFO(pATI, 3);
outf(DST_CNTL, DST_X_DIR | DST_Y_DIR);
outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0));
......@@ -495,6 +652,8 @@ ATIMach64SubsequentSolidBresenhamLine
if (!(octant & YDECREASING))
dst_cntl |= DST_Y_DIR;
ATIDRISync(pScreenInfo);
ATIMach64WaitForFIFO(pATI, 6);
outf(DST_CNTL, dst_cntl);
outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0));
......@@ -524,6 +683,8 @@ ATIMach64SetupForMono8x8PatternFill
{
ATIPtr pATI = ATIPTR(pScreenInfo);
ATIDRISync(pScreenInfo);