summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--README.G8016
-rw-r--r--configure.ac2
-rw-r--r--man/nv.man4
-rw-r--r--src/g80_driver.c3
-rw-r--r--src/g80_output.c2
-rw-r--r--src/nv_driver.c73
-rw-r--r--src/nv_hw.c13
-rw-r--r--src/nv_type.h1
9 files changed, 107 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 5acfc99..aa4996b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man compat
-EXTRA_DIST = README.NV1 ChangeLog
+EXTRA_DIST = README.NV1 README.G80 ChangeLog
CLEANFILES = ChangeLog
.PHONY: ChangeLog
diff --git a/README.G80 b/README.G80
new file mode 100644
index 0000000..f168957
--- /dev/null
+++ b/README.G80
@@ -0,0 +1,16 @@
+This xf86-video-nv driver package contains support for the NVIDIA GeForce 8
+series of graphics processors.
+
+There are a few caveats of which to be aware:
+ - The XVideo extension is not supported.
+ - With X servers prior to version 1.2.0 (X.org 7.2.0) on 64-bit Linux or most
+ non-Linux platforms, the driver may fail to restore the console due to bugs
+ in the server's x86 emulator.
+ - The RENDER extension is not accelerated by this driver.
+ - Only one output can be used at a time. Work is in progress in the randr-1.2
+ branch to support dual-head output.
+
+Bugs should be reported at http://bugs.freedesktop.org/ under the "xorg"
+product, "Driver/nVidia (open)" component. Please be sure to fill out the
+platform, OS, and severity fields. Also attach a copy of your Xorg log file and
+provide a detailed description of your problem and how to reproduce it.
diff --git a/configure.ac b/configure.ac
index 5370beb..75e954a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-nv],
- 1.99.1,
+ 2.0.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-nv)
diff --git a/man/nv.man b/man/nv.man
index c8d2fcb..6ef62c5 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -60,7 +60,7 @@ NV40, NV41, NV43, NV44, NV45, C51
G70, G71, G72, G73
.TP 22
.B GeForce 8XXX
-G80
+G80, G84, G86
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
@@ -136,7 +136,7 @@ Enable or disable use of the shadow framebuffer layer. Default: off.
.PP
The following driver
.B Options
-are available for G80:
+are available for G80 and higher:
.TP
.BI "Option \*qHWCursor\*q \*q" boolean \*q
Enable or disable the hardware cursor. Default: on.
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 9ce23ff..a4e7bad 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -399,9 +399,6 @@ AcquireDisplay(ScrnInfoPtr pScrn)
return FALSE;
if(!G80CursorAcquire(pScrn))
return FALSE;
-#if 0
- G80DispDPMSSet(pScrn, DPMSModeOn, 0);
-#endif
xf86SetDesiredModes(pScrn);
return TRUE;
diff --git a/src/g80_output.c b/src/g80_output.c
index fd32f98..354d39a 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -58,7 +58,7 @@ static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
entries = table2[2];
for(i = 0; i < entries; i++) {
- CARD32 type, port;
+ int type, port;
ORNum or;
b = *(CARD32*)&table2[headerSize + 8*i];
diff --git a/src/nv_driver.c b/src/nv_driver.c
index f9fdc7e..c8b98b8 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -338,6 +338,11 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE0193, "GeForce 8800 GTS" },
{ 0x10DE019D, "Quadro FX 5600" },
{ 0x10DE019E, "Quadro FX 4600" },
+ { 0x10DE0400, "GeForce 8600 GTS" },
+ { 0x10DE0402, "GeForce 8600 GT" },
+ { 0x10DE0421, "GeForce 8500 GT" },
+ { 0x10DE0422, "GeForce 8400 GS" },
+ { 0x10DE0423, "GeForce 8300 GS" },
{-1, NULL}
};
@@ -809,7 +814,10 @@ NVProbe(DriverPtr drv, int flags)
Bool
NVSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
{
- return NVModeInit(xf86Screens[scrnIndex], mode);
+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+
+ NVSync(pScrn);
+ return NVModeInit(pScrn, mode);
}
/*
@@ -1011,6 +1019,31 @@ Bool NVI2CInit(ScrnInfoPtr pScrn)
return FALSE;
}
+
+/* Copied from ddc/Property.c */
+static DisplayModePtr
+NVModesAdd(DisplayModePtr Modes, DisplayModePtr Additions)
+{
+ if (!Modes) {
+ if (Additions)
+ return Additions;
+ else
+ return NULL;
+ }
+
+ if (Additions) {
+ DisplayModePtr Mode = Modes;
+
+ while (Mode->next)
+ Mode = Mode->next;
+
+ Mode->next = Additions;
+ Additions->prev = Mode;
+ }
+
+ return Modes;
+}
+
/* Mandatory */
Bool
NVPreInit(ScrnInfoPtr pScrn, int flags)
@@ -1020,6 +1053,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
int i, max_width, max_height;
ClockRangePtr clockRanges;
const char *s;
+ Bool config_mon_rates;
if (flags & PROBE_DETECT) {
EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
@@ -1477,6 +1511,12 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
pNv->alphaCursor = (pNv->Architecture >= NV_ARCH_10) &&
((pNv->Chipset & 0x0ff0) != 0x0100);
+ if ((pScrn->monitor->nHsync == 0) &&
+ (pScrn->monitor->nVrefresh == 0))
+ config_mon_rates = FALSE;
+ else
+ config_mon_rates = TRUE;
+
NVCommonSetup(pScrn);
if (pNv->FBDev) {
@@ -1546,6 +1586,35 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
max_height = 4096;
}
+ /* If DFP, add a modeline corresponding to its panel size */
+ if (pNv->FlatPanel && !pNv->Television && pNv->fpWidth && pNv->fpHeight) {
+ DisplayModePtr Mode;
+
+ Mode = xf86CVTMode(pNv->fpWidth, pNv->fpHeight, 60.00, TRUE, FALSE);
+ Mode->type = M_T_DRIVER;
+ pScrn->monitor->Modes = NVModesAdd(pScrn->monitor->Modes, Mode);
+
+ if (!config_mon_rates) {
+ if (!Mode->HSync)
+ Mode->HSync = ((float) Mode->Clock ) / ((float) Mode->HTotal);
+ if (!Mode->VRefresh)
+ Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) /
+ ((float) (Mode->HTotal * Mode->VTotal));
+
+ if (Mode->HSync < pScrn->monitor->hsync[0].lo)
+ pScrn->monitor->hsync[0].lo = Mode->HSync;
+ if (Mode->HSync > pScrn->monitor->hsync[0].hi)
+ pScrn->monitor->hsync[0].hi = Mode->HSync;
+ if (Mode->VRefresh < pScrn->monitor->vrefresh[0].lo)
+ pScrn->monitor->vrefresh[0].lo = Mode->VRefresh;
+ if (Mode->VRefresh > pScrn->monitor->vrefresh[0].hi)
+ pScrn->monitor->vrefresh[0].hi = Mode->VRefresh;
+
+ pScrn->monitor->nHsync = 1;
+ pScrn->monitor->nVrefresh = 1;
+ }
+ }
+
/*
* xf86ValidateModes will check that the mode HTotal and VTotal values
* don't exceed the chipset's limit if pScrn->maxHValue and
@@ -1784,6 +1853,8 @@ NVRestore(ScrnInfoPtr pScrn)
NVPtr pNv = NVPTR(pScrn);
NVRegPtr nvReg = &pNv->SavedReg;
+ if(pNv->HWCursor)
+ NVShowHideCursor(pNv, 0);
NVLockUnlock(pNv, 0);
if(pNv->twoHeads) {
diff --git a/src/nv_hw.c b/src/nv_hw.c
index ab703f1..d7a0c19 100644
--- a/src/nv_hw.c
+++ b/src/nv_hw.c
@@ -878,6 +878,10 @@ void NVCalcStateExt (
state->general = bpp == 16 ? 0x00101100 : 0x00100100;
state->repaint1 = hDisplaySize < 1280 ? 0x04 : 0x00;
break;
+ case NV_ARCH_40:
+ if(!pNv->FlatPanel)
+ state->control = pNv->PRAMDAC0[0x0580/4] & 0xeffffeff;
+ /* fallthrough */
case NV_ARCH_10:
case NV_ARCH_20:
case NV_ARCH_30:
@@ -1186,6 +1190,7 @@ void NVLoadStateExt (
pNv->PGRAPH[0x008C/4] = 0x60de8051;
pNv->PGRAPH[0x0090/4] = 0x00008000;
pNv->PGRAPH[0x0610/4] = 0x00be3c5f;
+ pNv->PGRAPH[0x0bc4/4] |= 0x00008000;
j = pNv->REGS[0x1540/4] & 0xff;
if(j) {
@@ -1475,6 +1480,10 @@ void NVLoadStateExt (
VGA_WR08(pNv->PCIO, 0x03D5, state->interlace);
if(!pNv->FlatPanel) {
+ if(pNv->Architecture >= NV_ARCH_40) {
+ pNv->PRAMDAC0[0x0580/4] = state->control;
+ }
+
pNv->PRAMDAC0[0x050C/4] = state->pllsel;
pNv->PRAMDAC0[0x0508/4] = state->vpll;
if(pNv->twoHeads)
@@ -1541,6 +1550,10 @@ void NVUnloadStateExt
state->scale = pNv->PRAMDAC[0x0848/4];
state->config = pNv->PFB[0x0200/4];
+ if(pNv->Architecture >= NV_ARCH_40 && !pNv->FlatPanel) {
+ state->control = pNv->PRAMDAC0[0x0580/4];
+ }
+
if(pNv->Architecture >= NV_ARCH_10) {
if(pNv->twoHeads) {
state->head = pNv->PCRTC0[0x0860/4];
diff --git a/src/nv_type.h b/src/nv_type.h
index d704e2e..6b29d99 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -56,6 +56,7 @@ typedef struct _riva_hw_state
U032 vpllB;
U032 vpll2B;
U032 pllsel;
+ U032 control;
U032 general;
U032 crtcOwner;
U032 head;