summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-06-16 09:23:29 +0000
committerEric Anholt <anholt@freebsd.org>2004-06-16 09:23:29 +0000
commitb9a6776bc04eb19343882bddb371b705677cfc14 (patch)
tree1a208639fce2ff133b157bf41ad8217f1d1035f2 /src
parentcbf040deb0ab24425468ed60b3f3edd322ec210f (diff)
Diffstat (limited to 'src')
-rw-r--r--src/nv_const.h2
-rw-r--r--src/nv_cursor.c2
-rw-r--r--src/nv_dac.c3
-rw-r--r--src/nv_dga.c2
-rw-r--r--src/nv_driver.c132
-rw-r--r--src/nv_include.h2
-rw-r--r--src/nv_local.h14
-rw-r--r--src/nv_proto.h2
-rw-r--r--src/nv_setup.c5
-rw-r--r--src/nv_shadow.c2
-rw-r--r--src/nv_type.h2
-rw-r--r--src/nv_video.c7
-rw-r--r--src/nv_xaa.c64
-rw-r--r--src/riva_hw.c5
-rw-r--r--src/riva_hw.h2
-rw-r--r--src/riva_tbl.h2
16 files changed, 89 insertions, 159 deletions
diff --git a/src/nv_const.h b/src/nv_const.h
index bd01635..f4ab437 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.6 2001/12/07 00:09:55 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.7 2003/07/31 20:24:29 mvojkovi Exp $ */
#ifndef __NV_CONST_H__
#define __NV_CONST_H__
diff --git a/src/nv_cursor.c b/src/nv_cursor.c
index 577b44d..85ac42a 100644
--- a/src/nv_cursor.c
+++ b/src/nv_cursor.c
@@ -37,7 +37,7 @@
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.11 2002/11/26 23:41:58 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_cursor.c,v 1.12 2003/07/31 20:24:29 mvojkovi Exp $ */
#include "nv_include.h"
diff --git a/src/nv_dac.c b/src/nv_dac.c
index 4b3f528..c1e093e 100644
--- a/src/nv_dac.c
+++ b/src/nv_dac.c
@@ -236,9 +236,6 @@ NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
} else
nvReg->cursorConfig |= 0x02000000;
- nvReg->timingH = 0;
- nvReg->timingV = 0;
-
return (TRUE);
}
diff --git a/src/nv_dga.c b/src/nv_dga.c
index baafbfe..d4bf3ff 100644
--- a/src/nv_dga.c
+++ b/src/nv_dga.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dga.c,v 1.11 2002/01/25 21:56:06 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dga.c,v 1.12 2003/07/31 20:24:29 mvojkovi Exp $ */
#include "nv_local.h"
#include "nv_include.h"
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 5f3756b..81afd9f 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1,4 +1,3 @@
-/* $XdotOrg$ */
/* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */
/*
* Copyright 1996-1997 David J. McKay
@@ -25,7 +24,7 @@
/* Hacked together from mga driver and 3.3.4 NVIDIA driver by Jarno Paananen
<jpaana@s2.org> */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.122 2004/01/10 22:31:53 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.114 2003/08/23 16:09:18 dawes Exp $ */
#include "nv_include.h"
@@ -52,8 +51,8 @@ static Bool NVSaveScreen(ScreenPtr pScreen, int mode);
/* Optional functions */
static void NVFreeScreen(int scrnIndex, int flags);
-static ModeStatus NVValidMode(int scrnIndex, DisplayModePtr mode,
- Bool verbose, int flags);
+static int NVValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose,
+ int flags);
/* Internally used functions */
@@ -113,11 +112,7 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE0175, "GeForce4 420 Go" },
{ 0x10DE0176, "GeForce4 420 Go 32M" },
{ 0x10DE0177, "GeForce4 460 Go" },
-#if defined(__powerpc__)
- { 0x10DE0179, "GeForce4 MX (Mac)" },
-#else
{ 0x10DE0179, "GeForce4 440 Go 64M" },
-#endif
{ 0x10DE017D, "GeForce4 410 Go 16M" },
{ 0x10DE017C, "Quadro4 500 GoGL" },
{ 0x10DE0178, "Quadro4 550 XGL" },
@@ -128,9 +123,6 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE0186, "GeForce4 448 Go" },
{ 0x10DE0187, "GeForce4 488 Go" },
{ 0x10DE0188, "Quadro4 580 XGL" },
-#if defined(__powerpc__)
- { 0x10DE0189, "GeForce4 MX with AGP8X (Mac)" },
-#endif
{ 0x10DE018A, "Quadro4 280 NVS" },
{ 0x10DE018B, "Quadro4 380 XGL" },
{ 0x10DE01F0, "GeForce4 MX Integrated GPU" },
@@ -168,40 +160,33 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE031D, "0x031D" },
{ 0x10DE031E, "0x031E" },
{ 0x10DE031F, "0x031F" },
- { 0x10DE0320, "GeForce FX 5200" },
{ 0x10DE0321, "GeForce FX 5200 Ultra" },
{ 0x10DE0322, "GeForce FX 5200" },
{ 0x10DE0323, "GeForce FX 5200SE" },
{ 0x10DE0324, "GeForce FX Go5200" },
{ 0x10DE0325, "GeForce FX Go5250" },
{ 0x10DE0328, "GeForce FX Go5200 32M/64M" },
-#if defined(__powerpc__)
- { 0x10DE0329, "GeForce FX 5200 (Mac)" },
-#else
{ 0x10DE0329, "0x0329" },
-#endif
- { 0x10DE032A, "Quadro NVS 280 PCI" },
+ { 0x10DE032A, "0x032A" },
{ 0x10DE032B, "Quadro FX 500" },
{ 0x10DE032C, "GeForce FX Go5300" },
{ 0x10DE032D, "GeForce FX Go5100" },
{ 0x10DE032F, "0x032F" },
{ 0x10DE0330, "GeForce FX 5900 Ultra" },
{ 0x10DE0331, "GeForce FX 5900" },
- { 0x10DE0332, "GeForce FX 5900XT" },
+ { 0x10DE0332, "0x0332" },
{ 0x10DE0333, "GeForce FX 5950 Ultra" },
{ 0x10DE0334, "0x0334" },
{ 0x10DE0338, "Quadro FX 3000" },
- { 0x10DE0341, "GeForce FX 5700 Ultra" },
- { 0x10DE0342, "GeForce FX 5700" },
- { 0x10DE0343, "GeForce FX 5700LE" },
- { 0x10DE0344, "GeForce FX 5700VE" },
- { 0x10DE0345, "0x0345" },
- { 0x10DE0347, "GeForce FX Go5700" },
- { 0x10DE0348, "GeForce FX Go5700" },
+ { 0x10DE0341, "0x0341" },
+ { 0x10DE0342, "0x0342" },
+ { 0x10DE0343, "0x0343" },
+ { 0x10DE0347, "0x0347" },
+ { 0x10DE0348, "0x0348" },
{ 0x10DE0349, "0x0349" },
{ 0x10DE034B, "0x034B" },
- { 0x10DE034C, "Quadro FX Go1000" },
- { 0x10DE034E, "Quadro FX 1100" },
+ { 0x10DE034C, "0x034C" },
+ { 0x10DE034E, "0x034E" },
{ 0x10DE034F, "0x034F" },
{-1, NULL}
};
@@ -328,7 +313,7 @@ static XF86ModuleVersionInfo nvVersRec =
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
- XORG_VERSION_CURRENT,
+ XF86_VERSION_CURRENT,
NV_MAJOR_VERSION, NV_MINOR_VERSION, NV_PATCHLEVEL,
ABI_CLASS_VIDEODRV, /* This is a video driver */
ABI_VIDEODRV_VERSION,
@@ -446,13 +431,9 @@ nvSetup(pointer module, pointer opts, int *errmaj, int *errmin)
static const OptionInfoRec *
NVAvailableOptions(int chipid, int busid)
{
- if(chipid == 0x12D20018) {
- if (!xf86LoadOneModule("riva128", NULL)) {
- return NULL;
- } else
- return RivaAvailableOptions(chipid, busid);
- }
-
+ if(chipid == 0x12D20018)
+ return RivaAvailableOptions(chipid, busid);
+
return NVOptions;
}
@@ -765,7 +746,7 @@ NVFreeScreen(int scrnIndex, int flags)
/* Checks if a mode is suitable for the selected chipset. */
/* Optional */
-static ModeStatus
+static int
NVValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
{
return (MODE_OK);
@@ -811,6 +792,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
NVPtr pNv;
MessageType from;
int i, max_width, max_height;
+ int bytesPerPixel;
ClockRangePtr clockRanges;
const char *s;
@@ -978,6 +960,8 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
}
}
+ bytesPerPixel = pScrn->bitsPerPixel / 8;
+
/* The vgahw module should be loaded here when needed */
if (!xf86LoadSubModule(pScrn, "vgahw")) {
xf86FreeInt10(pNv->pInt);
@@ -1187,12 +1171,22 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
NVCommonSetup(pScrn);
- if (pNv->FBDev) {
- pScrn->videoRam = fbdevHWGetVidmem(pScrn)/1024;
+ /*
+ * If the user has specified the amount of memory in the XF86Config
+ * file, we respect that setting.
+ */
+ if (pNv->pEnt->device->videoRam != 0) {
+ pScrn->videoRam = pNv->pEnt->device->videoRam;
+ from = X_CONFIG;
} else {
- pScrn->videoRam = pNv->RamAmountKBytes;
+ if (pNv->FBDev) {
+ pScrn->videoRam = fbdevHWGetVidmem(pScrn)/1024;
+ } else {
+ pScrn->videoRam = pNv->RamAmountKBytes;
+ }
+ from = X_PROBED;
}
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "VideoRAM: %d kBytes\n",
+ xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kBytes\n",
pScrn->videoRam);
pNv->FbMapSize = pScrn->videoRam * 1024;
@@ -1502,57 +1496,12 @@ NVRestore(ScrnInfoPtr pScrn)
vgaHWProtect(pScrn, FALSE);
}
-static void NVBacklightEnable(NVPtr pNv, Bool on)
-{
- /* This is done differently on each laptop. Here we
- define the ones we know for sure. */
-
-#if defined(__powerpc__)
- if((pNv->Chipset == 0x10DE0179) ||
- (pNv->Chipset == 0x10DE0189) ||
- (pNv->Chipset == 0x10DE0329))
- {
- /* NV17,18,34 Apple iMac, iBook, PowerBook */
- CARD32 tmp_pmc, tmp_pcrt;
- tmp_pmc = pNv->PMC[0x10F0/4] & 0x7FFFFFFF;
- tmp_pcrt = pNv->PCRTC0[0x081C/4] & 0xFFFFFFFC;
- if(on) {
- tmp_pmc |= (1 << 31);
- tmp_pcrt |= 0x1;
- }
- pNv->PMC[0x10F0/4] = tmp_pmc;
- pNv->PCRTC0[0x081C/4] = tmp_pcrt;
- }
-#endif
-}
-
-static void
-NVDPMSSetLCD(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
-{
- NVPtr pNv = NVPTR(pScrn);
-
- if (!pScrn->vtSema) return;
-
- switch (PowerManagementMode) {
- case DPMSModeStandby: /* HSync: Off, VSync: On */
- case DPMSModeSuspend: /* HSync: On, VSync: Off */
- case DPMSModeOff: /* HSync: Off, VSync: Off */
- NVBacklightEnable(pNv, 0);
- break;
- case DPMSModeOn: /* HSync: On, VSync: On */
- NVBacklightEnable(pNv, 1);
- default:
- break;
- }
- vgaHWDPMSSet(pScrn, PowerManagementMode, flags);
-}
-
-
static void
NVDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
{
unsigned char crtc1A;
vgaHWPtr hwp = VGAHWPTR(pScrn);
+ NVPtr pNv = NVPTR(pScrn);
if (!pScrn->vtSema) return;
@@ -1576,7 +1525,8 @@ NVDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
/* vgaHWDPMSSet will merely cut the dac output */
vgaHWDPMSSet(pScrn, PowerManagementMode, flags);
- hwp->writeCrtc(hwp, 0x1A, crtc1A);
+ if(!pNv->FlatPanel) /* this doesn't work for flat panels */
+ hwp->writeCrtc(hwp, 0x1A, crtc1A);
}
@@ -1781,18 +1731,12 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
case 16: refreshArea = NVRefreshArea16; break;
case 32: refreshArea = NVRefreshArea32; break;
}
- xf86DisableRandR();
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Driver rotation enabled, RandR disabled\n");
}
ShadowFBInit(pScreen, refreshArea);
}
- if(pNv->FlatPanel)
- xf86DPMSInit(pScreen, NVDPMSSetLCD, 0);
- else
- xf86DPMSInit(pScreen, NVDPMSSet, 0);
+ xf86DPMSInit(pScreen, NVDPMSSet, 0);
pScrn->memPhysBase = pNv->FbAddress;
pScrn->fbOffset = 0;
diff --git a/src/nv_include.h b/src/nv_include.h
index acd3543..2d4465b 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.9 2000/10/06 12:31:03 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.11 2001/12/07 00:09:56 mvojkovi Exp $ */
#ifndef __NV_INCLUDE_H__
#define __NV_INCLUDE_H__
diff --git a/src/nv_local.h b/src/nv_local.h
index ed58ef4..dc29a6f 100644
--- a/src/nv_local.h
+++ b/src/nv_local.h
@@ -36,7 +36,7 @@
|* those rights set forth herein. *|
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_local.h,v 1.8tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_local.h,v 1.8 2003/07/31 20:24:29 mvojkovi Exp $ */
#ifndef __NV_LOCAL_H__
#define __NV_LOCAL_H__
@@ -60,12 +60,12 @@ typedef unsigned int U032;
/*
* HW access macros. These assume memory-mapped I/O, and not normal I/O space.
*/
-#define NV_WR08(p,i,d) MMIO_OUT8((pointer)(p), (i), (d))
-#define NV_RD08(p,i) MMIO_IN8((pointer)(p), (i))
-#define NV_WR16(p,i,d) MMIO_OUT16((pointer)(p), (i), (d))
-#define NV_RD16(p,i) MMIO_IN16((pointer)(p), (i))
-#define NV_WR32(p,i,d) MMIO_OUT32((pointer)(p), (i), (d))
-#define NV_RD32(p,i) MMIO_IN32((pointer)(p), (i))
+#define NV_WR08(p,i,d) MMIO_OUT8((volatile pointer)(p), (i), (d))
+#define NV_RD08(p,i) MMIO_IN8((volatile pointer)(p), (i))
+#define NV_WR16(p,i,d) MMIO_OUT16((volatile pointer)(p), (i), (d))
+#define NV_RD16(p,i) MMIO_IN16((volatile pointer)(p), (i))
+#define NV_WR32(p,i,d) MMIO_OUT32((volatile pointer)(p), (i), (d))
+#define NV_RD32(p,i) MMIO_IN32((volatile pointer)(p), (i))
/* VGA I/O is now always done through MMIO */
#define VGA_WR08(p,i,d) NV_WR08(p,i,d)
diff --git a/src/nv_proto.h b/src/nv_proto.h
index a074346..f526a71 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.9 2003/05/04 01:20:52 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.10 2003/07/31 20:24:29 mvojkovi Exp $ */
#ifndef __NV_PROTO_H__
#define __NV_PROTO_H__
diff --git a/src/nv_setup.c b/src/nv_setup.c
index e399904..3d58efa 100644
--- a/src/nv_setup.c
+++ b/src/nv_setup.c
@@ -37,7 +37,7 @@
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.39 2003/11/07 23:56:28 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.38 2003/09/08 20:00:27 mvojkovi Exp $ */
#include "nv_include.h"
@@ -292,7 +292,7 @@ static void nv10GetConfig (NVPtr pNv)
}
#endif
- if((pNv->Chipset & 0xffff) == 0x01a0) {
+ if((pNv->Chipset && 0xffff) == 0x01a0) {
int amt = pciReadLong(pciTag(0, 0, 1), 0x7C);
pNv->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024;
} else if((pNv->Chipset & 0xffff) == 0x01f0) {
@@ -403,7 +403,6 @@ NVCommonSetup(ScrnInfoPtr pScrn)
case 0x017D:
case 0x0186:
case 0x0187:
- case 0x0189:
case 0x0286:
case 0x028C:
case 0x0316:
diff --git a/src/nv_shadow.c b/src/nv_shadow.c
index 564220a..5effc79 100644
--- a/src/nv_shadow.c
+++ b/src/nv_shadow.c
@@ -2,7 +2,7 @@
Copyright (c) 1999, The XFree86 Project Inc.
Written by Mark Vojkovich <markv@valinux.com>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c,v 1.5 2000/03/13 18:49:29 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_shadow.c,v 1.6 2001/01/22 21:32:36 dawes Exp $ */
#include "nv_local.h"
#include "nv_include.h"
diff --git a/src/nv_type.h b/src/nv_type.h
index 5cae38d..5730cb5 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -63,8 +63,6 @@ typedef struct _riva_hw_state
U032 cursor0;
U032 cursor1;
U032 cursor2;
- U032 timingH;
- U032 timingV;
} RIVA_HW_STATE, *NVRegPtr;
diff --git a/src/nv_video.c b/src/nv_video.c
index 66f49c0..f985461 100644
--- a/src/nv_video.c
+++ b/src/nv_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.20tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.19 2003/09/01 20:54:26 mvojkovi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -432,7 +432,7 @@ NVSetupOverlayVideo (ScreenPtr pScreen)
NVSetPortDefaults (pScrnInfo, pPriv);
/* gotta uninit this someplace */
- REGION_NULL(pScreen, &pPriv->clip);
+ REGION_INIT(pScreen, &pPriv->clip, NullBox, 0);
pNv->overlayAdaptor = adapt;
@@ -958,7 +958,7 @@ static int NVPutImage
NVPtr pNv = NVPTR(pScrnInfo);
INT32 xa, xb, ya, yb;
unsigned char *dst_start;
- int newSize, offset, s2offset, s3offset;
+ int pitch, newSize, offset, s2offset, s3offset;
int srcPitch, srcPitch2, dstPitch;
int top, left, right, bottom, npixels, nlines, bpp;
Bool skip = FALSE;
@@ -1011,6 +1011,7 @@ static int NVPutImage
}
bpp = pScrnInfo->bitsPerPixel >> 3;
+ pitch = bpp * pScrnInfo->displayWidth;
switch(id) {
case FOURCC_YV12:
diff --git a/src/nv_xaa.c b/src/nv_xaa.c
index 3bf6b16..2dd2bc1 100644
--- a/src/nv_xaa.c
+++ b/src/nv_xaa.c
@@ -37,7 +37,7 @@
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.33 2003/09/21 00:17:34 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_xaa.c,v 1.32 2003/08/18 21:40:04 mvojkovi Exp $ */
#include "nv_include.h"
#include "xaalocal.h"
@@ -113,13 +113,6 @@ NVDmaKickoff(NVPtr pNv)
}
}
-
-/* There is a HW race condition with videoram command buffers.
- You can't jump to the location of your put offset. We write put
- at the jump offset + SKIPS dwords with noop padding in between
- to solve this problem */
-#define SKIPS 8
-
void
NVDmaWait (
NVPtr pNv,
@@ -136,15 +129,15 @@ NVDmaWait (
pNv->dmaFree = pNv->dmaMax - pNv->dmaCurrent;
if(pNv->dmaFree < size) {
NVDmaNext(pNv, 0x20000000);
- if(dmaGet <= SKIPS) {
- if(pNv->dmaPut <= SKIPS) /* corner case - will be idle */
- WRITE_PUT(pNv, SKIPS + 1);
+ if(!dmaGet) {
+ if(!pNv->dmaPut) /* corner case - idle */
+ NVDmaKickoff(pNv);
do { dmaGet = READ_GET(pNv); }
- while(dmaGet <= SKIPS);
+ while(!dmaGet);
}
- WRITE_PUT(pNv, SKIPS);
- pNv->dmaCurrent = pNv->dmaPut = SKIPS;
- pNv->dmaFree = dmaGet - (SKIPS + 1);
+ WRITE_PUT(pNv, 0);
+ pNv->dmaCurrent = pNv->dmaPut = 0;
+ pNv->dmaFree = dmaGet - 1;
}
} else
pNv->dmaFree = dmaGet - pNv->dmaCurrent - 1;
@@ -201,7 +194,7 @@ void NVResetGraphics(ScrnInfoPtr pScrn)
{
NVPtr pNv = NVPTR(pScrn);
CARD32 surfaceFormat, patternFormat, rectFormat, lineFormat;
- int pitch, i;
+ int pitch;
if(pNv->NoAccel) return;
@@ -210,30 +203,27 @@ void NVResetGraphics(ScrnInfoPtr pScrn)
pNv->dmaBase = (CARD32*)(&pNv->FbStart[pNv->FbUsableSize]);
- for(i = 0; i < SKIPS; i++)
- pNv->dmaBase[i] = 0x00000000;
-
- pNv->dmaBase[0x0 + SKIPS] = 0x00040000;
- pNv->dmaBase[0x1 + SKIPS] = 0x80000010;
- pNv->dmaBase[0x2 + SKIPS] = 0x00042000;
- pNv->dmaBase[0x3 + SKIPS] = 0x80000011;
- pNv->dmaBase[0x4 + SKIPS] = 0x00044000;
- pNv->dmaBase[0x5 + SKIPS] = 0x80000012;
- pNv->dmaBase[0x6 + SKIPS] = 0x00046000;
- pNv->dmaBase[0x7 + SKIPS] = 0x80000013;
- pNv->dmaBase[0x8 + SKIPS] = 0x00048000;
- pNv->dmaBase[0x9 + SKIPS] = 0x80000014;
- pNv->dmaBase[0xA + SKIPS] = 0x0004A000;
- pNv->dmaBase[0xB + SKIPS] = 0x80000015;
- pNv->dmaBase[0xC + SKIPS] = 0x0004C000;
- pNv->dmaBase[0xD + SKIPS] = 0x80000016;
- pNv->dmaBase[0xE + SKIPS] = 0x0004E000;
- pNv->dmaBase[0xF + SKIPS] = 0x80000017;
+ pNv->dmaBase[0x0] = 0x00040000;
+ pNv->dmaBase[0x1] = 0x80000010;
+ pNv->dmaBase[0x2] = 0x00042000;
+ pNv->dmaBase[0x3] = 0x80000011;
+ pNv->dmaBase[0x4] = 0x00044000;
+ pNv->dmaBase[0x5] = 0x80000012;
+ pNv->dmaBase[0x6] = 0x00046000;
+ pNv->dmaBase[0x7] = 0x80000013;
+ pNv->dmaBase[0x8] = 0x00048000;
+ pNv->dmaBase[0x9] = 0x80000014;
+ pNv->dmaBase[0xA] = 0x0004A000;
+ pNv->dmaBase[0xB] = 0x80000015;
+ pNv->dmaBase[0xC] = 0x0004C000;
+ pNv->dmaBase[0xD] = 0x80000016;
+ pNv->dmaBase[0xE] = 0x0004E000;
+ pNv->dmaBase[0xF] = 0x80000017;
pNv->dmaPut = 0;
- pNv->dmaCurrent = 16 + SKIPS;
+ pNv->dmaCurrent = 16;
pNv->dmaMax = 8191;
- pNv->dmaFree = pNv->dmaMax - pNv->dmaCurrent;
+ pNv->dmaFree = 8175;
switch(pNv->CurrentLayout.depth) {
case 24:
diff --git a/src/riva_hw.c b/src/riva_hw.c
index fbd9858..9f50450 100644
--- a/src/riva_hw.c
+++ b/src/riva_hw.c
@@ -36,7 +36,7 @@
|* those rights set forth herein. *|
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.51tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.51 2003/07/31 20:24:30 mvojkovi Exp $ */
#include "riva_local.h"
#include "compiler.h"
@@ -169,13 +169,14 @@ static int nv3_iterate(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_arb_i
int mburst_size = 32;
int mmisses, gmisses, vmisses;
int misses;
- int vlwm, glwm;
+ int vlwm, glwm, mlwm;
int last, next, cur;
int max_gfsize ;
long ns;
vlwm = 0;
glwm = 0;
+ mlwm = 0;
vfsize = 0;
gfsize = 0;
cur = ainfo->cur;
diff --git a/src/riva_hw.h b/src/riva_hw.h
index 0680d7d..ec2b90b 100644
--- a/src/riva_hw.h
+++ b/src/riva_hw.h
@@ -36,7 +36,7 @@
|* those rights set forth herein. *|
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.h,v 1.25 2003/05/04 01:20:52 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.h,v 1.26 2003/07/31 20:24:31 mvojkovi Exp $ */
#ifndef __RIVA_HW_H__
#define __RIVA_HW_H__
diff --git a/src/riva_tbl.h b/src/riva_tbl.h
index 4156c80..bb2a329 100644
--- a/src/riva_tbl.h
+++ b/src/riva_tbl.h
@@ -36,7 +36,7 @@
|* those rights set forth herein. *|
|* *|
\***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_tbl.h,v 1.9 2002/01/30 01:35:03 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_tbl.h,v 1.10 2003/07/31 20:24:31 mvojkovi Exp $ */
/*