summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/ati
diff options
context:
space:
mode:
authordawes <dawes>2001-04-09 21:55:45 +0000
committerdawes <dawes>2001-04-09 21:55:45 +0000
commitaa523996abb9535003c3f03ef4be253eeed26a43 (patch)
treebd81ea8c94a2baf5132aea721e277e78aaee1ebe /xc/programs/Xserver/hw/xfree86/drivers/ati
parentacda79cb882d0fd8b59b52d61ec88dde275017e2 (diff)
First pass of XFree86 4.0.99.2 merge.
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/ati')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile20
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h8
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c10
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c11
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c49
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c16
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c22
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c24
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c14
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c49
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c18
21 files changed, 152 insertions, 123 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile
index 236e025cc..756445cd1 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile,v 1.28 2001/01/24 00:06:15 dawes Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile,v 1.29 2001/03/25 05:32:07 tsi Exp $
XCOMM
XCOMM Copyright 1997 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
XCOMM
@@ -107,9 +107,10 @@ DEFINES = $(CPIODEFINES) $(DRIDEFINES)
SRCS1 = ati.c atiadapter.c atibus.c atichip.c atiident.c atioption.c \
atiprobe.c atividmem.c $(MODSRCS1) $(CPIOSRCS1) \
radeon_probe.c r128_probe.c
-SRCS2 = atiadjust.c aticlock.c aticonfig.c aticonsole.c atidac.c atidga.c \
- atidsp.c atilock.c atimach64.c atimach64io.c atimode.c atipreinit.c \
- atiprint.c atiscreen.c atiutil.c ativalid.c $(MODSRCS2) $(CPIOSRCS2)
+SRCS2 = atiaccel.c atiadjust.c aticlock.c aticonfig.c aticonsole.c \
+ aticursor.c atidac.c atidga.c atidsp.c atilock.c atimach64.c \
+ atimach64io.c atimode.c atipreinit.c atiprint.c atiscreen.c atiutil.c \
+ ativalid.c $(MODSRCS2) $(CPIOSRCS2)
SRCS3 = r128_accel.c r128_cursor.c r128_dga.c r128_driver.c r128_video.c \
$(MODSRCS3) $(DRISRCS3)
SRCS4 = radeon_accel.c radeon_cursor.c radeon_dga.c radeon_driver.c \
@@ -118,9 +119,10 @@ SRCS4 = radeon_accel.c radeon_cursor.c radeon_dga.c radeon_driver.c \
OBJS1 = ati.o atiadapter.o atibus.o atichip.o atiident.o atioption.o \
atiprobe.o atividmem.o $(MODOBJS1) $(CPIOOBJS1) \
radeon_probe.o r128_probe.o
-OBJS2 = atiadjust.o aticlock.o aticonfig.o aticonsole.o atidac.o atidga.o \
- atidsp.o atilock.o atimach64.o atimach64io.o atimode.o atipreinit.o \
- atiprint.o atiscreen.o atiutil.o ativalid.o $(MODOBJS2) $(CPIOOBJS2)
+OBJS2 = atiaccel.o atiadjust.o aticlock.o aticonfig.o aticonsole.o \
+ aticursor.o atidac.o atidga.o atidsp.o atilock.o atimach64.o \
+ atimach64io.o atimode.o atipreinit.o atiprint.o atiscreen.o atiutil.o \
+ ativalid.o $(MODOBJS2) $(CPIOOBJS2)
OBJS3 = r128_accel.o r128_cursor.o r128_dga.o r128_driver.o r128_video.o \
$(MODOBJS3) $(DRIOBJS3)
OBJS4 = radeon_accel.o radeon_cursor.o radeon_dga.o radeon_driver.o \
@@ -173,6 +175,8 @@ InstallDriverSDKNonExecFile(Imakefile,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(ati.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(ati.cpp,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(ati.h,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(atiaccel.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(atiaccel.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atiadapter.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atiadapter.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atiadjust.c,$(DRIVERSDKDIR)/drivers/ati)
@@ -192,6 +196,8 @@ InstallDriverSDKNonExecFile(aticonfig.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(aticonsole.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(aticonsole.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(aticrtc.h,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(aticursor.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(aticursor.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atidac.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atidac.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(atidga.c,$(DRIVERSDKDIR)/drivers/ati)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h
index 3ca64947a..502081653 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h,v 1.7 2001/02/12 03:31:05 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atimach64io.h,v 1.8 2001/03/25 05:32:08 tsi Exp $ */
/*
* Copyright 2000 through 2001 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
*
@@ -187,7 +187,7 @@ extern void ATIAccessMach64PLLReg FunctionPrototype((ATIPtr, const CARD8,
{ \
ATIAccessMach64PLLReg(pATI, _Index, TRUE); \
out8(CLOCK_CNTL + 2, _Value); \
- } while(0)
+ } while (0)
#define ATIGetMach64LCDReg(_Index) \
( \
@@ -199,7 +199,7 @@ extern void ATIAccessMach64PLLReg FunctionPrototype((ATIPtr, const CARD8,
{ \
out8(LCD_INDEX, SetBits(_Index, LCD_REG_INDEX)); \
outr(LCD_DATA, _Value); \
- } while(0)
+ } while (0)
#define ATIGetMach64TVReg(_Index) \
( \
@@ -211,6 +211,6 @@ extern void ATIAccessMach64PLLReg FunctionPrototype((ATIPtr, const CARD8,
{ \
out8(TV_OUT_INDEX, SetBits(_Index, TV_REG_INDEX)); \
outr(TV_OUT_DATA, _Value); \
- } while(0)
+ } while (0)
#endif /* ___ATIMACH64IO_H___ */
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c
index 8e8ebc465..699c91d99 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c,v 1.6 2000/12/22 05:27:45 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_accel.c,v 1.8 2001/03/03 22:26:09 tsi Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -402,7 +402,7 @@ static void R128SetupForDashedLine(ScrnInfoPtr pScrn,
{
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = info->MMIO;
- CARD32 pat = *(CARD32 *)pattern;
+ CARD32 pat = *(CARD32 *)(pointer)pattern;
#ifdef XF86DRI
R128CCE_TO_MMIO(pScrn, info);
@@ -820,13 +820,13 @@ static void R128SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
OUTREG(R128_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 R128SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
{
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = 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;
@@ -968,7 +968,7 @@ static void R128SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
{
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = 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;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c
index 44b90300e..4b52c8d25 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c,v 1.4 2000/12/22 05:27:45 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_cursor.c,v 1.5 2001/03/03 22:26:09 tsi Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -107,8 +107,8 @@ static void R128LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image)
{
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = info->MMIO;
- CARD32 *s = (CARD32 *)image;
- CARD32 *d = (CARD32 *)(info->FB + info->cursor_start);
+ CARD32 *s = (pointer)image;
+ CARD32 *d = (pointer)(info->FB + info->cursor_start);
int y;
CARD32 save;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
index a7c7cdf42..29080224e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v 1.9 2001/01/08 01:07:34 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c,v 1.12 2001/03/21 19:46:26 dawes Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h
index 070a3751d..5ef9cdfee 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h,v 1.5 2001/01/08 01:07:34 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.h,v 1.6 2001/03/21 17:02:21 dawes Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
index ad254d7a4..17e709243 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v 1.22 2001/02/15 11:03:56 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v 1.25 2001/04/03 17:10:36 tsi Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -1422,7 +1422,8 @@ Bool R128PreInit(ScrnInfoPtr pScrn, int flags)
if (!R128GetPLLParameters(pScrn)) goto fail;
- if (!R128PreInitDDC(pScrn, pInt10)) goto fail;
+ /* Don't fail on this one */
+ R128PreInitDDC(pScrn, pInt10);
if (!R128PreInitGamma(pScrn)) goto fail;
@@ -1538,6 +1539,7 @@ Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
R128InfoPtr info = R128PTR(pScrn);
BoxRec MemBox;
+ int y2;
R128TRACE(("R128ScreenInit %x %d\n", pScrn->memPhysBase, pScrn->fbOffset));
@@ -1848,13 +1850,14 @@ Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
MemBox.x1 = 0;
MemBox.y1 = 0;
MemBox.x2 = pScrn->displayWidth;
- MemBox.y2 = (info->FbMapSize
+ y2 = (info->FbMapSize
/ (pScrn->displayWidth *
info->CurrentLayout.pixel_bytes));
/* The acceleration engine uses 14 bit
signed coordinates, so we can't have any
drawable caches beyond this region. */
- if (MemBox.y2 > 8191) MemBox.y2 = 8191;
+ if (y2 > 8191) y2 = 8191;
+ MemBox.y2 = y2;
if (!xf86InitFBManager(pScreen, &MemBox)) {
xf86DrvMsg(scrnIndex, X_ERROR,
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c
index 520ec36d9..39921b245 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c,v 1.8 2001/02/12 04:24:24 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_probe.c,v 1.9 2001/04/01 14:00:09 tsi Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -48,6 +48,32 @@
#include "xf86_ansic.h"
#include "xf86Resources.h"
+#ifdef XFree86LOADER
+
+/*
+ * The following exists to prevent the compiler from considering entry points
+ * defined in a separate module from being constants.
+ */
+static xf86PreInitProc * const volatile PreInitProc = R128PreInit;
+static xf86ScreenInitProc * const volatile ScreenInitProc = R128ScreenInit;
+static xf86SwitchModeProc * const volatile SwitchModeProc = R128SwitchMode;
+static xf86AdjustFrameProc * const volatile AdjustFrameProc = R128AdjustFrame;
+static xf86EnterVTProc * const volatile EnterVTProc = R128EnterVT;
+static xf86LeaveVTProc * const volatile LeaveVTProc = R128LeaveVT;
+static xf86FreeScreenProc * const volatile FreeScreenProc = R128FreeScreen;
+static xf86ValidModeProc * const volatile ValidModeProc = R128ValidMode;
+
+#define R128PreInit PreInitProc
+#define R128ScreenInit ScreenInitProc
+#define R128SwitchMode SwitchModeProc
+#define R128AdjustFrame AdjustFrameProc
+#define R128EnterVT EnterVTProc
+#define R128LeaveVT LeaveVTProc
+#define R128FreeScreen FreeScreenProc
+#define R128ValidMode ValidModeProc
+
+#endif
+
SymTabRec R128Chipsets[] = {
{ PCI_CHIP_RAGE128RE, "ATI Rage 128 RE (PCI)" },
{ PCI_CHIP_RAGE128RF, "ATI Rage 128 RF (AGP)" },
@@ -166,6 +192,7 @@ R128Probe(DriverPtr drv, int flags)
ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
#ifdef XFree86LOADER
+
if (!xf86LoadSubModule(pScrn, "r128")) {
xf86Msg(X_ERROR,
R128_NAME ": Failed to load \"r128\" module.\n");
@@ -175,26 +202,6 @@ R128Probe(DriverPtr drv, int flags)
xf86LoaderReqSymLists(R128Symbols, NULL);
-#ifndef ELFDEBUG
- /* Workaround for possible loader bug */
-# define R128PreInit \
- (xf86PreInitProc*) LoaderSymbol("R128PreInit")
-# define R128ScreenInit \
- (xf86ScreenInitProc*) LoaderSymbol("R128ScreenInit")
-# define R128SwitchMode \
- (xf86SwitchModeProc*) LoaderSymbol("R128SwitchMode")
-# define R128AdjustFrame \
- (xf86AdjustFrameProc*)LoaderSymbol("R128AdjustFrame")
-# define R128EnterVT \
- (xf86EnterVTProc*) LoaderSymbol("R128EnterVT")
-# define R128LeaveVT \
- (xf86LeaveVTProc*) LoaderSymbol("R128LeaveVT")
-# define R128FreeScreen \
- (xf86FreeScreenProc*) LoaderSymbol("R128FreeScreen")
-# define R128ValidMode \
- (xf86ValidModeProc*) LoaderSymbol("R128ValidMode")
-#endif
-
#endif
pScrn->driverVersion = R128_VERSION_CURRENT;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h
index 81d4c2fe2..61f22477f 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h,v 1.9 2001/01/16 05:11:07 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h,v 1.10 2001/03/03 22:26:09 tsi Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -59,7 +59,7 @@
#define OUTREG16(addr, val) MMIO_OUT16(R128MMIO, addr, val)
#define OUTREG(addr, val) MMIO_OUT32(R128MMIO, addr, val)
-#define ADDRREG(addr) ((volatile CARD32 *)(R128MMIO + (addr)))
+#define ADDRREG(addr) ((volatile CARD32 *)(pointer)(R128MMIO + (addr)))
#define OUTREGP(addr, val, mask) \
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c
index f532e15cd..586eec9d4 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c,v 1.17 2001/01/25 02:26:00 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c,v 1.18 2001/03/03 22:26:10 tsi Exp $ */
#include "r128.h"
#include "r128_reg.h"
@@ -37,7 +37,7 @@ static int R128QueryImageAttributes(ScrnInfoPtr, int, unsigned short *,
static void R128ResetVideo(ScrnInfoPtr);
-static void R128VideoTimerCallback(ScrnInfoPtr pScrn, Time time);
+static void R128VideoTimerCallback(ScrnInfoPtr pScrn, Time now);
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
@@ -253,8 +253,8 @@ RegionsEqual(RegionPtr A, RegionPtr B)
(A->extents.y2 != B->extents.y2))
return FALSE;
- dataA = (int*)REGION_RECTS(A);
- dataB = (int*)REGION_RECTS(B);
+ dataA = (pointer)REGION_RECTS(A);
+ dataB = (pointer)REGION_RECTS(B);
while(num--) {
if((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
@@ -953,21 +953,21 @@ R128QueryImageAttributes(
}
static void
-R128VideoTimerCallback(ScrnInfoPtr pScrn, Time time)
+R128VideoTimerCallback(ScrnInfoPtr pScrn, Time now)
{
R128InfoPtr info = R128PTR(pScrn);
R128PortPrivPtr pPriv = info->adaptor->pPortPrivates[0].ptr;
if(pPriv->videoStatus & TIMER_MASK) {
if(pPriv->videoStatus & OFF_TIMER) {
- if(pPriv->offTime < time) {
+ if(pPriv->offTime < now) {
unsigned char *R128MMIO = info->MMIO;
OUTREG(R128_OV0_SCALE_CNTL, 0);
pPriv->videoStatus = FREE_TIMER;
- pPriv->freeTime = time + FREE_DELAY;
+ pPriv->freeTime = now + FREE_DELAY;
}
} else { /* FREE_TIMER */
- if(pPriv->freeTime < time) {
+ if(pPriv->freeTime < now) {
if(pPriv->linear) {
xf86FreeOffscreenLinear(pPriv->linear);
pPriv->linear = NULL;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
index 13da7345d..659ff50a3 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v 1.13 2001/01/21 21:19:19 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v 1.16 2001/03/25 05:32:09 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -486,7 +486,7 @@ do { \
(n) * (int)sizeof(CARD32) > RING_THRESHOLD ) { \
RADEONCPFlushIndirect( pScrn ); \
} \
- __head = (CARD32 *)((char *)info->indirectBuffer->address + \
+ __head = (pointer)((char *)info->indirectBuffer->address + \
info->indirectBuffer->used); \
__count = 0; \
} while (0)
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 64fe54041..56faec80e 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,8 +723,8 @@ static void RADEONSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr
info->scanline_h = h;
info->scanline_words = (w + 31) >> 5;
-#if defined(__alpha__)
- /* always force indirect for Alpha */
+#ifdef __alpha__
+ /* always use indirect for Alpha */
if (0)
#else
if ((info->scanline_words * h) <= 9)
@@ -751,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;
@@ -765,7 +765,7 @@ static void RADEONSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
if (info->scanline_direct) return;
--info->scanline_h;
while (left) {
- write_mem_barrier();
+ write_mem_barrier();
if (left <= 8) {
/* Last scanline - finish write to DATA_LAST */
if (info->scanline_h == 0) {
@@ -843,8 +843,8 @@ static void RADEONSubsequentScanlineImageWriteRect(ScrnInfoPtr pScrn,
info->scanline_h = h;
info->scanline_words = (w * info->scanline_bpp + 31) >> 5;
-#if defined(__alpha__)
- /* always force indirect for Alpha */
+#ifdef __alpha__
+ /* always use indirect for Alpha */
if (0)
#else
if ((info->scanline_words * h) <= 9)
@@ -877,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;
@@ -885,7 +885,7 @@ static void RADEONSubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
if (info->scanline_direct) return;
--info->scanline_h;
while (left) {
- write_mem_barrier();
+ write_mem_barrier();
if (left <= 8) {
/* Last scanline - finish write to DATA_LAST */
if (info->scanline_h == 0) {
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c
index fe218e760..1cf9a2bc6 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c,v 1.4 2000/12/22 05:27:47 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c,v 1.5 2001/03/03 22:26:10 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -109,8 +109,8 @@ static void RADEONLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
- CARD32 *s = (CARD32 *)image;
- CARD32 *d = (CARD32 *)(info->FB + info->cursor_start);
+ CARD32 *s = (pointer)image;
+ CARD32 *d = (pointer)(info->FB + info->cursor_start);
int y;
CARD32 save;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
index 31ad8b126..26d2690c4 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
@@ -1,4 +1,4 @@
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v 1.10 2001/04/01 14:00:09 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario,
* VA Linux Systems Inc., Fremont, California.
@@ -382,7 +382,7 @@ static CARD32 radeon_mba_z16(RADEONInfoPtr info,
address |= (ba & 0x3) << 8; /* a[8..9] = ba[0..1] */
address |= (y & 0x8) << 7; /* a[10] = y[3] */
address |= ((x & 0x10) ^ (y & 0x10)) << 7; /* a[11] = x[4] ^ y[4] */
- address |= (ba & ~0x3) << 10; /* a[12..] = ba[2..] */
+ address |= (ba & ~0x3u) << 10; /* a[12..] = ba[2..] */
return address;
}
@@ -404,29 +404,30 @@ static CARD32 radeon_mba_z32(RADEONInfoPtr info,
address |= (y & 0x8) << 7; /* a[10] = y[3] */
address |=
(((x & 0x8) << 1) ^ (y & 0x10)) << 7; /* a[11] = x[3] ^ y[4] */
- address |= (ba & ~0x3) << 10; /* a[12..] = ba[2..] */
+ address |= (ba & ~0x3u) << 10; /* a[12..] = ba[2..] */
return address;
}
/* 16-bit depth buffer functions */
#define WRITE_DEPTH16(_x, _y, d) \
- *(CARD16 *)(buf + radeon_mba_z16(info, (_x), (_y))) = (d)
+ *(CARD16 *)(pointer)(buf + radeon_mba_z16(info, (_x), (_y))) = (d)
#define READ_DEPTH16(d, _x, _y) \
- (d) = *(CARD16 *)(buf + radeon_mba_z16(info, (_x), (_y)))
+ (d) = *(CARD16 *)(pointer)(buf + radeon_mba_z16(info, (_x), (_y)))
/* 24 bit depth, 8 bit stencil depthbuffer functions */
#define WRITE_DEPTH32(_x, _y, d) \
do { \
- CARD32 tmp = *(CARD32 *)(buf + radeon_mba_z32(info, (_x), (_y))); \
+ CARD32 tmp = \
+ *(CARD32 *)(pointer)(buf + radeon_mba_z32(info, (_x), (_y))); \
tmp &= 0xff000000; \
tmp |= ((d) & 0x00ffffff); \
- *(CARD32 *)(buf + radeon_mba_z32(info, (_x), (_y))) = tmp; \
+ *(CARD32 *)(pointer)(buf + radeon_mba_z32(info, (_x), (_y))) = tmp; \
} while (0)
#define READ_DEPTH32(d, _x, _y) \
- d = *(CARD32 *)(buf + radeon_mba_z32(info, (_x), (_y))) & 0x00ffffff
+ d = *(CARD32 *)(pointer)(buf + radeon_mba_z32(info, (_x), (_y))) & 0x00ffffff
/* Screen to screen copy of data in the depth buffer */
static void RADEONScreenToScreenCopyDepth(ScrnInfoPtr pScrn,
@@ -1196,9 +1197,10 @@ static void RADEONDRISAREAInit(ScreenPtr pScreen,
ctx->pp_rot_matrix_0 = 0x00000000;
ctx->pp_rot_matrix_1 = 0x00000000;
- ctx->rb3d_stencilrefmask = ((0x00 << RADEON_STENCIL_REF_SHIFT) |
- (0xff << RADEON_STENCIL_MASK_SHIFT) |
- (0xff << RADEON_STENCIL_WRITEMASK_SHIFT));
+ ctx->rb3d_stencilrefmask =
+ (CARD32)((0x000 << RADEON_STENCIL_REF_SHIFT) |
+ (0x0ff << RADEON_STENCIL_MASK_SHIFT) |
+ (0x0ff << RADEON_STENCIL_WRITEMASK_SHIFT));
ctx->rb3d_ropcntl = 0x00000000;
ctx->rb3d_planemask = 0xffffffff;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h
index bfbc07b40..553d54526 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h
@@ -1,4 +1,4 @@
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h,v 1.2 2001/03/21 17:02:22 dawes Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario,
* VA Linux Systems Inc., Fremont, California.
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h
index ffbd869c5..351713e56 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h
@@ -1,4 +1,4 @@
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dripriv.h,v 1.2 2001/03/21 17:02:22 dawes Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario,
* VA Linux Systems Inc., Fremont, California.
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
index 276ba052f..99e945c35 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.15 2001/01/22 02:16:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.18 2001/04/03 17:10:36 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -1660,16 +1660,19 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* Reserve space for textures */
info->textureOffset = (info->FbMapSize - info->textureSize +
- RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN;
+ RADEON_BUFFER_ALIGN) &
+ ~(CARD32)RADEON_BUFFER_ALIGN;
/* Reserve space for the shared depth buffer */
info->depthOffset = (info->textureOffset - bufferSize +
- RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN;
+ RADEON_BUFFER_ALIGN) &
+ ~(CARD32)RADEON_BUFFER_ALIGN;
info->depthPitch = pScrn->displayWidth;
/* Reserve space for the shared back buffer */
info->backOffset = (info->depthOffset - bufferSize +
- RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN;
+ RADEON_BUFFER_ALIGN) &
+ ~(CARD32)RADEON_BUFFER_ALIGN;
info->backPitch = pScrn->displayWidth;
scanlines = info->backOffset / width_bytes - 1;
@@ -1743,7 +1746,8 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* The acceleration engine uses 14 bit
signed coordinates, so we can't have any
drawable caches beyond this region. */
- if (MemBox.y2 > 8191) MemBox.y2 = 8191;
+ if (y2 > 8191) y2 = 8191;
+ MemBox.y2 = y2;
if (!xf86InitFBManager(pScreen, &MemBox)) {
xf86DrvMsg(scrnIndex, X_ERROR,
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c
index 1c0549d5e..e1fdb6c87 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c,v 1.6 2001/01/06 20:19:11 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.c,v 1.7 2001/04/01 14:00:10 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -47,6 +47,32 @@
#include "xf86_ansic.h"
#include "xf86Resources.h"
+#ifdef XFree86LOADER
+
+/*
+ * The following exists to prevent the compiler from considering entry points
+ * defined in a separate module from being constants.
+ */
+static xf86PreInitProc * const volatile PreInitProc = RADEONPreInit;
+static xf86ScreenInitProc * const volatile ScreenInitProc = RADEONScreenInit;
+static xf86SwitchModeProc * const volatile SwitchModeProc = RADEONSwitchMode;
+static xf86AdjustFrameProc * const volatile AdjustFrameProc = RADEONAdjustFrame;
+static xf86EnterVTProc * const volatile EnterVTProc = RADEONEnterVT;
+static xf86LeaveVTProc * const volatile LeaveVTProc = RADEONLeaveVT;
+static xf86FreeScreenProc * const volatile FreeScreenProc = RADEONFreeScreen;
+static xf86ValidModeProc * const volatile ValidModeProc = RADEONValidMode;
+
+#define RADEONPreInit PreInitProc
+#define RADEONScreenInit ScreenInitProc
+#define RADEONSwitchMode SwitchModeProc
+#define RADEONAdjustFrame AdjustFrameProc
+#define RADEONEnterVT EnterVTProc
+#define RADEONLeaveVT LeaveVTProc
+#define RADEONFreeScreen FreeScreenProc
+#define RADEONValidMode ValidModeProc
+
+#endif
+
SymTabRec RADEONChipsets[] = {
{ PCI_CHIP_RADEON_QD, "ATI Radeon QD (AGP)" },
{ PCI_CHIP_RADEON_QE, "ATI Radeon QE (AGP)" },
@@ -151,6 +177,7 @@ RADEONProbe(DriverPtr drv, int flags)
ScrnInfoPtr pScrn = xf86AllocateScreen(drv, 0);
#ifdef XFree86LOADER
+
if (!xf86LoadSubModule(pScrn, "radeon")) {
xf86Msg(X_ERROR,
RADEON_NAME ": Failed to load \"radeon\" module.\n");
@@ -160,26 +187,6 @@ RADEONProbe(DriverPtr drv, int flags)
xf86LoaderReqSymLists(RADEONSymbols, NULL);
-#ifndef ELFDEBUG
- /* Workaround for possible loader bug */
-# define RADEONPreInit \
- (xf86PreInitProc*) LoaderSymbol("RADEONPreInit")
-# define RADEONScreenInit \
- (xf86ScreenInitProc*) LoaderSymbol("RADEONScreenInit")
-# define RADEONSwitchMode \
- (xf86SwitchModeProc*) LoaderSymbol("RADEONSwitchMode")
-# define RADEONAdjustFrame \
- (xf86AdjustFrameProc*)LoaderSymbol("RADEONAdjustFrame")
-# define RADEONEnterVT \
- (xf86EnterVTProc*) LoaderSymbol("RADEONEnterVT")
-# define RADEONLeaveVT \
- (xf86LeaveVTProc*) LoaderSymbol("RADEONLeaveVT")
-# define RADEONFreeScreen \
- (xf86FreeScreenProc*) LoaderSymbol("RADEONFreeScreen")
-# define RADEONValidMode \
- (xf86ValidModeProc*) LoaderSymbol("RADEONValidMode")
-#endif
-
#endif
pScrn->driverVersion = RADEON_VERSION_CURRENT;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
index 6f59b40ee..0d006dfa5 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h,v 1.6 2001/01/11 03:36:58 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h,v 1.8 2001/03/21 17:02:22 dawes Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -69,7 +69,7 @@
#define OUTREG16(addr, val) MMIO_OUT16(RADEONMMIO, addr, val)
#define OUTREG(addr, val) MMIO_OUT32(RADEONMMIO, addr, val)
-#define ADDRREG(addr) ((volatile CARD32 *)(RADEONMMIO + (addr)))
+#define ADDRREG(addr) ((volatile CARD32 *)(pointer)(RADEONMMIO + (addr)))
#define OUTREGP(addr, val, mask) \
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h
index b80f35e52..65fc9f0af 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h
@@ -1,4 +1,4 @@
-/* $XFree86$ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h,v 1.2 2001/03/21 17:02:22 dawes Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario,
* VA Linux Systems Inc., Fremont, California.
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c
index f18762c72..f4758c793 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c,v 1.10 2001/01/25 02:27:50 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c,v 1.11 2001/03/03 22:26:11 tsi Exp $ */
#include "radeon.h"
#include "radeon_reg.h"
@@ -37,7 +37,7 @@ static int RADEONQueryImageAttributes(ScrnInfoPtr, int, unsigned short *,
static void RADEONResetVideo(ScrnInfoPtr);
-static void RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time time);
+static void RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now);
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
@@ -253,8 +253,8 @@ RegionsEqual(RegionPtr A, RegionPtr B)
(A->extents.y2 != B->extents.y2))
return FALSE;
- dataA = (int*)REGION_RECTS(A);
- dataB = (int*)REGION_RECTS(B);
+ dataA = (pointer)REGION_RECTS(A);
+ dataB = (pointer)REGION_RECTS(B);
while(num--) {
if((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
@@ -506,7 +506,7 @@ RADEONCopyMungedData(
w >>= 1;
for(j = 0; j < h; j++) {
- dst = (CARD32*)dst1;
+ dst = (pointer)dst1;
s1 = src1; s2 = src2; s3 = src3;
i = w;
while(i > 4) {
@@ -841,21 +841,21 @@ RADEONQueryImageAttributes(
}
static void
-RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time time)
+RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONPortPrivPtr pPriv = info->adaptor->pPortPrivates[0].ptr;
if(pPriv->videoStatus & TIMER_MASK) {
if(pPriv->videoStatus & OFF_TIMER) {
- if(pPriv->offTime < time) {
+ if(pPriv->offTime < now) {
unsigned char *RADEONMMIO = info->MMIO;
OUTREG(RADEON_OV0_SCALE_CNTL, 0);
pPriv->videoStatus = FREE_TIMER;
- pPriv->freeTime = time + FREE_DELAY;
+ pPriv->freeTime = now + FREE_DELAY;
}
} else { /* FREE_TIMER */
- if(pPriv->freeTime < time) {
+ if(pPriv->freeTime < now) {
if(pPriv->linear) {
xf86FreeOffscreenLinear(pPriv->linear);
pPriv->linear = NULL;