diff options
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c index bdb30cd74..55c481090 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c,v 1.9 2001/01/21 21:19:20 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c,v 1.13 2001/03/28 20:08:22 alanh Exp $ */ /* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. @@ -476,7 +476,7 @@ static void RADEONSetupForDashedLine(ScrnInfoPtr pScrn, { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; - CARD32 pat = *(CARD32 *)pattern; + CARD32 pat = *(CARD32 *)(pointer)pattern; switch (length) { case 2: pat |= pat << 2; /* fall through */ @@ -723,7 +723,13 @@ static void RADEONSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr info->scanline_h = h; info->scanline_words = (w + 31) >> 5; - if ((info->scanline_words * h) <= 9) { +#ifdef __alpha__ + /* always use indirect for Alpha */ + if (0) +#else + if ((info->scanline_words * h) <= 9) +#endif + { /* Turn on direct for less than 9 dword colour expansion */ info->scratch_buffer[0] = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST) @@ -745,13 +751,13 @@ static void RADEONSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr OUTREG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | ((w + 31) & ~31)); } -/* Subsequent XAA indirect CPU-to-screen color expandion. This is called +/* Subsequent XAA indirect CPU-to-screen color expansion. This is called once for each scanline. */ static void RADEONSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; - CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + CARD32 *p = (pointer)info->scratch_buffer[bufno]; int i; int left = info->scanline_words; volatile CARD32 *d; @@ -759,6 +765,7 @@ static void RADEONSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) if (info->scanline_direct) return; --info->scanline_h; while (left) { + write_mem_barrier(); if (left <= 8) { /* Last scanline - finish write to DATA_LAST */ if (info->scanline_h == 0) { @@ -836,7 +843,13 @@ static void RADEONSubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn, info->scanline_h = h; info->scanline_words = (w * info->scanline_bpp + 31) >> 5; - if ((info->scanline_words * h) <= 9) { +#ifdef __alpha__ + /* always use indirect for Alpha */ + if (0) +#else + if ((info->scanline_words * h) <= 9) +#endif + { /* Turn on direct for less than 9 dword colour expansion */ info->scratch_buffer[0] = (unsigned char *)(ADDRREG(RADEON_HOST_DATA_LAST) @@ -864,7 +877,7 @@ static void RADEONSubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; - CARD32 *p = (CARD32 *)info->scratch_buffer[bufno]; + CARD32 *p = (pointer)info->scratch_buffer[bufno]; int i; int left = info->scanline_words; volatile CARD32 *d; @@ -872,6 +885,7 @@ static void RADEONSubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno) if (info->scanline_direct) return; --info->scanline_h; while (left) { + write_mem_barrier(); if (left <= 8) { /* Last scanline - finish write to DATA_LAST */ if (info->scanline_h == 0) { |