summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-01-24 02:38:14 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-01-24 02:38:14 +0000
commit2b72dd1079ab66c4febb90cef1c286e7c7cce3fa (patch)
tree84b8e1ec64925933b11b8eb34fb2bbc85d9a74a4
parentdeddbe4bfec2da7af91e4760eb13fb580fe5d5ad (diff)
//bugs.freedesktop.org/show_bug.cgi?id=2261) attachment #1666XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8-branch
(https://bugs.freedesktop.org/attachment.cgi?id=1666): Update manual page to explain the FpMode option. Patch by Egbert Eich <eich@freedesktop.org>.
-rw-r--r--man/chips.man21
-rw-r--r--src/ct_BlitMM.h2
-rw-r--r--src/ct_Blitter.h2
-rw-r--r--src/ct_bank.c9
-rw-r--r--src/ct_dga.c2
-rw-r--r--src/ct_regs.c26
-rw-r--r--src/ct_shadow.c2
-rw-r--r--src/ct_video.c52
-rw-r--r--util/AsmMacros.h2
-rw-r--r--util/dRegs.c2
-rw-r--r--util/mRegs.c2
-rw-r--r--util/modClock.c2
12 files changed, 69 insertions, 55 deletions
diff --git a/man/chips.man b/man/chips.man
index ad05ba6..6ef3b4a 100644
--- a/man/chips.man
+++ b/man/chips.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/chips.man,v 1.5 2002/01/04 21:22:27 tsi Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/chips.man,v 1.4 2001/12/17 20:52:32 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH CHIPS __drivermansuffix__ __vendorversion__
@@ -14,7 +14,7 @@ chips \- Chips and Technologies video driver
.fi
.SH DESCRIPTION
.B chips
-is an XFree86 driver for Chips and Technologies video processors. The majority
+is an __xservername__ driver for Chips and Technologies video processors. The majority
of the Chips and Technologies chipsets are supported by this driver. In general
the limitation on the capabilities of this driver are determined by the
chipset on which it is run. Where possible, this driver provides full
@@ -77,7 +77,7 @@ Color depths 1, 4, 8, 15, 16, 24 and 8+16 are supported on all chipsets.
The DirectColor visual is supported on all color depths except the 8+16
overlay mode. Full acceleration is supplied for all chipsets.
.SH CONFIGURATION DETAILS
-Please refer to XF86Config(__filemansuffix__) for general configuration
+Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to this
driver.
.PP
@@ -205,11 +205,22 @@ the maximum colour depth and refresh rate that can be achieved, and so is
off by default. Using this option forces the use of an independent refresh
rate on the two screens.
Default: off.
+.TP
+.BI "Option \*qFpMode\*q \*q" boolean \*q
+The driver probes the chip to find out if a flat panel (LCD) is connected
+and active. If this is true it limits the possible screen size to the maximum
+resolution of the panel. The chips is initialized by the BIOS which may
+set the chip to 'dual' mode even if no panel is connected. In this case
+the available resolution on the CRT is limited to the panel size
+the BIOS has set. To tell the driver that no panel is connected despite
+of what the BIOS is saying set this option to off. Don't set it to off
+if a panel is connected.
+Default: value probed by BIOS.
.SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.PP
You are also recommended to read the README.chips file that comes with all
-XFree86 distributions, which discusses the
+__xservername__ distributions, which discusses the
.B chips
driver in more detail.
.SH AUTHORS
diff --git a/src/ct_BlitMM.h b/src/ct_BlitMM.h
index 7660241..fb1c4e7 100644
--- a/src/ct_BlitMM.h
+++ b/src/ct_BlitMM.h
@@ -4,7 +4,7 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_BlitMM.h,v 1.5 2002/11/25 14:04:58 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_BlitMM.h,v 1.3 1998/08/20 08:55:56 dawes Exp $ */
/* Definitions for the Chips and Technology BitBLT engine communication. */
/* These are done using Memory Mapped IO, of the registers */
diff --git a/src/ct_Blitter.h b/src/ct_Blitter.h
index ecb84f1..65b0989 100644
--- a/src/ct_Blitter.h
+++ b/src/ct_Blitter.h
@@ -4,7 +4,7 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_Blitter.h,v 1.4 2002/01/25 21:55:58 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_Blitter.h,v 1.3 1998/08/29 05:43:06 dawes Exp $ */
/* Definitions for the Chips and Technology BitBLT engine communication. */
/* registers */
diff --git a/src/ct_bank.c b/src/ct_bank.c
index 1e478ee..3be2776 100644
--- a/src/ct_bank.c
+++ b/src/ct_bank.c
@@ -53,12 +53,15 @@
/* Driver specific headers */
#include "ct_driver.h"
-#ifdef __arm32__
-/*#include <machine/sysarch.h>*/
+#if defined(__arm32__) && defined(__NetBSD__)
+#include <machine/sysarch.h>
#define arm32_drain_writebuf() sysarch(1, 0)
-#define ChipsBank(pScreen) CHIPSPTR(xf86Screens[pScreen->myNum])->Bank
+#elif defined(__arm32__)
+#define arm32_drain_writebuf()
#endif
+#define ChipsBank(pScreen) CHIPSPTR(xf86Screens[pScreen->myNum])->Bank
+
#ifdef DIRECT_REGISTER_ACCESS
int
CHIPSSetRead(ScreenPtr pScreen, int bank)
diff --git a/src/ct_dga.c b/src/ct_dga.c
index 3d0fe26..7cc3575 100644
--- a/src/ct_dga.c
+++ b/src/ct_dga.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_dga.c,v 1.5 2002/11/25 14:04:58 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_dga.c,v 1.3tsi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/ct_regs.c b/src/ct_regs.c
index 201ac5c..b7a7199 100644
--- a/src/ct_regs.c
+++ b/src/ct_regs.c
@@ -19,7 +19,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c,v 1.8 2002/01/25 21:56:00 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_regs.c,v 1.8tsi Exp $ */
/*
* The functions in this file are used to read/write the C&T extension register
@@ -361,17 +361,15 @@ chipsMmioReadSeq(vgaHWPtr hwp, CARD8 index)
static void
chipsMmioWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
if (hwp->IOBase == VGA_IOBASE_MONO)
- tmp = minb(CHIPS_MMIO_MONO_STAT_1);
+ (void) minb(CHIPS_MMIO_MONO_STAT_1);
else
- tmp = minb(CHIPS_MMIO_COLOR_STAT_1);
+ (void) minb(CHIPS_MMIO_COLOR_STAT_1);
moutb(CHIPS_MMIO_ATTR_INDEX, index);
moutb(CHIPS_MMIO_ATTR_DATA_W, value);
}
@@ -379,17 +377,15 @@ chipsMmioWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
static CARD8
chipsMmioReadAttr(vgaHWPtr hwp, CARD8 index)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
if (hwp->IOBase == VGA_IOBASE_MONO)
- tmp = minb(CHIPS_MMIO_MONO_STAT_1);
+ (void) minb(CHIPS_MMIO_MONO_STAT_1);
else
- tmp = minb(CHIPS_MMIO_COLOR_STAT_1);
+ (void) minb(CHIPS_MMIO_COLOR_STAT_1);
moutb(CHIPS_MMIO_ATTR_INDEX, index);
return minb(CHIPS_MMIO_ATTR_DATA_R);
}
@@ -409,12 +405,10 @@ chipsMmioReadMiscOut(vgaHWPtr hwp)
static void
chipsMmioEnablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
if (hwp->IOBase == VGA_IOBASE_MONO)
- tmp = minb(CHIPS_MMIO_MONO_STAT_1);
+ (void) minb(CHIPS_MMIO_MONO_STAT_1);
else
- tmp = minb(CHIPS_MMIO_COLOR_STAT_1);
+ (void) minb(CHIPS_MMIO_COLOR_STAT_1);
moutb(CHIPS_MMIO_ATTR_INDEX, 0x00);
hwp->paletteEnabled = TRUE;
}
@@ -422,12 +416,10 @@ chipsMmioEnablePalette(vgaHWPtr hwp)
static void
chipsMmioDisablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
if (hwp->IOBase == VGA_IOBASE_MONO)
- tmp = minb(CHIPS_MMIO_MONO_STAT_1);
+ (void) minb(CHIPS_MMIO_MONO_STAT_1);
else
- tmp = minb(CHIPS_MMIO_COLOR_STAT_1);
+ (void) minb(CHIPS_MMIO_COLOR_STAT_1);
moutb(CHIPS_MMIO_ATTR_INDEX, 0x20);
hwp->paletteEnabled = FALSE;
}
diff --git a/src/ct_shadow.c b/src/ct_shadow.c
index ecbb642..98bdb8f 100644
--- a/src/ct_shadow.c
+++ b/src/ct_shadow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_shadow.c,v 1.1 2000/02/08 13:13:13 eich Exp $ */
+/* $XFree86: Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/src/ct_video.c b/src/ct_video.c
index 4c560fa..9ff9c13 100644
--- a/src/ct_video.c
+++ b/src/ct_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_video.c,v 1.15 2003/07/17 08:19:35 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/ct_video.c,v 1.16tsi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -267,12 +267,11 @@ CHIPSSetupImageVideo(ScreenPtr pScreen)
pPriv->colorKey = cPtr->videoKey;
pPriv->videoStatus = 0;
- pPriv->doubleBuffer = TRUE;
pPriv->manualDoubleBuffer = FALSE;
pPriv->currentBuffer = 0;
/* gotta uninit this someplace */
- REGION_INIT(pScreen, &pPriv->clip, NullBox, 0);
+ REGION_NULL(pScreen, &pPriv->clip);
cPtr->adaptor = adapt;
@@ -533,7 +532,9 @@ CHIPSDisplayVideo(
DisplayModePtr mode = pScrn->currentMode;
unsigned char tmp, m1f, m1e;
int buffer = pPriv->currentBuffer;
-
+ Bool dblscan = (pScrn->currentMode->Flags & V_DBLSCAN) == V_DBLSCAN;
+ int val;
+
if (cPtr->Flags & ChipsAccelSupport)
CHIPSHiQVSync(pScrn);
@@ -571,6 +572,7 @@ CHIPSDisplayVideo(
cPtr->writeMR(cPtr, 0x23, ((offset >> 8) & 0xFF));
cPtr->writeMR(cPtr, 0x24, ((offset >> 16) & 0xFF));
}
+
/* Setup Pointer 2 */
if ((buffer && !pPriv->manualDoubleBuffer) || !pPriv->doubleBuffer) {
cPtr->writeMR(cPtr, 0x25, (offset & 0xF8));
@@ -578,7 +580,6 @@ CHIPSDisplayVideo(
cPtr->writeMR(cPtr, 0x27, ((offset >> 16) & 0xFF));
}
-
tmp = cPtr->readMR(cPtr, 0x04);
if (pPriv->doubleBuffer && !pPriv->manualDoubleBuffer && triggerBufSwitch)
tmp |= 0x18;
@@ -586,6 +587,7 @@ CHIPSDisplayVideo(
tmp = cPtr->readMR(cPtr, 0x20);
tmp &= 0xC3;
+
if (pPriv->doubleBuffer && !pPriv->manualDoubleBuffer && triggerBufSwitch)
tmp |= ((1 << 2 | 1 << 5) | ((buffer) ? (1 << 4) : 0));
cPtr->writeMR(cPtr, 0x20, tmp);
@@ -605,14 +607,16 @@ CHIPSDisplayVideo(
tmp = (tmp & 0xF8) + (((cPtr->OverlaySkewX + dstBox->x2 - 1) >> 8) & 0x07);
cPtr->writeMR(cPtr, 0x2D, tmp);
/* Top Edge of Overlay */
- cPtr->writeMR(cPtr, 0x2E, ((cPtr->OverlaySkewY + dstBox->y1) & 0xFF));
+ val = cPtr->OverlaySkewY + (dstBox->y1 << (dblscan ? 1 : 0));
+ cPtr->writeMR(cPtr, 0x2E, ((val) & 0xFF));
tmp = cPtr->readMR(cPtr, 0x2F);
- tmp = (tmp & 0xF8) + (((cPtr->OverlaySkewY + dstBox->y1) >> 8) & 0x07);
+ tmp = (tmp & 0xF8) + (((val) >> 8) & 0x07);
cPtr->writeMR(cPtr, 0x2F, tmp);
/* Bottom Edge of Overlay*/
- cPtr->writeMR(cPtr, 0x30, ((cPtr->OverlaySkewY + dstBox->y2 - 1) & 0xFF));
+ val = cPtr->OverlaySkewY + (dstBox->y2 << (dblscan ? 1 : 0));
+ cPtr->writeMR(cPtr, 0x30, ((val - 1) & 0xFF));
tmp = cPtr->readMR(cPtr, 0x31);
- tmp = (tmp & 0xF8) + (((cPtr->OverlaySkewY + dstBox->y2 - 1) >> 8) & 0x07);
+ tmp = (tmp & 0xF8) + (((val - 1) >> 8) & 0x07);
cPtr->writeMR(cPtr, 0x31, tmp);
/* Horizontal Zoom */
@@ -624,10 +628,13 @@ CHIPSDisplayVideo(
}
/* Vertical Zoom */
- if (drw_h > src_h) {
+ if (drw_h > src_h || dblscan) {
m1f = m1f | 0x80; /* set V-interpolation */
- m1e = m1e | 0x08;
- tmp = cPtr->VideoZoomMax * src_h / drw_h ;
+ m1e = m1e | 0x08;
+ if (dblscan)
+ tmp = cPtr->VideoZoomMax >> 1;
+ if (drw_h > src_h)
+ tmp = tmp * src_h / drw_h;
cPtr->writeMR(cPtr, 0x33, tmp);
}
cPtr->writeMR(cPtr, 0x1F, m1f);
@@ -655,7 +662,7 @@ CHIPSPutImage(
CHIPSPtr cPtr = CHIPSPTR(pScrn);
INT32 x1, x2, y1, y2;
unsigned char *dst_start;
- int pitch, new_size, offset, offset2 = 0, offset3 = 0;
+ int new_size, offset, offset2 = 0, offset3 = 0;
int srcPitch, srcPitch2 = 0, dstPitch;
int top, left, npixels, nlines, bpp;
BoxRec dstBox;
@@ -673,7 +680,7 @@ CHIPSPutImage(
dstBox.x2 = drw_x + drw_w;
dstBox.y1 = drw_y;
dstBox.y2 = drw_y + drw_h;
-
+
if (!xf86XVClipVideoHelper(&dstBox, &x1, &x2, &y1, &y2,
clipBoxes, width, height))
return Success;
@@ -684,12 +691,14 @@ CHIPSPutImage(
dstBox.y2 -= pScrn->frameY0;
bpp = pScrn->bitsPerPixel >> 3;
- pitch = bpp * pScrn->displayWidth;
dstPitch = ((width << 1) + 15) & ~15;
new_size = ((dstPitch * height) + bpp - 1) / bpp;
- if (pPriv->doubleBuffer)
- new_size <<= 1;
+
+ pPriv->doubleBuffer = (pScrn->currentMode->Flags & V_DBLSCAN) != V_DBLSCAN;
+
+ if (pPriv->doubleBuffer)
+ new_size <<= 1;
switch(id) {
case FOURCC_YV12: /* YV12 */
@@ -704,12 +713,12 @@ CHIPSPutImage(
}
if(!(pPriv->linear = CHIPSAllocateMemory(pScrn, pPriv->linear, new_size))) {
- if (pPriv->doubleBuffer &&
- (pPriv->linear = CHIPSAllocateMemory(pScrn, pPriv->linear,
+ if (pPriv->doubleBuffer
+ && (pPriv->linear = CHIPSAllocateMemory(pScrn, pPriv->linear,
new_size >> 1))) {
new_size >>= 1;
pPriv->doubleBuffer = FALSE;
- } else
+ } else
return BadAlloc;
}
@@ -851,7 +860,7 @@ CHIPSAllocateSurface(
XF86SurfacePtr surface
){
FBLinearPtr linear;
- int pitch, fbpitch, size, bpp;
+ int pitch, size, bpp;
OffscreenPrivPtr pPriv;
if((w > 1024) || (h > 1024))
@@ -860,7 +869,6 @@ CHIPSAllocateSurface(
w = (w + 1) & ~1;
pitch = ((w << 1) + 15) & ~15;
bpp = pScrn->bitsPerPixel >> 3;
- fbpitch = bpp * pScrn->displayWidth;
size = ((pitch * h) + bpp - 1) / bpp;
if(!(linear = CHIPSAllocateMemory(pScrn, NULL, size)))
diff --git a/util/AsmMacros.h b/util/AsmMacros.h
index feb5ce0..24070b9 100644
--- a/util/AsmMacros.h
+++ b/util/AsmMacros.h
@@ -57,7 +57,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $ */
+/* $XFree86$ */
#if defined(__GNUC__)
#if defined(linux) && (defined(__alpha__) || defined(__ia64__))
diff --git a/util/dRegs.c b/util/dRegs.c
index 0c8ee62..51a384b 100644
--- a/util/dRegs.c
+++ b/util/dRegs.c
@@ -4,7 +4,7 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/dRegs.c,v 1.9 2001/11/16 21:13:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/dRegs.c,v 1.8 2001/10/01 13:44:04 eich Exp $ */
#ifdef __NetBSD__
# include <sys/types.h>
diff --git a/util/mRegs.c b/util/mRegs.c
index 4d8da11..b1688de 100644
--- a/util/mRegs.c
+++ b/util/mRegs.c
@@ -4,7 +4,7 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/mRegs.c,v 1.6 2001/11/16 21:13:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/mRegs.c,v 1.5 2000/10/23 12:10:13 alanh Exp $ */
#ifdef __NetBSD__
# include <sys/types.h>
diff --git a/util/modClock.c b/util/modClock.c
index cce4f84..48a1961 100644
--- a/util/modClock.c
+++ b/util/modClock.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c,v 1.6 2001/11/16 21:13:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/modClock.c,v 1.5 2001/05/09 19:57:06 dbateman Exp $ */
#ifdef __NetBSD__
# include <sys/types.h>