summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-07-11 02:29:58 +0000
committerAdam Jackson <ajax@nwnk.net>2005-07-11 02:29:58 +0000
commit9accd592ec5f3afa5777872008d81624bbbffe54 (patch)
tree5791031aeec3845c9701277dfcf70800ca5337f1
parent6567bb5128407e9e098b602b1b0d5cd94d7bfc0b (diff)
Prep for modular builds by adding guarded #include "config.h" everywhere.XORG-6_8_99_900XORG-6_8_99_16XORG-6_8_99_15
-rw-r--r--src/accelX.c7
-rw-r--r--src/hwcursor.c6
-rw-r--r--src/rendition.c4
-rw-r--r--src/rendition_shadow.c6
-rw-r--r--src/v1krisc.c6
-rw-r--r--src/vboard.c18
-rw-r--r--src/vloaduc.c15
-rw-r--r--src/vmisc.c6
-rw-r--r--src/vmodes.c27
-rw-r--r--src/vramdac.c13
10 files changed, 85 insertions, 23 deletions
diff --git a/src/accelX.c b/src/accelX.c
index 04d92b5..88a43ce 100644
--- a/src/accelX.c
+++ b/src/accelX.c
@@ -3,10 +3,11 @@
*
* accelerator functions for X
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c,v 1.12 2002/04/04 14:05:45 eich Exp $ */
-
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/accelX.c,v 1.10 2001/06/15 21:22:54 dawes Exp $ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
/*
* includes
diff --git a/src/hwcursor.c b/src/hwcursor.c
index baf4c4d..2c19a6e 100644
--- a/src/hwcursor.c
+++ b/src/hwcursor.c
@@ -1,8 +1,12 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c,v 1.8 2002/04/04 14:05:45 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/hwcursor.c,v 1.6 2000/02/25 21:03:00 dawes Exp $ */
/*
* includes
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "rendition.h"
#include "vtypes.h"
#include "vramdac.h"
diff --git a/src/rendition.c b/src/rendition.c
index 656cb16..6216184 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -34,6 +34,10 @@
* Additions, updates and bugfixes by Dejan Ilic <dejan.ilic@home.se>
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/*
* Activate acceleration code or not.
*
diff --git a/src/rendition_shadow.c b/src/rendition_shadow.c
index cf93af5..30b8d2d 100644
--- a/src/rendition_shadow.c
+++ b/src/rendition_shadow.c
@@ -4,7 +4,11 @@
* The functions used by ShadowFB
* Based on code written by Mark Vojkovich <markv@valinux.com>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition_shadow.c,v 1.1 2000/03/01 00:25:25 dawes Exp $ */
+/* $XFree86$ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "rendition.h"
#include "vtypes.h"
diff --git a/src/v1krisc.c b/src/v1krisc.c
index dc0a42d..39d0a35 100644
--- a/src/v1krisc.c
+++ b/src/v1krisc.c
@@ -1,8 +1,12 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v1krisc.c,v 1.7 2002/01/25 21:56:07 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/v1krisc.c,v 1.6 2000/03/31 20:13:25 dawes Exp $ */
/*
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/*
* includes
*/
diff --git a/src/vboard.c b/src/vboard.c
index 4e769b6..ffc8c0e 100644
--- a/src/vboard.c
+++ b/src/vboard.c
@@ -1,8 +1,12 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vboard.c,v 1.17 2003/03/25 04:18:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vboard.c,v 1.18tsi Exp $ */
/*
* includes
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "rendition.h"
#include "v1krisc.h"
#include "vboard.h"
@@ -50,7 +54,7 @@ verite_initboard(ScrnInfoPtr pScreenInfo)
/* Note that CS ucode must wait on address in csucode_base
* when initialized for later context switch code to work. */
- ErrorF("Loading csucode @ 0x%x + 0x800\n", pRendition->board.vmem_base);
+ ErrorF("Loading csucode @ %p + 0x800\n", pRendition->board.vmem_base);
vmb=pRendition->board.vmem_base;
offset=pRendition->board.csucode_base;
for (c=0; c<sizeof(csrisc)/sizeof(vu32); c++, offset+=sizeof(vu32))
@@ -81,8 +85,8 @@ verite_initboard(ScrnInfoPtr pScreenInfo)
if (pc != pRendition->board.csucode_base){
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
("VERITE_INITBOARD -- PC != CSUCODEBASE\n"));
- ErrorF ("RENDITION: PC == 0x%x -- CSU == 0x%x\n",
- pc,pRendition->board.csucode_base);
+ ErrorF ("RENDITION: PC == 0x%x -- CSU == 0x%lx\n",
+ pc,(unsigned long)pRendition->board.csucode_base);
}
/* reset memory endian */
@@ -228,10 +232,10 @@ verite_check_csucode(ScrnInfoPtr pScreenInfo)
offset=pRendition->board.csucode_base;
for (c=0; c<sizeof(csrisc)/sizeof(vu32); c++, offset+=sizeof(vu32))
if (csrisc[c] != verite_read_memory32(vmb, offset)) {
- ErrorF("csucode mismatch in word %02d: 0x%08x should be 0x%08x\n",
+ ErrorF("csucode mismatch in word %02d: 0x%08lx should be 0x%08lx\n",
c,
- verite_read_memory32(vmb, offset),
- csrisc[c]);
+ (unsigned long)verite_read_memory32(vmb, offset),
+ (unsigned long)csrisc[c]);
mismatches++;
}
#ifdef DEBUG
diff --git a/src/vloaduc.c b/src/vloaduc.c
index cc2c6e6..4888573 100644
--- a/src/vloaduc.c
+++ b/src/vloaduc.c
@@ -1,8 +1,12 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c,v 1.12 2000/04/07 03:57:51 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vloaduc.c,v 1.13tsi Exp $ */
/*
* includes
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "rendition.h"
#include "v1kregs.h"
#include "v1krisc.h"
@@ -177,18 +181,21 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr)
vu32 physAddr=SW32(phdr->p_paddr);
if (lseek(fd, offset, SEEK_SET) != offset) {
- ErrorF("RENDITION: Failure in loadSegmentToBoard, offset %lx\n", offset);
+ ErrorF("RENDITION: Failure in loadSegmentToBoard, offset %lx\n",
+ (unsigned long)offset);
return;
}
data=(vu8 *)xalloc(size);
if (NULL == data){
- ErrorF("RENDITION: GlobalAllocPtr couldn't allocate %x bytes", size);
+ ErrorF("RENDITION: GlobalAllocPtr couldn't allocate %lx bytes",
+ (unsigned long)size);
return;
}
if (read(fd, data, size) != size){
- ErrorF("RENDITION: verite_readfile Failure, couldn't read %x bytes ", size);
+ ErrorF("RENDITION: verite_readfile Failure, couldn't read %lx bytes ",
+ (unsigned long)size);
return;
}
diff --git a/src/vmisc.c b/src/vmisc.c
index fec54ed..0bd8c6a 100644
--- a/src/vmisc.c
+++ b/src/vmisc.c
@@ -1,5 +1,9 @@
/* Misc routines used elsewhere in driver */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c,v 1.4 2000/03/31 20:13:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmisc.c,v 1.3 2000/02/25 21:03:05 dawes Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "rendition.h"
#include "vtypes.h"
diff --git a/src/vmodes.c b/src/vmodes.c
index 3e0bfd3..834bfc1 100644
--- a/src/vmodes.c
+++ b/src/vmodes.c
@@ -5,6 +5,10 @@
* Routines that handle mode setting.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/*
* includes
*/
@@ -376,7 +380,16 @@ verite_restore(ScrnInfoPtr pScreenInfo, RenditionRegPtr reg)
int iob=pRendition->board.io_base;
verite_restoredac (pScreenInfo, reg);
- verite_out32(iob+MODEREG,reg->mode);
+ /*
+ * If this is a Verite 1000, restore the MODEREG
+ * register now. The MODEREG gets restored later
+ * for the Verite 2x00 because restoring it here
+ * has been confirmed to cause intermittent
+ * system locks.
+ */
+ if (pRendition->board.chip == V1000_DEVICE) {
+ verite_out32(iob+MODEREG,reg->mode);
+ }
verite_out8(iob+MEMENDIAN,reg->memendian);
verite_out32(iob+DRAMCTL,reg->dramctl);
verite_out32(iob+SCLKPLL,reg->sclkpll);
@@ -397,6 +410,18 @@ verite_restore(ScrnInfoPtr pScreenInfo, RenditionRegPtr reg)
while ((verite_in32(iob+CRTCSTATUS)&CRTCSTATUS_VERT_MASK) ==
CRTCSTATUS_VERT_ACTIVE);
}
+
+ /*
+ * If this is a Verite 2x00, restore the MODEREG
+ * register now. The MODEREG register is restored
+ * earlier for the Verite 1000, but is restored
+ * here for the Verite 2x00 to prevent system
+ * locks.
+ */
+ if (pRendition->board.chip != V1000_DEVICE) {
+ verite_out32(iob+MODEREG,reg->mode);
+ }
+
verite_out32(iob+CRTCHORZ,reg->crtch);
verite_out32(iob+CRTCVERT,reg->crtcv);
verite_out32(iob+FRAMEBASEA, reg->vbasea);
diff --git a/src/vramdac.c b/src/vramdac.c
index 7652a36..9cb5409 100644
--- a/src/vramdac.c
+++ b/src/vramdac.c
@@ -3,6 +3,10 @@
* includes
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "rendition.h"
#include "vramdac.h"
#include "vos.h"
@@ -170,8 +174,9 @@ verite_initdac(ScrnInfoPtr pScreenInfo, vu8 bpp, vu8 doubleclock)
switch (bpp) {
case 1:
case 4:
- ErrorF("%s %s: color depth %d not (yet ?) supported\n",
- X_CONFIG, /*vga256InfoRec.name*/"Rendition", bpp);
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
+ "color depth %d not (yet ?) supported\n",
+ bpp);
return -1;
case 8:
@@ -232,8 +237,8 @@ verite_initdac(ScrnInfoPtr pScreenInfo, vu8 bpp, vu8 doubleclock)
break;
default:
- ErrorF( "%s %s: Color depth not supported (%d bpp)\n",
- X_CONFIG, /*vga256InfoRec.name*/"Rendition", bpp);
+ xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
+ "Color depth not supported (%d bpp)\n", bpp);
return -1;
break;
}