summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c76
1 files changed, 50 insertions, 26 deletions
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 15eb26662..28809312a 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.2 2000/11/08 23:13:10 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v 1.6 2000/11/28 17:25:12 dawes Exp $ */
/*
* Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
* Precision Insight, Inc., Cedar Park, Texas, and
@@ -21,7 +21,7 @@
* 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 ATI, PRECISION INSIGHT, VA LINUX
+ * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX
* SYSTEMS AND/OR THEIR 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
@@ -59,25 +59,23 @@
*/
- /* X and server generic header files */
-#include "xf86.h"
-#include "xf86_ansic.h"
-#include "xf86_OSproc.h"
-#include "xf86Resources.h"
-#include "xf86RAC.h"
-#include "xf86cmap.h"
-#include "xf86fbman.h"
-#include "xf86int10.h"
- /* Backing store, software cursor, and
- colormap initialization */
-#include "mibstore.h"
-#include "mipointer.h"
-#include "micmap.h"
+ /* Driver data structures */
+#include "r128.h"
+#include "r128_probe.h"
+#include "r128_reg.h"
+#include "r128_version.h"
+
+#ifdef XF86DRI
+#define _XF86DRI_SERVER_
+#include "r128_dri.h"
+#include "r128_sarea.h"
+#endif
#define USE_FB /* not until overlays */
#ifdef USE_FB
#include "fb.h"
#else
+
/* CFB support */
#define PSZ 8
#include "cfb.h"
@@ -87,17 +85,26 @@
#include "cfb32.h"
#include "cfb24_32.h"
#endif
- /* Driver data structures */
-#include "r128.h"
-#include "r128_probe.h"
-#include "r128_reg.h"
-#include "r128_version.h"
+
+ /* colormap initialization */
+#include "micmap.h"
+
+ /* X and server generic header files */
+#include "xf86.h"
+#include "xf86_OSproc.h"
+#include "xf86PciInfo.h"
+#include "xf86RAC.h"
+#include "xf86cmap.h"
+#include "vbe.h"
+
+ /* fbdevhw & vgahw */
+#include "fbdevhw.h"
+#include "vgaHW.h"
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
-
/* Forward definitions for driver functions */
static Bool R128CloseScreen(int scrnIndex, ScreenPtr pScreen);
static Bool R128SaveScreen(ScreenPtr pScreen, int mode);
@@ -261,15 +268,29 @@ static const char *ramdacSymbols[] = {
static const char *drmSymbols[] = {
"drmAddBufs",
"drmAddMap",
+ "drmAgpAcquire",
+ "drmAgpAlloc",
+ "drmAgpBind",
+ "drmAgpDeviceId",
+ "drmAgpEnable",
+ "drmAgpFree",
+ "drmAgpGetMode",
+ "drmAgpRelease",
+ "drmAgpUnbind",
+ "drmAgpVendorId",
"drmAvailable",
"drmCtlAddCommand",
"drmCtlInstHandler",
+ "drmFreeVersion",
"drmGetInterruptFromBusID",
+ "drmGetVersion",
+ "drmMap",
"drmMapBufs",
"drmMarkBufs",
+ "drmR128CleanupCCE",
+ "drmR128InitCCE",
+ "drmUnmap",
"drmUnmapBufs",
- "drmFreeVersion",
- "drmGetVersion",
NULL
};
@@ -402,7 +423,7 @@ static Bool R128UnmapMem(ScrnInfoPtr pScrn)
}
/* Read PLL information */
-int R128INPLL(ScrnInfoPtr pScrn, int addr)
+unsigned R128INPLL(ScrnInfoPtr pScrn, int addr)
{
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = info->MMIO;
@@ -826,6 +847,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
case PCI_CHIP_RAGE128ML: info->HasPanelRegs = TRUE; break;
case PCI_CHIP_RAGE128RE:
case PCI_CHIP_RAGE128RF:
+ case PCI_CHIP_RAGE128RG:
case PCI_CHIP_RAGE128RK:
case PCI_CHIP_RAGE128RL:
case PCI_CHIP_RAGE128PF:
@@ -856,7 +878,8 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
case PCI_CHIP_RAGE128MF:
case PCI_CHIP_RAGE128ML:
case PCI_CHIP_RAGE128RE:
- case PCI_CHIP_RAGE128RF: offset = 0; break; /* 128-bit SDR SGRAM 1:1 */
+ case PCI_CHIP_RAGE128RF:
+ case PCI_CHIP_RAGE128RG: offset = 0; break; /* 128-bit SDR SGRAM 1:1 */
case PCI_CHIP_RAGE128RK:
case PCI_CHIP_RAGE128RL:
default: offset = 1; break; /* 64-bit SDR SGRAM 1:1 */
@@ -931,6 +954,7 @@ static Bool R128PreInitConfig(ScrnInfoPtr pScrn)
case PCI_CHIP_RAGE128MF:
case PCI_CHIP_RAGE128ML:
case PCI_CHIP_RAGE128RF:
+ case PCI_CHIP_RAGE128RG:
case PCI_CHIP_RAGE128RL:
case PCI_CHIP_RAGE128PF:
default: info->IsPCI = FALSE; break;