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

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



 ChangeLog             |   43 +++++++++++++++++++++++++++++++++++++++++++
 configure.ac          |   11 +++++++++++
 debian/README.source  |    2 +-
 debian/changelog      |   12 ++++++++++++
 debian/control        |    6 +++---
 debian/xsfbs/xsfbs.mk |   31 ++++++++++++++++++++-----------
 man/nv.man            |    2 +-
 src/Makefile.am       |    2 +-
 src/g80_output.c      |   23 +++++++++++++----------
 src/nv_driver.c       |   43 ++++++++++++++++++++++++++++++++++++++++++-
 src/nv_hw.c           |    7 +++++--
 11 files changed, 152 insertions(+), 30 deletions(-)

New commits:
commit 66a40053b81e3536000705beb90f5daf43c7731c
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Apr 18 11:51:37 2010 +0200

    Use new xsfbs and ${xviddriver:Depends} variable (bumping the xserver-xorg-dev version in Build-Depends accordingly).

diff --git a/debian/changelog b/debian/changelog
index 3551ac2..f09f53e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ xserver-xorg-video-nv (1:2.1.17-2) UNRELEASED; urgency=low
     makes sure nv doesn't break console output when nouveau's KMS is
     active.
   * Add myself to Uploaders.
+  * Use new xsfbs and ${xviddriver:Depends} variable (bumping the
+    xserver-xorg-dev version in Build-Depends accordingly).
 
  -- Cyril Brulebois <kibi@debian.org>  Sun, 18 Apr 2010 11:31:15 +0200
 
diff --git a/debian/control b/debian/control
index 526cbbf..d7400ee 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org
 Build-Depends:
  debhelper (>= 5.0.0),
  pkg-config,
- xserver-xorg-dev (>= 2:1.7),
+ xserver-xorg-dev (>= 2:1.7.6.901),
  x11proto-video-dev,
  x11proto-core-dev,
  x11proto-fonts-dev,
@@ -23,7 +23,7 @@ Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-nv.git
 
 Package: xserver-xorg-video-nv
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${xserver:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${xviddriver:Depends}
 Provides: ${xviddriver:Provides}, xf86-video-driver-riva128
 Conflicts: xserver-xorg-video-riva128, xserver-xorg-driver-nv
 Replaces: xserver-xorg (<< 6.8.2-35), xserver-xorg-video-riva128, xserver-xorg-driver-nv

commit b83faf6ed029925fd32633a539509a3741793eb2
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Apr 18 11:36:19 2010 +0200

    Add myself to Uploaders.

diff --git a/debian/changelog b/debian/changelog
index 596a75c..3551ac2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ xserver-xorg-video-nv (1:2.1.17-2) UNRELEASED; urgency=low
     bind to a device which has kernel modesetting active.” commit, which
     makes sure nv doesn't break console output when nouveau's KMS is
     active.
+  * Add myself to Uploaders.
 
  -- Cyril Brulebois <kibi@debian.org>  Sun, 18 Apr 2010 11:31:15 +0200
 
diff --git a/debian/control b/debian/control
index 0dcbb26..526cbbf 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: xserver-xorg-video-nv
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>
+Uploaders: David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>, Cyril Brulebois <kibi@debian.org>
 Build-Depends:
  debhelper (>= 5.0.0),
  pkg-config,

commit c7e744ca5c5c507f37fcf1a928cb135952a2f40c
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Apr 18 11:35:51 2010 +0200

    Document the upstream merge.

diff --git a/debian/changelog b/debian/changelog
index 93746cf..596a75c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-nv (1:2.1.17-2) UNRELEASED; urgency=low
+
+  * Merge upstream's master as of 17ab5dbea6. This includes the “Refuse to
+    bind to a device which has kernel modesetting active.” commit, which
+    makes sure nv doesn't break console output when nouveau's KMS is
+    active.
+
+ -- Cyril Brulebois <kibi@debian.org>  Sun, 18 Apr 2010 11:31:15 +0200
+
 xserver-xorg-video-nv (1:2.1.17-1) unstable; urgency=low
 
   [ Julien Cristau ]

commit 91323a350eb226cdaacf2d12c62e4b16283bf5e4
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Apr 18 11:31:00 2010 +0200

    Refresh ChangeLog.

diff --git a/ChangeLog b/ChangeLog
index 4dfa13f..811aa01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+commit 17ab5dbea69e690cbf78c25040db518471e0887f
+Author: Marcin Slusarz <marcin.slusarz@gmail.com>
+Date:   Fri Apr 16 10:19:19 2010 -0700
+
+    Refuse to bind to a device which has kernel modesetting active.
+    
+    Touching directly the hardware while kernel modesetting is active
+    breaks console output.
+    
+    Patch almost entrirely based on VESA patch by
+    Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
+    
+    Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
+    Tested-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 250a3a7cee1a4bbfc432ab6da5b986e889207526
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Wed Mar 10 18:31:08 2010 -0800
+
+    Update MCP6x supported products.
+    
+    Use the official names for 10DE:053B and 10DE:053E.  Add some additional
+    product IDs and update the documentation.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit 347625b8e187c4ab696cd1dad95e49c31ced12f6
+Author: Markus Strobl <markus.strobl@gmx.at>
+Date:   Wed Mar 10 18:26:33 2010 -0800
+
+    Bug #19817: Add support for GeForce 7025 and 7050.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
+commit e6b046329480a26ecebadf4314673db3f107f83e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Mon Mar 8 16:49:24 2010 -0800
+
+    Bug #24787: Don't crash if LVDS initialization fails
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+
 commit 71321d0ddecf1ab5327c754353d31db5d1f3c6bf
 Author: Aaron Plattner <aplattner@nvidia.com>
 Date:   Mon Mar 8 13:34:20 2010 -0800

commit b045afbd8277ad0c44e29d7c45802053c4335ccd
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Apr 16 22:14:46 2010 +0200

    Update serverabi rule for xserver 1.7.6.901
    
    Add new variables ${xviddriver:Depends} and ${xinpdriver:Depends} for
    drivers.  The ${xserver:Depends} variable is deprecated.

diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
index 351fea5..77c4a39 100755
--- a/debian/xsfbs/xsfbs.mk
+++ b/debian/xsfbs/xsfbs.mk
@@ -253,25 +253,33 @@ $(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir
 	#                                    debian/*.prerm
 	>$@
 
-SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
+# Compute dependencies for drivers
+#
+VIDEODEP = $(shell cat /usr/share/xserver-xorg/videodrvdep 2>/dev/null)
+INPUTDEP = $(shell cat /usr/share/xserver-xorg/xinputdep 2>/dev/null)
+
+# these two can be removed post-squeeze
 VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
 INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
-SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
 VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
 INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
+
 ifeq ($(PACKAGE),)
 PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
 endif
 
 .PHONY: serverabi
 serverabi: install
-ifeq ($(SERVERMINVERS),)
-	@echo error: xserver-xorg-dev needs to be installed
+ifeq ($(VIDEODEP),)
+	@echo 'error: xserver-xorg-dev >= 1.7.6.901 needs to be installed'
 	@exit 1
 else
-	echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars
+	echo "xviddriver:Depends=$(VIDEODEP)" >> debian/$(PACKAGE).substvars
+	echo "xinpdriver:Depends=$(INPUTDEP)" >> debian/$(PACKAGE).substvars
+	# the following is there for compatibility...
 	echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
 	echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
+	echo "xserver:Depends=$(VIDEODEP), $(INPUTDEP)" >> debian/$(PACKAGE).substvars
 endif
 
 # vim:set noet ai sts=8 sw=8 tw=0:

commit 17ab5dbea69e690cbf78c25040db518471e0887f
Author: Marcin Slusarz <marcin.slusarz@gmail.com>
Date:   Fri Apr 16 10:19:19 2010 -0700

    Refuse to bind to a device which has kernel modesetting active.
    
    Touching directly the hardware while kernel modesetting is active
    breaks console output.
    
    Patch almost entrirely based on VESA patch by
    Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
    
    Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
    Tested-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>

diff --git a/configure.ac b/configure.ac
index d717805..c51ab4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,6 +134,17 @@ AC_SUBST([modes_dir])
 AC_SUBST([XORG_CFLAGS])
 AC_SUBST([moduledir])
 
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+    PKG_CHECK_MODULES(LIBDRM, [libdrm > 2.4.3 xf86driproto], HAVE_KMS="yes", HAVE_KMS="no")
+    if test "x$HAVE_KMS" = xyes; then
+        AC_DEFINE(HAVE_KMS, 1, [Have kernel modesetting])
+    else
+        AC_MSG_WARN(Support for detecting kernel modesetting drivers is not available.)
+        AC_MSG_WARN(This driver can cause display problems in the presence of kernel modesetting.)
+        AC_MSG_WARN(Please install libdrm > 2.4.3 and xf86driproto to enable KMS detection.)
+    fi
+fi
+
 DRIVER_NAME=nv
 AC_SUBST([DRIVER_NAME])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 2677d9c..5d57010 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@
+AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@ $(LIBDRM_CFLAGS)
 nv_drv_la_LTLIBRARIES = nv_drv.la
 nv_drv_la_LDFLAGS = -module -avoid-version
 nv_drv_ladir = @moduledir@/drivers
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 0d017f9..e10ae0c 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -33,6 +33,11 @@
 #include "xf86int10.h"
 #include "vbeModes.h"
 
+#ifdef HAVE_KMS
+#include <xf86drmMode.h>
+#include <dri.h>
+#endif
+
 const   OptionInfoRec * RivaAvailableOptions(int chipid, int busid);
 Bool    RivaGetScrnInfoRec(PciChipsets *chips, int chip);
 Bool    G80GetScrnInfoRec(PciChipsets *chips, int chip);
@@ -830,6 +835,26 @@ NVIsSupported(CARD32 id)
     return FALSE;
 }
 
+#ifdef HAVE_KMS
+static Bool NVKernelModesettingEnabled(struct pci_device *device)
+{
+    char *busIdString;
+    int ret;
+
+    if (!xf86LoaderCheckSymbol("DRICreatePCIBusID"))
+        return FALSE;
+
+    busIdString = DRICreatePCIBusID(device);
+
+    ret = drmCheckModesettingSupported(busIdString);
+    xfree(busIdString);
+
+    return (ret == 0);
+}
+#else
+static inline Bool NVKernelModesettingEnabled(struct pci_device *device) { return FALSE; }
+#endif //HAVE_KMS
+
 /* Mandatory */
 #if XSERVER_LIBPCIACCESS
 static Bool
@@ -864,6 +889,14 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t data)
                NV_NAME ": Found NVIDIA %s at %2.2x@%2.2x:%2.2x:%1.1x\n",
                name, dev->bus, dev->domain, dev->dev, dev->func);
 
+    /* Trying to bring up a NV mode while kernel modesetting is enabled
+       results in badness */
+    if (NVKernelModesettingEnabled(dev)) {
+        xf86Msg(X_ERROR,
+                NV_NAME ": Kernel modesetting driver in use, refusing to load\n");
+        return FALSE;
+    }
+
     if(NVIsG80(id))
         return G80GetScrnInfoRec(NULL, entity);
     else if(dev->vendor_id == PCI_VENDOR_NVIDIA_SGS)

commit 8bd2e9b523da35493db1bd781d4ef6bfbbeb2eff
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Apr 13 14:06:33 2010 +0200

    xsfbs.mk: don't use a directory as a make target
    
    The timestamp on the directory gets updated each time a file is added in
    it, which causes useless rebuilds.

diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
index 5e16b10..351fea5 100755
--- a/debian/xsfbs/xsfbs.mk
+++ b/debian/xsfbs/xsfbs.mk
@@ -110,14 +110,15 @@ $(STAMP_DIR)/stampdir:
 .PHONY: prepare
 stampdir_targets+=prepare
 prepare: $(STAMP_DIR)/prepare
-$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts
+$(STAMP_DIR)/prepare: $(STAMP_DIR)/logdir $(STAMP_DIR)/genscripts
 	>$@
 
-.PHONY: log
-stampdir_targets+=log
-log: $(STAMP_DIR)/log
-$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir
+.PHONY: logdir
+stampdir_targets+=logdir
+logdir: $(STAMP_DIR)/logdir
+$(STAMP_DIR)/logdir: $(STAMP_DIR)/stampdir
 	mkdir -p $(STAMP_DIR)/log
+	>$@
 
 # Apply all patches to the upstream source.
 .PHONY: patch
@@ -145,7 +146,7 @@ $(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
 
 # Revert all patches to the upstream source.
 .PHONY: unpatch
-unpatch: $(STAMP_DIR)/log
+unpatch: $(STAMP_DIR)/logdir
 	rm -f $(STAMP_DIR)/patch
 	@echo -n "Unapplying patches..."; \
 	if $(QUILT) applied >/dev/null 2>/dev/null; then \

commit 734e3b2d1dcfe5db07cb19902617fd1212c0c186
Author: Cyril Brulebois <kibi@debian.org>
Date:   Thu Apr 1 20:49:15 2010 +0200

    Fix typo.

diff --git a/debian/README.source b/debian/README.source
index 34ab4bf..b09a1ab 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -25,7 +25,7 @@ just need to be pulled into git.debian.org in a "upstream-*" branch.
 Otherwise, the upstream sources are manually installed in the Debian
 git repository.
 
-The .orig.tar.gz upstream source file could be generated this
+The .orig.tar.gz upstream source file could be generated using this
 "upstream-*" branch in the Debian git repository but it is actually
 copied from upstream tarballs directly.
 

commit 250a3a7cee1a4bbfc432ab6da5b986e889207526
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Wed Mar 10 18:31:08 2010 -0800

    Update MCP6x supported products.
    
    Use the official names for 10DE:053B and 10DE:053E.  Add some additional
    product IDs and update the documentation.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>

diff --git a/man/nv.man b/man/nv.man
index d7d8ae9..228f1da 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -57,7 +57,7 @@ NV30, NV31, NV34, NV35, NV36, NV37, NV38
 NV40, NV41, NV43, NV44, NV45, C51
 .TP 22
 .B GeForce 7XXX
-G70, G71, G72, G73
+G70, G71, G72, G73, MCP6x
 .TP 22
 .B GeForce 8XXX, GeForce 9XXX, nForce 7, GeForce G, ION
 G8x, G9x, GT21x, MCP7x
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 99d172f..0d017f9 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -125,7 +125,7 @@ _X_EXPORT DriverRec NV = {
 #endif
 };
 
-/* Known cards as of 2010/03/08 */
+/* Known cards as of 2010/03/10 */
 
 static SymTabRec NVKnownChipsets[] =
 {
@@ -380,8 +380,11 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE03D2, "GeForce 6100 nForce 400" },
   { 0x10DE03D5, "GeForce 6100 nForce 420" },
 
-  { 0x10DE053E, "GeForce 7025" },
-  { 0x10DE053B, "GeForce 7050" },
+  { 0x10DE0531, "GeForce 7150M / nForce 630M" },
+  { 0x10DE0533, "GeForce 7000M / nForce 610M" },
+  { 0x10DE053A, "GeForce 7050 PV / nForce 630a" },
+  { 0x10DE053B, "GeForce 7050 PV / nForce 630a" },
+  { 0x10DE053E, "GeForce 7025 / nForce 630a" },
 
 /*************** G8x ***************/
   { 0x10DE0191, "GeForce 8800 GTX" },

commit 347625b8e187c4ab696cd1dad95e49c31ced12f6
Author: Markus Strobl <markus.strobl@gmx.at>
Date:   Wed Mar 10 18:26:33 2010 -0800

    Bug #19817: Add support for GeForce 7025 and 7050.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 31fe78b..99d172f 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -380,6 +380,9 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE03D2, "GeForce 6100 nForce 400" },
   { 0x10DE03D5, "GeForce 6100 nForce 420" },
 
+  { 0x10DE053E, "GeForce 7025" },
+  { 0x10DE053B, "GeForce 7050" },
+
 /*************** G8x ***************/
   { 0x10DE0191, "GeForce 8800 GTX" },
   { 0x10DE0193, "GeForce 8800 GTS" },
@@ -817,6 +820,7 @@ NVIsSupported(CARD32 id)
     case 0x0340:
     case 0x0390:
     case 0x03D0:
+    case 0x0530:
         return TRUE;
     }
 
@@ -1741,6 +1745,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
     case 0x0290:   /* GeForce 7900 */
     case 0x0390:   /* GeForce 7600 */
     case 0x0240:   /* GeForce 6100 */
+    case 0x0530:   /* GeForce 7050, 7025 */
     case 0x03D0:
          pNv->Architecture =  NV_ARCH_40;
          break;
diff --git a/src/nv_hw.c b/src/nv_hw.c
index 83eeab2..9291912 100644
--- a/src/nv_hw.c
+++ b/src/nv_hw.c
@@ -890,7 +890,8 @@ void NVCalcStateExt (
         case NV_ARCH_30:
         default:
             if(((pNv->Chipset & 0xfff0) == 0x0240) ||
-               ((pNv->Chipset & 0xfff0) == 0x03D0))
+               ((pNv->Chipset & 0xfff0) == 0x03D0) ||
+               ((pNv->Chipset & 0xfff0) == 0x0530))
             {
                 state->arbitration0 = 128; 
                 state->arbitration1 = 0x0480; 
@@ -1226,6 +1227,7 @@ void NVLoadStateExt (
               case 0x01D0:
               case 0x0240:
               case 0x03D0:
+              case 0x0530:
                  pNv->PMC[0x1700/4] = pNv->PFB[0x020C/4];
                  pNv->PMC[0x1704/4] = 0;
                  pNv->PMC[0x1708/4] = 0;
@@ -1316,7 +1318,8 @@ void NVLoadStateExt (
                    pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0600/4) + i];
                    if(((pNv->Chipset & 0xfff0) != 0x0160) &&
                       ((pNv->Chipset & 0xfff0) != 0x0220) &&
-                      ((pNv->Chipset & 0xfff0) != 0x0240))
+                      ((pNv->Chipset & 0xfff0) != 0x0240) &&
+                      ((pNv->Chipset & 0xfff0) != 0x0530))
                    {
                       pNv->PGRAPH[(0x6900/4) + i] = pNv->PFB[(0x0600/4) + i];
                    }

commit e6b046329480a26ecebadf4314673db3f107f83e
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon Mar 8 16:49:24 2010 -0800

    Bug #24787: Don't crash if LVDS initialization fails
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>

diff --git a/src/g80_output.c b/src/g80_output.c
index 887208b..5744d94 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -481,19 +481,22 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
 
     if(pNv->lvds.present) {
         xf86OutputPtr lvds = G80CreateSor(pScrn, pNv->lvds.or, LVDS);
-        G80OutputPrivPtr pPriv = lvds->driver_private;
 
-        pPriv->scale = G80_SCALE_ASPECT;
+        if (lvds) {
+            G80OutputPrivPtr pPriv = lvds->driver_private;
 
-        if(pNv->lvds.i2cPort != -1) {
-            char i2cName[16];
+            pPriv->scale = G80_SCALE_ASPECT;
+
+            if(pNv->lvds.i2cPort != -1) {
+                char i2cName[16];
 
-            snprintf(i2cName, sizeof(i2cName), "I2C%i (LVDS)", pNv->lvds.i2cPort);
-            pPriv->i2c = G80I2CInit(pScrn, i2cName, pNv->lvds.i2cPort);
-            if(!pPriv->i2c) {
-                xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                           "Failed to initialize I2C for port %i (LVDS)!\n",
-                           pNv->lvds.i2cPort);
+                snprintf(i2cName, sizeof(i2cName), "I2C%i (LVDS)", pNv->lvds.i2cPort);
+                pPriv->i2c = G80I2CInit(pScrn, i2cName, pNv->lvds.i2cPort);
+                if(!pPriv->i2c) {
+                    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                               "Failed to initialize I2C for port %i (LVDS)!\n",
+                               pNv->lvds.i2cPort);
+                }
             }
         }
     }


Reply to: