XFree86 4.3.99.16

Bring the tree up to date for the Cygwin folks
parent e04a1a8f
......@@ -7,10 +7,17 @@
<author>Precision Insight, Inc.
<date>3 March 2000
<ident>
$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/i810.sgml,v 1.3 2001/04/04 01:34:18 dawes Exp $
$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/i810.sgml,v 1.4 2003/07/29 20:59:06 dawes Exp $
</ident>
<toc>
<sect>Introduction
<p>
This document provides a brief summary of the i810/i815 support provided
by the i810 driver. Support for later chipsets is not covered here.
More up to date information about the i810 driver can be found in the
<htmlurl name="i810(4)" url="i810.4.html"> manual page.
<sect>Supported Hardware
<p>
<itemize>
......
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man,v 1.3 2003/02/17 19:19:02 dawes Exp $
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.man,v 1.5 2003/10/18 02:27:07 dawes Exp $
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
.TH I810 __drivermansuffix__ __vendorversion__
......@@ -16,9 +16,12 @@ i810 \- Intel 8xx integrated graphics chipsets
.B i810
is an XFree86 driver for Intel integrated graphics chipsets.
The driver supports depths 8, 15, 16 and 24. All visual types are
supported in depth 8, other depths only support TrueColor. The driver
supports hardware accelerated 3D via the Direct Rendering Infrastructure (DRI),
but only in depth 16 for the i810/i815 and depths 16 and 24 for later chipsets.
supported in depth 8. For the i810/i815 other depths support the
TrueColor and DirectColor visuals. For the 830M and later, only the
TrueColor visual is supported for depths greater than 8. The driver
supports hardware accelerated 3D via the Direct Rendering Infrastructure
(DRI), but only in depth 16 for the i810/i815 and depths 16 and 24 for
the 830M and later.
.SH SUPPORTED HARDWARE
.B i810
supports the i810, i810-DC100, i810e, i815, 830M, 845G, 852GM, 855GM,
......@@ -30,7 +33,16 @@ details. This section only covers configuration details specific to this
driver.
.PP
The Intel 8xx family of integrated graphics chipsets has a unified memory
architecture and uses system memory for video ram. By default 8 Megabytes
architecture and uses system memory for video ram. For the i810 and
i815 familiy of chipset, operating system support for allocating system
memory for video use is required in order to use this driver. For the
830M and later, this is required in order for the driver to use more
video ram than has been pre-allocated at boot time by the BIOS. This
is usually achieved with an "agpgart" or "agp" kernel driver. Linux,
and recent versions of FreeBSD, OpenBSD and NetBSD have such kernel
drivers available.
.PP
By default 8 Megabytes
of system memory are used for graphics. For the 830M and later, the
default is 8 Megabytes when DRI is not enabled and 32 Megabytes with
DRI is enabled. This amount may be changed with the
......@@ -38,8 +50,18 @@ DRI is enabled. This amount may be changed with the
entry in the config file
.B "Device"
section. It may be set to any reasonable value up to 64MB for older
chipsets or 128MB for newer chipets. Note that increasing this value
will reduce the amount of system memory available for other applications.
chipsets or 128MB for newer chipets. It is advisable to check the XFree86
log file to check if any features have been disabled because of insufficient
video memory. In particular, DRI support or tiling mode may be disabled
with insufficient video memory. Either of these being disabled will
reduce performance for 3D applications. Note however, that increasing
this value too much will reduce the amount of system memory available
for other applications.
.PP
The driver makes use of the video BIOS to program video modes for the 830M
and later. This limits the video modes that can be used to those provided
by the video BIOS, and to those that will fit into the amount of video memory
that the video BIOS is aware of.
.PP
The following driver
.B Options
......@@ -50,7 +72,8 @@ Disable or enable acceleration. Default: acceleration is enabled.
.TP
.BI "Option \*qSWCursor\*q \*q" boolean \*q
Disable or enable software cursor. Default: software cursor is disable
and a hardware cursor is used.
and a hardware cursor is used for configurations where the hardware cursor
is available.
.TP
.BI "Option \*qColorKey\*q \*q" integer \*q
This sets the default pixel value for the YUV video overlay key.
......@@ -61,8 +84,47 @@ This allows the user to change the amount of graphics memory used for
2D acceleration and video. Decreasing this amount leaves more for 3D
textures. Increasing it can improve 2D performance at the expense of
3D performance.
Default: 256 to 768 depending on the resolution and depth.
Default: depends on the resolution, depth, and available video memory. The
driver attempts to allocate at least enough to hold two DVD-sized YUV buffers
by default. The default used for a specific configuration can be found
by examining the XFree86 log file.
.TP
.BI "Option \*qDRI\*q \*q" boolean \*q
Disable or enable DRI support.
Default: DRI is enabled for configurations where it is supported.
.PP
The following driver
.B Options
are supported for the i810 and i815 chipsets:
.TP
.BI "Option \*qDDC\*q \*q" boolean \*q
Disable or enable DDC support.
Default: enabled.
.TP
.BI "Option \*qDac6Bit\*q \*q" boolean \*q
Enable or disable 6-bits per RGB for 8-bit modes.
Default: 8-bits per RGB for 8-bit modes.
.TP
.BI "Option \*qXvMCSurfaces\*q \*q" integer \*q
This option enables XvMC. The integer parameter specifies the number of
surfaces to use. Valid values are 6 and 7.
Default: XvMC is disabled.
.PP
The following driver
.B Options
are supported for the 830M and later chipsets:
.TP
.BI "Option \*qVideoKey\*q \*q" integer \*q
This is the same as the
.B \*qColorKey\*q
option described above. It is provided for compatibility with most
other drivers.
.TP
.BI "Option \*qXVideo\*q \*q" boolean \*q
Disable or enable XVideo support.
Default: XVideo is enabled for configurations where it is supported.
.SH "SEE ALSO"
......
......@@ -27,12 +27,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/common.h,v 1.6 2003/02/06 04:18:04 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/common.h,v 1.9 2003/09/24 02:43:23 dawes Exp $ */
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
* David Dawes <dawes@tungstengraphics.com>
* David Dawes <dawes@xfree86.org>
*
*/
......@@ -79,7 +79,11 @@ extern const char *I810vbeSymbols[];
extern const char *I810ddcSymbols[];
extern const char *I810fbSymbols[];
extern const char *I810xaaSymbols[];
#ifdef XF86DRI
extern const char *I810driSymbols[];
extern const char *I810drmSymbols[];
extern const char *I810shadowSymbols[];
#endif
extern void I830DPRINTF_stub(const char *filename, int line,
const char *function, const char *fmt, ...);
......@@ -111,7 +115,8 @@ extern void I830DPRINTF_stub(const char *filename, int line,
#define OUT_RING(n) do { \
if (I810_DEBUG & DEBUG_VERBOSE_RING) \
ErrorF( "OUT_RING %x: %x, (mask %x)\n", outring, n, ringmask); \
ErrorF( "OUT_RING %lx: %x, (mask %x)\n", \
(unsigned long)(outring), (unsigned int)(n), ringmask); \
*(volatile unsigned int *)(virt + outring) = n; \
outring += 4; \
outring &= ringmask; \
......@@ -227,21 +232,24 @@ extern void I830DPRINTF_stub(const char *filename, int line,
#define OUTREG8(addr, val) do { \
*(volatile CARD8 *)(RecPtr->MMIOBase + (addr)) = (val); \
if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) { \
ErrorF("OUTREG8(0x%x, 0x%x) in %s\n", addr, val, FUNCTION_NAME); \
ErrorF("OUTREG8(0x%lx, 0x%lx) in %s\n", (unsigned long)(addr), \
(unsigned long)(val), FUNCTION_NAME); \
} \
} while (0)
#define OUTREG16(addr, val) do { \
*(volatile CARD16 *)(RecPtr->MMIOBase + (addr)) = (val); \
if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) { \
ErrorF("OUTREG16(0x%x, 0x%x) in %s\n", addr, val, FUNCTION_NAME); \
ErrorF("OUTREG16(0x%lx, 0x%lx) in %s\n", (unsigned long)(addr), \
(unsigned long)(val), FUNCTION_NAME); \
} \
} while (0)
#define OUTREG(addr, val) do { \
*(volatile CARD32 *)(RecPtr->MMIOBase + (addr)) = (val); \
if (I810_DEBUG&DEBUG_VERBOSE_OUTREG) { \
ErrorF("OUTREG(0x%x, 0x%x) in %s\n", addr, val, FUNCTION_NAME); \
ErrorF("OUTREG(0x%lx, 0x%lx) in %s\n", (unsigned long)(addr), \
(unsigned long)(val), FUNCTION_NAME); \
} \
} while (0)
......
......@@ -27,12 +27,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.38 2003/02/26 04:19:36 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h,v 1.42 2003/09/28 20:15:57 alanh Exp $ */
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
* David Dawes <dawes@tungstengraphics.com>
* David Dawes <dawes@xfree86.org>
*
*/
......@@ -221,6 +221,7 @@ typedef struct _I810Rec {
I810WriteByteFunc writeStandard;
I810ReadByteFunc readStandard;
Bool directRenderingDisabled; /* DRI disabled in PreInit */
Bool directRenderingEnabled; /* false if XF86DRI not defined. */
#ifdef XF86DRI
......@@ -252,6 +253,9 @@ typedef struct _I810Rec {
Bool showCache;
Bool noAccel;
Bool allowPageFlip;
Bool have3DWindows;
int drmMinor;
} I810Rec;
#define I810PTR(p) ((I810Ptr)((p)->driverPrivate))
......@@ -260,9 +264,13 @@ typedef struct _I810Rec {
#define I810_SELECT_BACK 1
#define I810_SELECT_DEPTH 2
#ifdef XF86DRI
extern Bool I810DRIScreenInit(ScreenPtr pScreen);
extern void I810DRICloseScreen(ScreenPtr pScreen);
extern Bool I810DRIFinishScreenInit(ScreenPtr pScreen);
extern Bool I810DRILeave(ScrnInfoPtr pScrn);
extern Bool I810DRIEnter(ScrnInfoPtr pScrn);
#endif
extern Bool I810InitDma(ScrnInfoPtr pScrn);
extern Bool I810CleanupDma(ScrnInfoPtr pScrn);
......
......@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c,v 1.17 2002/11/25 14:04:59 eich Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c,v 1.19 2003/04/24 18:00:24 eich Exp $ */
/*
* Reformatted with GNU indent (2.2.8), using the following options:
......
......@@ -25,7 +25,7 @@
* Converted to common header format:
* Jens Owen <jens@tungstengraphics.com>
*
* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_common.h,v 1.1 2002/09/11 00:29:31 dawes Exp $
* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_common.h,v 1.2 2003/09/28 20:15:58 alanh Exp $
*
*/
......@@ -123,14 +123,18 @@
#define DRM_I810_OV0FLIP 0x0b
#define DRM_I810_MC 0x0c
#define DRM_I810_RSTATUS 0x0d
#define DRM_I810_FLIP 0x0e
#endif
typedef enum _drmI810Initfunc {
I810_INIT_DMA = 0x01,
I810_CLEANUP_DMA = 0x02,
I810_INIT_DMA_1_4 = 0x03
} drmI810Initfunc;
typedef struct {
enum {
I810_INIT_DMA = 0x01,
I810_CLEANUP_DMA = 0x02
} func;
drmI810Initfunc func;
unsigned int mmio_offset;
unsigned int buffers_offset;
int sarea_priv_offset;
......
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h,v 1.10 2002/12/10 01:27:04 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h,v 1.11 2003/09/28 20:15:58 alanh Exp $ */
#ifndef _I810_DRI_
#define _I810_DRI_
......@@ -95,8 +95,10 @@ typedef struct {
* kick out your own texture or someone else's - simply eject
* them all in LRU order.
*/
I810TexRegionRec texList[I810_NR_TEX_REGIONS + 1]; /* Last elt is sentinal */
drmTextureRegion texList[I810_NR_TEX_REGIONS + 1];
/* Last elt is sentinal */
int texAge; /* last time texture was uploaded */
int last_enqueue; /* last time a buffer was enqueued */
......@@ -107,6 +109,11 @@ typedef struct {
int vertex_prim;
int pf_enabled; /* is pageflipping allowed? */
int pf_active; /* is pageflipping active right now? */
int pf_current_page; /* which buffer is being displayed? */
} I810SAREARec, *I810SAREAPtr;
typedef struct {
......
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v 1.27 2002/12/10 01:27:05 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_memory.c,v 1.28 2003/09/24 02:43:23 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
......@@ -149,7 +149,7 @@ I810AllocateGARTMemory(ScrnInfoPtr pScrn)
pI810->DcacheKey = key;
if (!xf86BindGARTMemory(pScrn->scrnIndex, key, tom)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Allocation of %d bytes for DCACHE failed\n", size);
"Allocation of %ld bytes for DCACHE failed\n", size);
pI810->DcacheKey = -1;
} else {
pI810->DcacheMem.Start = tom;
......@@ -159,7 +159,7 @@ I810AllocateGARTMemory(ScrnInfoPtr pScrn)
}
} else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"No physical memory available for %d bytes of DCACHE\n",
"No physical memory available for %ld bytes of DCACHE\n",
size);
pI810->DcacheKey = -1;
}
......@@ -188,7 +188,7 @@ I810AllocateGARTMemory(ScrnInfoPtr pScrn)
pI810->HwcursKey = key;
if (!xf86BindGARTMemory(pScrn->scrnIndex, key, tom)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Allocation of %d bytes for HW cursor failed\n", size);
"Allocation of %ld bytes for HW cursor failed\n", size);
pI810->HwcursKey = -1;
} else {
pI810->CursorPhysical = physical;
......
......@@ -23,7 +23,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_video.c,v 1.22 2002/09/11 00:29:32 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_video.c,v 1.27 2003/11/11 00:58:18 dawes Exp $ */
/*
* i810_video.c: i810 Xv driver. Based on the mga Xv driver by Mark Vojkovich.
......@@ -216,14 +216,51 @@ static XF86AttributeRec Attributes[NUM_ATTRIBUTES] =
{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"}
};
#define NUM_IMAGES 4
#define NUM_IMAGES 6
#define I810_RV15 0x35315652
#define I810_RV16 0x36315652
static XF86ImageRec Images[NUM_IMAGES] =
{
XVIMAGE_YUY2,
XVIMAGE_YV12,
XVIMAGE_I420,
XVIMAGE_UYVY
{
I810_RV15,
XvRGB,
LSBFirst,
{'R','V','1','5',
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
16,
XvPacked,
1,
15, 0x7C00, 0x03E0, 0x001F,
0, 0, 0,
0, 0, 0,
0, 0, 0,
{'R','V','B',0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
XvTopToBottom
},
{
I810_RV16,
XvRGB,
LSBFirst,
{'R','V','1','6',
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
16,
XvPacked,
1,
16, 0xF800, 0x07E0, 0x001F,
0, 0, 0,
0, 0, 0,
0, 0, 0,
{'R','V','B',0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
XvTopToBottom
},
XVIMAGE_YUY2,
XVIMAGE_YV12,
XVIMAGE_I420,
XVIMAGE_UYVY
};
/* *INDENT-ON* */
......@@ -383,7 +420,7 @@ I810SetupImageVideo(ScreenPtr pScreen)
pPriv->currentBuf = 0;
/* gotta uninit this someplace */
REGION_INIT(pScreen, &pPriv->clip, NullBox, 0);
REGION_NULL(pScreen, &pPriv->clip);
pI810->adaptor = adapt;
......@@ -400,36 +437,6 @@ I810SetupImageVideo(ScreenPtr pScreen)
}
static Bool
RegionsEqual(RegionPtr A, RegionPtr B)
{
int *dataA, *dataB;
int num;
num = REGION_NUM_RECTS(A);
if(num != REGION_NUM_RECTS(B))
return FALSE;
if((A->extents.x1 != B->extents.x1) ||
(A->extents.x2 != B->extents.x2) ||
(A->extents.y1 != B->extents.y1) ||
(A->extents.y2 != B->extents.y2))
return FALSE;
dataA = (int*)REGION_RECTS(A);
dataB = (int*)REGION_RECTS(B);
while(num--) {
if((dataA[0] != dataB[0]) || (dataA[1] != dataB[1]))
return FALSE;
dataA += 2;
dataB += 2;
}
return TRUE;
}
/* I810ClipVideo -
Takes the dst box in standard X BoxRec form (top and left
......@@ -758,9 +765,9 @@ I810DisplayVideo(
} else {
overlay->OV0CONF = 0; /* two 720 pixel line buffers */
}
overlay->SHEIGHT = height | (height << 15);
overlay->DWINPOS = (dstBox->y1 << 16) | dstBox->x1;
overlay->DWINPOS = (dstBox->y1 << 16) | (dstBox->x1);
overlay->DWINSZ = ((dstBox->y2 - dstBox->y1) << 16) |
(dstBox->x2 - dstBox->x1);
......@@ -879,6 +886,15 @@ I810DisplayVideo(
overlay->OV0CMD &= ~SOURCE_FORMAT;
overlay->OV0CMD |= YUV_420;
break;
case I810_RV15:
case I810_RV16:
overlay->UV_VPH = 0;
overlay->INIT_PH = 0;
overlay->OV0STRIDE = dstPitch;
overlay->OV0CMD &= ~SOURCE_FORMAT;
overlay->OV0CMD |= (id==I810_RV15 ? RGB_555 : RGB_565);
overlay->OV0CMD &= ~OV_BYTE_ORDER;
break;
case FOURCC_UYVY:
case FOURCC_YUY2:
default:
......@@ -975,14 +991,18 @@ I810PutImage(
dstBox.y2 = drw_y + drw_h;
I810ClipVideo(&dstBox, &x1, &x2, &y1, &y2,
REGION_EXTENTS(pScreen, clipBoxes), width, height);
REGION_EXTENTS(pScrn->pScreen, clipBoxes), width, height);
if((x1 >= x2) || (y1 >= y2))
return Success;
dstBox.x1 -= pScrn->frameX0;
dstBox.x2 -= pScrn->frameX0;
dstBox.y1 -= pScrn->frameY0;
/*
* Fix for 4 pixel granularity of AdjustFrame
* unless boarder is clipped by frame
*/
dstBox.x1 -= (pScrn->frameX0 &
((dstBox.x1 == pScrn->frameX0) ? ~0x0UL : ~0x3UL));
dstBox.x2 -= (pScrn->frameX0 & ~0x3);
dstBox.y1 -= pScrn->frameY0;
dstBox.y2 -= pScrn->frameY0;
switch(id) {
......@@ -1057,15 +1077,12 @@ I810PutImage(
}
/* update cliplist */
if(!RegionsEqual(&pPriv->clip, clipBoxes)) {
REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
if(!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) {
REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes);
/* draw these */
XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0,
REGION_NUM_RECTS(clipBoxes),
REGION_RECTS(clipBoxes));
xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
}
I810DisplayVideo(pScrn, id, width, height, dstPitch,
x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h);
......@@ -1322,8 +1339,13 @@ I810DisplaySurface(
REGION_EXTENTS(screenInfo.screens[0], clipBoxes),
surface->width, surface->height);
dstBox.x1 -= pScrn->frameX0;
dstBox.x2 -= pScrn->frameX0;
/*
* Fix for 4 pixel granularity of AdjustFrame
* unless boarder is clipped by frame
*/
dstBox.x1 -= (pScrn->frameX0 &
((dstBox.x1 == pScrn->frameX0) ? ~0x0UL : ~0x3UL));
dstBox.x2 -= (pScrn->frameX0 & ~0x3);
dstBox.y1 -= pScrn->frameY0;
dstBox.y2 -= pScrn->frameY0;
......@@ -1352,9 +1374,7 @@ I810DisplaySurface(
surface->pitches[0], x1, y1, x2, y2, &dstBox,
src_w, src_h, drw_w, drw_h);
XAAFillSolidRects(pScrn, pI810Priv->colorKey, GXcopy, ~0,
REGION_NUM_RECTS(clipBoxes),
REGION_RECTS(clipBoxes));
xf86XVFillKeyHelper(pScrn->pScreen, pI810Priv->colorKey, clipBoxes);
pPriv->isOn = TRUE;
/* we've prempted the XvImage stream so set its free timer */
......
......@@ -27,12 +27,12 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v 1.7 2003/01/28 22:47:09 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830.h,v 1.11 2003/10/21 04:13:40 dawes Exp $ */
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
* David Dawes <dawes@tungstengraphics.com>
* David Dawes <dawes@xfree86.org>
*
*/
......@@ -147,6 +147,7 @@ typedef struct _I830Rec {
unsigned long TotalVideoRam;
I830MemRange StolenMemory; /* pre-allocated memory */
unsigned long BIOSMemorySize; /* min stolen pool size */
int BIOSMemSizeLoc;
/* These change according to what has been allocated. */
long FreeMemory;
......@@ -182,6 +183,7 @@ typedef struct _I830Rec {
Bool NeedRingBufferLow;
Bool allowPageFlip;
Bool disableTiling;
int auxPitch;
int auxPitchBits;
......@@ -295,6 +297,11 @@ typedef struct _I830Rec {
Bool closing;
Bool suspended;
/* fbOffset converted to (x, y). */
int xoffset;
int yoffset;
int SaveGeneration;
} I830Rec;
#define I830PTR(p) ((I830Ptr)((p)->driverPrivate))
......@@ -391,5 +398,8 @@ extern void I830ChangeFrontbuffer(ScrnInfoPtr pScrn,int buffer);
#define ALLOCATE_DRY_RUN 0x80000000
/* Chipset registers for VIDEO BIOS memory RW access */
#define DRAM_RW_CONTROL 0x58
#define DRAM_WRITE 0x33330000
#endif /* _I830_H_ */
......@@ -32,7 +32,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_accel.c,v 1.4 2002/12/10 01:27:05 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_accel.c,v 1.8 2003/04/24 18:00:24 eich Exp $ */
/*
* Reformatted with GNU indent (2.2.8), using the following options:
......
......@@ -26,7 +26,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c,v 1.6 2002/12/18 15:49:01 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c,v 1.7 2003/06/18 13:14:17 dawes Exp $ */
/*
* Reformatted with GNU indent (2.2.8), using the following options:
......@@ -44,7 +44,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
* David Dawes <dawes@tungstengraphics.com>
* David Dawes <dawes@xfree86.org>
*
*/
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c,v 1.12 2003/02/08 21:26:57 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c,v 1.16 2003/09/28 20:15:58 alanh Exp $ */
/**************************************************************************
Copyright 2001 VA Linux Systems Inc., Fremont, California.
......@@ -42,7 +42,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Authors: Jeff Hartmann <jhartmann@valinux.com>
* David Dawes <dawes@tungstengraphics.com>
* David Dawes <dawes@xfree86.org>
* Keith Whitwell <keith@tungstengraphics.com>
*/
......@@ -249,7 +249,7 @@ I830InitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].accumRedSize = 16;
pConfigs[i].accumGreenSize = 16;
pConfigs[i].accumBlueSize = 16;
pConfigs[i].accumAlphaSize = 16;
pConfigs[i].accumAlphaSize = 0;
} else {
pConfigs[i].accumRedSize = 0;
pConfigs[i].accumGreenSize = 0;
......@@ -270,10 +270,10 @@ I830InitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].auxBuffers = 0;
pConfigs[i].level = 0;
if (stencil || accum)
pConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
pConfigs[i].visualRating = GLX_SLOW_CONFIG;
else
pConfigs[i].visualRating = GLX_NONE_EXT;
pConfigs[i].transparentPixel = 0;
pConfigs[i].visualRating = GLX_NONE;
pConfigs[i].transparentPixel = GLX_NONE;
pConfigs[i].transparentRed = 0;
pConfigs[i].transparentGreen = 0;
pConfigs[i].transparentBlue = 0;
......@@ -324,16 +324,16 @@ I830InitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].redSize = 8;
pConfigs[i].greenSize = 8;
pConfigs[i].blueSize = 8;
pConfigs[i].alphaSize = 0;
pConfigs[i].alphaSize = 8;
pConfigs[i].redMask = 0x00FF0000;
pConfigs[i].greenMask = 0x0000FF00;
pConfigs[i].blueMask = 0x000000FF;
pConfigs[i].alphaMask = 0x00000000;;
pConfigs[i].alphaMask = 0xFF000000;;
if (accum) {
pConfigs[i].accumRedSize = 16;
pConfigs[i].accumGreenSize = 16;
pConfigs[i].accumBlueSize = 16;
pConfigs[i].accumAlphaSize = 0;
pConfigs[i].accumAlphaSize = 16;
} else {
pConfigs[i].accumRedSize = 0;
pConfigs[i].accumGreenSize = 0;
......@@ -346,7 +346,7 @@ I830InitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].doubleBuffer = FALSE;
}
pConfigs[i].stereo = FALSE;
pConfigs[i].bufferSize = 24;
pConfigs[i].bufferSize = 32;
if (depth) {
pConfigs[i].depthSize = 24;
pConfigs[i].stencilSize = 8;
......@@ -357,11 +357,11 @@ I830InitVisualConfigs(ScreenPtr pScreen)
pConfigs[i].auxBuffers = 0;
pConfigs[i].level = 0;
if (accum) {
pConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
pConfigs[i].visualRating = GLX_SLOW_CONFIG;
} else {
pConfigs[i].visualRating = GLX_NONE_EXT;
pConfigs[i].visualRating = GLX_NONE;
}
pConfigs[i].transparentPixel = 0;
pConfigs[i].transparentPixel = GLX_NONE;
pConfigs[i].transparentRed = 0;
pConfigs[i].transparentGreen = 0;
pConfigs[i].transparentBlue = 0;
......@@ -757,9 +757,15 @@ I830DRICloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
I830DRIPtr pI830DRI = (I830DRIPtr) pI830->pDRIInfo->devPrivate;
DPRINTF(PFX, "I830DRICloseScreen\n");
if (pI830DRI->irq) {
drmCtlUninstHandler(pI830->drmSubFD);
pI830DRI->irq = 0;
}
I830CleanupDma(pScrn);
DRICloseScreen(pScreen);
......@@ -823,6 +829,9 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
if (!pScrn->vtSema)
return;
if (syncType == DRI_3D_SYNC &&
oldContextType == DRI_2D_CONTEXT && newContextType == DRI_2D_CONTEXT) {
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
......@@ -1455,7 +1464,11 @@ I830EmitInvarientState(ScrnInfoPtr pScrn)
STENCIL_TEST_FUNC(COMPAREFUNC_ALWAYS) |
ENABLE_STENCIL_REF_VALUE | STENCIL_REF_VALUE(0));
OUT_RING(VRTX_FORMAT_NTEX(1));
OUT_RING(STATE3D_VERTEX_FORMAT_CMD |