xserver-xorg-video-nv: Changes to 'upstream-unstable'
configure.ac | 2 +-
man/nv.man | 2 +-
src/g80_dac.c | 11 +++++------
src/g80_output.c | 38 ++++++++++++++++++++++++++++++++++++++
src/g80_sor.c | 4 ++--
src/g80_type.h | 1 +
src/nv_const.h | 4 ++++
src/nv_cursor.c | 6 +++---
src/nv_driver.c | 23 +++++++++++++++++++----
src/riva_cursor.c | 4 ++--
10 files changed, 76 insertions(+), 19 deletions(-)
New commits:
commit f8b24e5c729c9d3321282b065f4ef79b177f928d
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Fri Jan 25 18:23:48 2008 -0800
Bump to 2.1.7.
diff --git a/configure.ac b/configure.ac
index 49a0679..f2a92d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-nv],
- 2.1.6,
+ 2.1.7,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-nv)
commit d2367140ad1fe96bce5e780332d21999e5aa31bf
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Fri Jan 25 18:15:12 2008 -0800
Fix warning.
diff --git a/src/g80_output.c b/src/g80_output.c
index 53c0954..d2ea9ee 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -32,7 +32,7 @@
#include "g80_display.h"
#include "g80_output.h"
-static CARD32 G80FindLoadVal(const unsigned char *table1)
+static unsigned G80FindLoadVal(const unsigned char *table1)
{
const unsigned char *p = table1;
int count;
diff --git a/src/g80_type.h b/src/g80_type.h
index fc31085..5f4ee08 100644
--- a/src/g80_type.h
+++ b/src/g80_type.h
@@ -56,7 +56,7 @@ typedef struct G80Rec {
Bool present;
ORNum or;
} lvds;
- CARD32 loadVal;
+ unsigned loadVal;
xf86Int10InfoPtr int10;
int int10Mode; /* Console mode to restore */
commit e844f10c7b5e41330f2bcb884ab448641dd5bb06
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date: Thu Sep 27 00:22:04 2007 +0200
[PATCH] Enable backlight toggling for Dell Inspiron 8200 GeForce2 Go
GeForce2 Go and similar cards are explicitly excluded from the
NVBacklightEnable() code (purposedly, as the code used for the other
chipsets on x86 has no effect.) This causes the backlight to remain
active on laptops equipped with such a card, even when DPMS modes were
active.
Fix the issue for Dell Inspiron 8200 by introducing the proper
registry writes to toggle the backlight.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
diff --git a/src/nv_driver.c b/src/nv_driver.c
index fa6259d..d4e0be5 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -2184,8 +2184,17 @@ static void NVBacklightEnable(NVPtr pNv, Bool on)
#endif
if(pNv->LVDS) {
- if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != 0x0110)) {
- pNv->PMC[0x130C/4] = on ? 3 : 7;
+ if(pNv->twoHeads) {
+ if((pNv->Chipset & 0x0ff0) != 0x0110) {
+ pNv->PMC[0x130C/4] = on ? 3 : 7;
+ } else if(SUBVENDOR_ID(pNv->PciInfo) == 0x1028 &&
+ SUBDEVICE_ID(pNv->PciInfo) == 0xd4) {
+ // Dell Inspiron 8200, GeForce2 Go
+ CARD32 tmp_pcrt = pNv->PCRTC0[0x081C/4] & 0xFFFFFFFC;
+ if(on)
+ tmp_pcrt |= 0x1;
+ pNv->PCRTC0[0x081C/4] = tmp_pcrt;
+ }
}
} else {
CARD32 fpcontrol;
commit 02e431eb0969cabb67f3e4b1cb1a2d7fc5f697f0
Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date: Thu Sep 27 00:08:28 2007 +0200
[PATCH] Add macros to retrieve the subsystem vendor/device
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
diff --git a/src/nv_const.h b/src/nv_const.h
index 141e0f3..8f9799c 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -10,11 +10,15 @@
#define MEMBASE(p,n) (p)->regions[n].base_addr
#define VENDOR_ID(p) (p)->vendor_id
#define DEVICE_ID(p) (p)->device_id
+ #define SUBVENDOR_ID(p) (p)->subvendor_id
+ #define SUBDEVICE_ID(p) (p)->subdevice_id
#define CHIP_REVISION(p) (p)->revision
#else
#define MEMBASE(p,n) (p)->memBase[n]
#define VENDOR_ID(p) (p)->vendor
#define DEVICE_ID(p) (p)->chipType
+ #define SUBVENDOR_ID(p) (p)->subsysVendor
+ #define SUBDEVICE_ID(p) (p)->subsysCard
#define CHIP_REVISION(p) (p)->chipRev
#endif
commit 3449da7a7baf7365c247caa9b4344316a961ec41
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Thu Jan 24 20:51:29 2008 -0800
Update know card list date and add G92 to the manpage.
diff --git a/man/nv.man b/man/nv.man
index 7b9d946..7a08823 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, G84, G86
+G80, G84, G86, G92
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 64b4ebd..fa6259d 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -113,7 +113,7 @@ _X_EXPORT DriverRec NV = {
#endif
};
-/* Known cards as of 2007/07/24 */
+/* Known cards as of 2008/01/24 */
static SymTabRec NVKnownChipsets[] =
{
commit 62ff129257161db99dc4056cf16aa196ccfbc921
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Wed Jan 23 21:32:51 2008 -0800
Fix more load detection false positives.
diff --git a/src/g80_dac.c b/src/g80_dac.c
index 282436b..0d72d9d 100644
--- a/src/g80_dac.c
+++ b/src/g80_dac.c
@@ -136,23 +136,22 @@ G80DacLoadDetect(xf86OutputPtr output)
const int scrnIndex = pScrn->scrnIndex;
const int dacOff = 2048 * pPriv->or;
int sigstate;
- CARD32 load, tmp, tmp2;
+ CARD32 load, tmp;
xf86DrvMsg(scrnIndex, X_PROBED, "Trying load detection on VGA%i ... ",
pPriv->or);
pNv->reg[(0x0061A010+dacOff)/4] = 0x00000001;
- tmp2 = pNv->reg[(0x0061A004+dacOff)/4];
+ tmp = pNv->reg[(0x0061A004+dacOff)/4];
pNv->reg[(0x0061A004+dacOff)/4] = 0x80150000;
while(pNv->reg[(0x0061A004+dacOff)/4] & 0x80000000);
- tmp = pNv->architecture == 0x50 ? 420 : 340;
- pNv->reg[(0x0061A00C+dacOff)/4] = tmp | 0x100000;
+ pNv->reg[(0x0061A00C+dacOff)/4] = pNv->loadVal | 0x100000;
sigstate = xf86BlockSIGIO();
usleep(45000);
xf86UnblockSIGIO(sigstate);
load = pNv->reg[(0x0061A00C+dacOff)/4];
pNv->reg[(0x0061A00C+dacOff)/4] = 0;
- pNv->reg[(0x0061A004+dacOff)/4] = 0x80000000 | tmp2;
+ pNv->reg[(0x0061A004+dacOff)/4] = 0x80000000 | tmp;
// Use this DAC if all three channels show load.
if((load & 0x38000000) == 0x38000000) {
diff --git a/src/g80_output.c b/src/g80_output.c
index 1ec6a89..53c0954 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -32,6 +32,41 @@
#include "g80_display.h"
#include "g80_output.h"
+static CARD32 G80FindLoadVal(const unsigned char *table1)
+{
+ const unsigned char *p = table1;
+ int count;
+ const CARD32 def = 340;
+
+ for(p = table1; *(CARD16*)p != 0xb8ff && p < table1 + 64000; p += 2);
+ if(p == table1 + 64000)
+ return def;
+ p += 2;
+ if(*(CARD32*)p != 0x544942)
+ return def;
+ p += 4;
+ if(*(CARD16*)p != 0x100)
+ return def;
+ p += 2;
+ if(*p != 12)
+ return def;
+ p++;
+ if(*p != 6)
+ return def;
+ p++;
+ count = *p;
+ p += 2;
+ for(; *p != 'A' && count >= 0; count--, p += 6);
+ if(count == -1)
+ return def;
+ p += 4;
+ p = table1 + *(CARD16*)p;
+ p = table1 + *(CARD16*)p;
+ if(p[0] != 0x10 || p[1] != 4 || p[2] != 4 || p[3] != 2)
+ return def;
+ return *(CARD32*)(p + 4) & 0x3ff;
+}
+
static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
{
unsigned char *table2;
@@ -110,6 +145,9 @@ static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
xf86DrvMsg(scrnIndex, X_PROBED, " Bus %i -> SOR%i\n", i, pNv->i2cMap[i].sor);
}
+ pNv->loadVal = G80FindLoadVal(pNv->table1);
+ xf86DrvMsg(scrnIndex, X_PROBED, "Load detection: %d\n", pNv->loadVal);
+
return TRUE;
fail:
diff --git a/src/g80_type.h b/src/g80_type.h
index 41f170b..fc31085 100644
--- a/src/g80_type.h
+++ b/src/g80_type.h
@@ -56,6 +56,7 @@ typedef struct G80Rec {
Bool present;
ORNum or;
} lvds;
+ CARD32 loadVal;
xf86Int10InfoPtr int10;
int int10Mode; /* Console mode to restore */
commit 28f34db87cefdc6b327a98db43da5b4fefe3bdd8
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Wed Jan 23 20:23:32 2008 -0800
New chips.
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 4bcc391..64b4ebd 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -384,6 +384,7 @@ static SymTabRec NVKnownChipsets[] =
{ 0x10DE042D, "Quadro FX 360M" },
{ 0x10DE042F, "Quadro NVS 290" },
{ 0x10DE0611, "GeForce 8800 GT" },
+ { 0x10DE061A, "Quadro FX 3700" },
{-1, NULL}
};
@@ -750,6 +751,9 @@ NVIsG80(int chipType)
case 0x0400:
case 0x0420:
case 0x0610:
+ case 0x0620:
+ case 0x0630:
+ case 0x0640:
return TRUE;
}
commit 64721629c3908556fcf8c9941feea1e3b961bf00
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Sat Dec 1 16:02:37 2007 -0800
G80Create{Dac,Sor} return pointers, not Bools.
diff --git a/src/g80_dac.c b/src/g80_dac.c
index b155d2d..282436b 100644
--- a/src/g80_dac.c
+++ b/src/g80_dac.c
@@ -195,7 +195,7 @@ G80CreateDac(ScrnInfoPtr pScrn, ORNum or)
char orName[5];
if(!pPriv)
- return FALSE;
+ return NULL;
snprintf(orName, 5, "VGA%i", or);
output = xf86OutputCreate(pScrn, &G80DacOutputFuncs, orName);
diff --git a/src/g80_sor.c b/src/g80_sor.c
index e1128ef..387b1e8 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -475,7 +475,7 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
const xf86OutputFuncsRec *funcs;
if(!pPriv)
- return FALSE;
+ return NULL;
if(panelType == LVDS) {
strcpy(orName, "LVDS");
@@ -487,7 +487,7 @@ G80CreateSor(ScrnInfoPtr pScrn, ORNum or, PanelType panelType)
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Failed to find LVDS native mode\n");
xfree(pPriv);
- return FALSE;
+ return NULL;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s native size %dx%d\n",
commit 7f281be7e53ac274016a6af6b2b5dc6f8bddb810
Author: Aaron Plattner <aplattner@nvidia.com>
Date: Fri Nov 30 17:37:20 2007 -0800
Bug #7309: Delay after disabling cursor to avoid wedging the cursor hardware on GeForce 6150.
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 265979e..4bcc391 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -2134,8 +2134,10 @@ NVRestore(ScrnInfoPtr pScrn)
NVPtr pNv = NVPTR(pScrn);
NVRegPtr nvReg = &pNv->SavedReg;
- if(pNv->HWCursor)
+ if(pNv->HWCursor) {
NVShowHideCursor(pNv, 0);
+ sleep(1);
+ }
NVLockUnlock(pNv, 0);
if(pNv->twoHeads) {
commit 100f5e24da2cbc79ed761083daa9a00b107008ab
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Nov 26 13:14:40 2007 -0800
xcalloc needs 2 args, Xcalloc takes one - yay for inconsistency!
diff --git a/src/nv_cursor.c b/src/nv_cursor.c
index abaaab2..73e3fc6 100644
--- a/src/nv_cursor.c
+++ b/src/nv_cursor.c
@@ -135,11 +135,11 @@ TransformCursor (NVPtr pNv)
/* convert to color cursor */
if(pNv->alphaCursor) {
dwords = 64 * 64;
- if(!(tmp = xcalloc(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
ConvertCursor8888(pNv, pNv->curImage, tmp);
} else {
dwords = (32 * 32) >> 1;
- if(!(tmp = xcalloc(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
ConvertCursor1555(pNv, pNv->curImage, (CARD16*)tmp);
}
diff --git a/src/riva_cursor.c b/src/riva_cursor.c
index 77a3bfe..35d6a58 100644
--- a/src/riva_cursor.c
+++ b/src/riva_cursor.c
@@ -72,7 +72,7 @@ RivaTransformCursor (RivaPtr pRiva)
int i, dwords;
dwords = (32 * 32) >> 1;
- if(!(tmp = xcalloc(dwords * 4))) return;
+ if(!(tmp = Xcalloc(dwords * 4))) return;
RivaConvertCursor1555(pRiva, pRiva->curImage, (CARD16*)tmp);
for(i = 0; i < dwords; i++)
commit e9ada35b4d24abd44bc5d811b59c6f25af5984f4
Author: Ian Romanick <idr@us.ibm.com>
Date: Wed Nov 21 15:35:06 2007 -0800
Build fix for recent removal of ALLOCATE_LOCAL and DEALLOCATE_LOCAL
diff --git a/src/nv_cursor.c b/src/nv_cursor.c
index a648f60..abaaab2 100644
--- a/src/nv_cursor.c
+++ b/src/nv_cursor.c
@@ -135,18 +135,18 @@ TransformCursor (NVPtr pNv)
/* convert to color cursor */
if(pNv->alphaCursor) {
dwords = 64 * 64;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = xcalloc(dwords * 4))) return;
ConvertCursor8888(pNv, pNv->curImage, tmp);
} else {
dwords = (32 * 32) >> 1;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = xcalloc(dwords * 4))) return;
ConvertCursor1555(pNv, pNv->curImage, (CARD16*)tmp);
}
for(i = 0; i < dwords; i++)
pNv->CURSOR[i] = tmp[i];
- DEALLOCATE_LOCAL(tmp);
+ xfree(tmp);
}
static void
diff --git a/src/riva_cursor.c b/src/riva_cursor.c
index b8dc2bf..77a3bfe 100644
--- a/src/riva_cursor.c
+++ b/src/riva_cursor.c
@@ -72,13 +72,13 @@ RivaTransformCursor (RivaPtr pRiva)
int i, dwords;
dwords = (32 * 32) >> 1;
- if(!(tmp = ALLOCATE_LOCAL(dwords * 4))) return;
+ if(!(tmp = xcalloc(dwords * 4))) return;
RivaConvertCursor1555(pRiva, pRiva->curImage, (CARD16*)tmp);
for(i = 0; i < dwords; i++)
pRiva->riva.CURSOR[i] = tmp[i];
- DEALLOCATE_LOCAL(tmp);
+ xfree(tmp);
}
static void
Reply to: