[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-nv: Changes to 'upstream-unstable'



 configure.ac     |    2 +-
 src/g80_driver.c |   30 ++++++++++++++++++++++++------
 src/nv_driver.c  |    1 +
 3 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 0f93ad0e2af26b4e2381f337b58d3a5e50302664
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon Jul 2 09:01:12 2007 -0700

    Bump to 2.1.1.

diff --git a/configure.ac b/configure.ac
index 0b5c14b..ec55eb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nv],
-        2.1.0,
+        2.1.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nv)
 

commit 4ff01787a6640bf76cc34a51c99227845dc4678e
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Sat Jun 30 21:52:08 2007 -0700

    GeForce 8400M G.

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 4c2a395..f0f119f 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -347,6 +347,7 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0421, "GeForce 8500 GT" },
   { 0x10DE0422, "GeForce 8400 GS" },
   { 0x10DE0423, "GeForce 8300 GS" },
+  { 0x10DE0428, "GeForce 8400M G" },
 
   {-1, NULL}
 };

commit 63eb1a4aa402ac3bf117634c3c9270261c6a4258
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Sat Jun 30 21:51:15 2007 -0700

    Support configs with BAR1 < total RAM < 256 MB.

diff --git a/src/g80_driver.c b/src/g80_driver.c
index c81388c..e703ea8 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -194,6 +194,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
     const Gamma gzeros = {0.0, 0.0, 0.0};
     char *s;
     CARD32 tmp;
+    memType BAR1sizeKB;
 
     if(flags & PROBE_DETECT) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -341,18 +342,35 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
     pNv->architecture = pNv->reg[0] >> 20 & 0x1ff;
     pNv->RamAmountKBytes = pNv->RamAmountKBytes = (pNv->reg[0x0010020C/4] & 0xFFF00000) >> 10;
     pNv->videoRam = pNv->RamAmountKBytes;
-    /* Limit videoRam to the max BAR1 size of 256MB */
-    if(pNv->videoRam <= 1024) {
+
+    /* Determine the size of BAR1 */
+    /* Some configs have BAR1 < total RAM < 256 MB */
+    BAR1sizeKB = 1UL << (pPci->size[1] - 10);
+    if(BAR1sizeKB > 256 * 1024) {
+        xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "BAR1 is > 256 MB, which is "
+                   "probably wrong.  Clamping to 256 MB.\n");
+        BAR1sizeKB = 256 * 1024;
+    }
+
+    /* Limit videoRam to the size of BAR1 */
+    if(pNv->videoRam <= 1024 || BAR1sizeKB == 0) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to determine the amount of "
                    "available video memory\n");
         goto fail;
     }
     pNv->videoRam -= 1024;
-    if(pNv->videoRam > 256 * 1024)
-        pNv->videoRam = 256 * 1024;
+    if(pNv->videoRam > BAR1sizeKB)
+        pNv->videoRam = BAR1sizeKB;
+
     pScrn->videoRam = pNv->videoRam;
-    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Mapping %.1f of %.1f MB of video RAM\n",
-               pScrn->videoRam / 1024.0, pNv->RamAmountKBytes / 1024.0);
+
+    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Total video RAM: %.1f MB\n",
+               pNv->RamAmountKBytes / 1024.0);
+    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "      BAR1 size: %.1f MB\n",
+               BAR1sizeKB / 1024.0);
+    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "  Mapped memory: %.1f MB\n",
+               pScrn->videoRam / 1024.0);
+
     pNv->mem = xf86MapPciMem(pScrn->scrnIndex,
                              VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
                              pcitag, pPci->memBase[1], pScrn->videoRam * 1024);



Reply to: