summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/rendition
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/rendition')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile3
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c66
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man112
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c15
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h13
7 files changed, 165 insertions, 53 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile b/xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile
index dc269207c..0312c431d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile
@@ -1,4 +1,4 @@
-XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile,v 1.17 2000/09/20 00:09:27 keithp Exp $
+XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/Imakefile,v 1.18 2001/01/24 00:06:26 dawes Exp $
XCOMM
XCOMM This is an Imakefile for the Rendition driver.
@@ -50,7 +50,6 @@ InstallNonExecFile(v10002d.uc,$(MODULEDIR))
InstallNonExecFile(v20002d.uc,$(MODULEDIR))
#if !defined(XF86DriverSDK)
-CppManTarget(rendition,)
InstallModuleManPage(rendition)
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c
index 0171707e4..a12d8171e 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c,v 1.38 2000/12/14 16:33:10 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.c,v 1.40 2001/02/15 17:50:33 eich Exp $ */
/*
* Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -527,8 +527,12 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
_END };
xf86SetOperatingState(vgamem, pRendition->pEnt->index, ResUnusedOpr);
}
+
+ if (xf86RegisterResources(pRendition->pEnt->index, NULL, ResExclusive))
+ return FALSE;
+
/* Operations for which memory access is required. */
- pScreenInfo->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
+ pScreenInfo->racMemFlags = RAC_FB | RAC_CURSOR;
/* Operations for which I/O access is required. (XXX Check this) */
pScreenInfo->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
@@ -644,10 +648,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
pRendition->board.mem_base);
/* First of all get a "clean" starting state */
-#if 1
verite_resetboard(pScreenInfo);
-#endif
-
/* determine video ram -- to do so, we assume a full size memory of 16M,
* then map it and use verite_getmemorysize() to determine the real amount of
* memory */
@@ -655,7 +656,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
renditionMapMem(pScreenInfo);
videoRam=verite_getmemorysize(pScreenInfo)>>10;
- /* Unmaping delayed until after micrcode loading */
+ /* Unmapping delayed until after micrcode loading */
/****************************************/
/* Reserv memory and load the microcode */
/****************************************/
@@ -801,6 +802,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
* XXX Aren't the clocks programmable? If so, this discrete clock stuff
* shouldn't be used.
*/
+#if 0
if ((pScreenInfo->numClocks = pRendition->pEnt->device->numclocks))
{
if (pScreenInfo->numClocks > 4)
@@ -816,33 +818,31 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
From = X_PROBED;
}
xf86ShowClocks(pScreenInfo, From);
+#endif
- if (pScreenInfo->display->modes && pScreenInfo->display->modes[0])
- {
- /* Set the virtual X rounding (in bits) */
- if (pScreenInfo->depth == 8)
- Rounding = 16 * 8;
- else
- Rounding = 16;
-
- /*
- * Validate the modes. Note that the limits passed to
- * xf86ValidateModes() are VGA CRTC architectural limits.
- */
- pScreenInfo->maxHValue = 2080;
- pScreenInfo->maxVValue = 1025;
- nModes = xf86ValidateModes(pScreenInfo,
+ /* Set the virtual X rounding (in bits) */
+ if (pScreenInfo->depth == 8)
+ Rounding = 16 * 8;
+ else
+ Rounding = 16;
+
+ /*
+ * Validate the modes. Note that the limits passed to
+ * xf86ValidateModes() are VGA CRTC architectural limits.
+ */
+ pScreenInfo->maxHValue = 2080;
+ pScreenInfo->maxVValue = 1025;
+ nModes = xf86ValidateModes(pScreenInfo,
pScreenInfo->monitor->Modes, pScreenInfo->display->modes,
&renditionClockRange, NULL, 8, 2040, Rounding, 1, 1024,
pScreenInfo->display->virtualX, pScreenInfo->display->virtualY,
0x10000, LOOKUP_CLOSEST_CLOCK | LOOKUP_CLKDIV2);
- if (nModes < 0)
- return FALSE;
+ if (nModes < 0)
+ return FALSE;
- /* Remove invalid modes */
- xf86PruneDriverModes(pScreenInfo);
- }
+ /* Remove invalid modes */
+ xf86PruneDriverModes(pScreenInfo);
/* Set CRTC values for the modes */
xf86SetCrtcForModes(pScreenInfo, 0);
@@ -917,6 +917,7 @@ renditionRestore(ScrnInfoPtr pScreenInfo)
vgaHWProtect(pScreenInfo, FALSE);
verite_setmode(pScreenInfo, &RENDITIONPTR(pScreenInfo)->mode);
+
#ifdef DEBUG
ErrorF("Restore OK...!!!!\n");
sleep(1);
@@ -1008,7 +1009,6 @@ renditionSetMode(ScrnInfoPtr pScreenInfo, DisplayModePtr pMode)
modeinfo->flags=pMode->Flags;
verite_setmode(pScreenInfo,&RENDITIONPTR(pScreenInfo)->mode);
-
#ifdef DEBUG
ErrorF("Setmode OK...!!!!\n");
sleep(1);
@@ -1065,11 +1065,15 @@ renditionLeaveGraphics(ScrnInfoPtr pScreenInfo)
ErrorF("Leavegraphics..!!!!\n");
sleep(1);
#endif
-
+#if 0
+ verite_textmode(&RENDITIONPTR(pScreenInfo)->board);
+#endif
renditionRestore(pScreenInfo);
vgaHWLock(VGAHWPTR(pScreenInfo));
+#if 0
verite_textmode(&RENDITIONPTR(pScreenInfo)->board);
+#endif
#ifdef DEBUG
ErrorF("Leavegraphics OK...!!!!\n");
sleep(1);
@@ -1115,7 +1119,6 @@ renditionCloseScreen(int scrnIndex, ScreenPtr pScreen)
}
-#ifdef DPMSExtension
static void
renditionDPMSSet(ScrnInfoPtr pScreen, int mode, int flags)
{
@@ -1125,7 +1128,6 @@ renditionDPMSSet(ScrnInfoPtr pScreen, int mode, int flags)
vgaHWDPMSSet(pScreen, mode, flags);
}
-#endif
static Bool
@@ -1331,11 +1333,7 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
}
-
-#ifdef DPMSExtension
xf86DPMSInit(pScreen, renditionDPMSSet, 0);
-#endif
-
if (xf86ReturnOptValBool(renditionOptions, OPTION_OVERCLOCK_MEM,0)) {
RENDITIONPTR(pScreenInfo)->board.overclock_mem=TRUE;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man
new file mode 100644
index 000000000..2b6fae21c
--- /dev/null
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man
@@ -0,0 +1,112 @@
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man,v 1.2 2001/01/27 18:20:51 dawes Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH RENDITION __drivermansuffix__ __vendorversion__
+.SH NAME
+rendition \- Rendition video driver
+.SH SYNOPSIS
+.nf
+.B "Section \*qDevice\*q"
+.BI " Identifier \*q" devname \*q
+.B " Driver \*qrendition\*q"
+\ \ ...
+.B EndSection
+.fi
+.SH DESCRIPTION
+.B rendition
+is an XFree86 driver for Rendition/Micron based video cards. The driver
+supports following framebuffer depths: 8, 15 (Verite V1000 only), 16
+and 24. Acceleration and multi-head configurations are
+not supported yet, but are work in progress.
+.SH SUPPORTED HARDWARE
+The
+.B rendition
+driver supports PCI and AGP video cards based on the following Rendition/Micron chips:
+.TP 12
+.B V1000
+Verite V1000 based cards.
+.TP 12
+.B V2100
+Verite V2100 based cards. Diamond Stealth II S220 is the only known such card.
+.TP 12
+.B V2200
+Verite V2200 based cards.
+.SH CONFIGURATION DETAILS
+Please refer to XF86Config(__filemansuffix__) for general configuration
+details. This section only covers configuration details specific to this
+driver.
+.PP
+The driver auto-detects the chipset type, but the following
+.B ChipSet
+names may optionally be specified in the config file
+.B \*qDevice\*q
+section, and will override the auto-detection:
+.PP
+.RS 4
+"v1000", "v2100", "v2200".
+.RE
+.PP
+The driver will auto-detect the amount of video memory present for all
+chips. If the amount of memory is detected incorrectly, the actual amount
+of video memory should be specified with a
+.B VideoRam
+entry in the config file
+.B \*qDevice\*q
+section.
+.PP
+The following driver
+.B Options
+are supported:
+.TP
+.BI "Option \*qSWCursor\*q \*q" boolean \*q
+Disables use of the hardware cursor. Default: use HW-cursor.
+.TP
+.BI "Option \*qOverclockMem\*q \*q" boolean \*q
+Increases the Mem/Sys clock to 125MHz/60MHz from standard 110MHz/50MHz.
+Default: Not overclocked.
+.TP
+.BI "Option \*qDacSpeed\*q \*q" MHz \*q
+Run the memory at a higher clock. Useful on some cards with display glitches
+at higher resolutions. But adds the risk to damage the hardware. Use with
+caution.
+.TP
+.BI "Option \*qFramebufferWC\*q \*q" boolean \*q
+If writecombine is disabled in BIOS, and you add this option in configuration
+file, then the driver will try to request writecombined access to the
+framebuffer. This can drastically increase the performance on unaccelerated
+server. Requires that "MTRR"-support is compiled into the OS-kernel.
+Default: Disabled for V1000, enabled for V2100/V2200.
+.TP
+.BI "Option \*qNoDDC\*q \*q" boolean \*q
+Disable probing of DDC-information from your monitor. This information is not
+used yet and is only there for informational purposes. This might change
+before final XFree86 4.0 release. Safe to disable if you experience problems
+during startup of X-server.
+Default: Probe DDC.
+.TP
+.BI "Option \*qShadowFB\*q \*q" boolean \*q
+If this option is enabled, the driver will cause the CPU to do each drawing
+operation first into a shadow frame buffer in system virtual memory and then
+copy the result into video memory. If this option is not active, the CPU will
+draw directly into video memory. Enabling this option is beneficial for those
+systems where reading from video memory is, on average, slower than the
+corresponding read/modify/write operation in system virtual memory. This is
+normally the case for PCI or AGP adapters, and, so, this option is enabled by
+default unless acceleration is enabled.
+Default: Enabled unless acceleration is used.
+.TP
+.BI "Option \*qRotate\*q \*qCW\*q"
+.TP
+.BI "Option \*qRotate\*q \*qCCW\*q"
+Rotate the display clockwise or counterclockwise. This mode is unaccelerated.
+Default: no rotation.
+.TP
+.SH "Notes"
+For the moment the driver defaults to not request write-combine for any chipset
+as there has been indications of problems with it. Use
+.B "Option \*qMTRR\*q"
+to let the driver request write-combining of memory access on the video board.
+.SH "SEE ALSO"
+XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
+.SH AUTHORS
+Authors include: Marc Langenbach, Dejan Ilic
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c
index 13237f4d3..740cc07ac 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c,v 1.8 2000/03/31 20:13:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vmodes.c,v 1.9 2001/02/15 17:50:34 eich Exp $ */
/*
* file vmodes.c
*
@@ -387,12 +387,13 @@ verite_setframebase(ScrnInfoPtr pScreenInfo, vu32 framebase)
renditionPtr pRendition = RENDITIONPTR(pScreenInfo);
vu32 offset;
-
+
int iob=pRendition->board.io_base;
int swidth=pRendition->board.mode.screenwidth;
int vwidth=pRendition->board.mode.virtualwidth;
int bytespp=pRendition->board.mode.bitsperpixel>>3;
int fifo_size=pRendition->board.mode.fifosize;
+ return;
#ifdef DEBUG
ErrorF( "Rendition: Debug verite_setframebase w=%d v=%d b=%d f=%d\n",
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c
index 61ed10738..2a3f0ed4b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c,v 1.11 2000/06/13 02:28:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vramdac.c,v 1.12 2001/02/15 17:50:34 eich Exp $ */
/*
* includes
*/
@@ -427,7 +427,7 @@ verite_setpalette(ScrnInfoPtr pScreenInfo, int numColors, int *indices,
#ifdef DEBUG
ErrorF ("Rendition: Debug verite_setpalette called\n");
#endif
-
+ return;
while (1) {
crtc_status=verite_in32(iob+CRTCSTATUS);
if (crtc_status & CRTCSTATUS_VERT_SYNC)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c
index 701fe7a58..15e994411 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c,v 1.9 2000/03/31 20:13:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.c,v 1.10 2001/02/15 17:50:35 eich Exp $ */
/*
* file vvga.c
*
@@ -9,6 +9,7 @@
* includes
*/
#include "rendition.h"
+#define VVGA_INTERNAL
#include "vvga.h"
#include "vtypes.h"
#include "vos.h"
@@ -45,7 +46,7 @@ static void updattr(vu8 index, vu8 value);
* functions
*/
-void
+static void
verite_resetvga(void)
{
static struct VIDEO_REGS {
@@ -97,7 +98,7 @@ verite_resetvga(void)
-void
+static void
verite_loadvgafont(void)
{
int c;
@@ -145,7 +146,6 @@ verite_loadvgafont(void)
}
xf86UnMapVidMem(0, vbase, 64*1024);
-
/* restore the standard vga register values */
verite_resetvga();
}
@@ -206,7 +206,7 @@ verite_textmode(struct verite_board_t *board)
verite_out32(iob+CRTCHORZ, 0x2b0a4f);
verite_out32(iob+CRTCVERT, 0x9301df);
verite_out32(iob+CRTCOFFSET, 0x40);
-
+#if 0
#ifdef SAVEVGA
verite_loadvgafont();
verite_restoretextmode(board);
@@ -217,6 +217,7 @@ verite_textmode(struct verite_board_t *board)
verite_restorepalette();
#endif
#endif
+#endif
}
@@ -251,7 +252,7 @@ verite_savetextmode(struct verite_board_t *board)
-void
+static void
verite_restoretextmode(struct verite_board_t *board)
{
vu8 *vbase;
@@ -280,7 +281,7 @@ verite_restoretextmode(struct verite_board_t *board)
-void
+static void
verite_restorepalette(void)
{
int c;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h
index ef3299ef2..461d5603a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h,v 1.4 2000/03/31 20:13:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vvga.h,v 1.5 2001/02/15 17:50:35 eich Exp $ */
/*
* file vvga.h
*
@@ -22,13 +22,14 @@
* function prototypes
*/
-void verite_resetvga(void);
-void verite_loadvgafont(void);
void verite_textmode(struct verite_board_t *board);
void verite_savetextmode(struct verite_board_t *board);
-void verite_restoretextmode(struct verite_board_t *board);
-void verite_restorepalette(void);
-
+#ifdef VVGA_INTERNAL
+static void verite_resetvga(void);
+static void verite_loadvgafont(void);
+static void verite_restoretextmode(struct verite_board_t *board);
+static void verite_restorepalette(void);
+#endif
#endif /* __VVGA_H__ */