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

xserver-xorg-video-nouveau: Changes to 'debian-experimental'



 ChangeLog                              |   74 
 Makefile.am                            |    2 
 configure.ac                           |   10 
 debian/NEWS.Debian                     |    7 
 debian/README.Debian                   |   11 
 debian/changelog                       |   16 
 debian/control                         |    7 
 debian/rules                           |    2 
 debian/xserver-xorg-video-nouveau.docs |    2 
 debian/xsfbs/xsfbs.mk                  |   22 
 src/Makefile.am                        |    8 
 src/drmmode_display.c                  |   83 
 src/nouveau_class.h                    | 9024 +++++++++++++++++++++++++++++++++
 src/nouveau_wfb.c                      |    7 
 src/nv10_exa.c                         |    2 
 src/nv30_xv_tex.c                      |   11 
 src/nv40_xv_tex.c                      |    8 
 src/nv_driver.c                        |    7 
 src/nv_proto.h                         |    2 
 19 files changed, 9273 insertions(+), 32 deletions(-)

New commits:
commit 32959c388149a5b7cf60e8f5f70f6c8a71e7d0fd
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 14:38:52 2010 +0200

    Require libdrm-dev 2.4.20-3~ for build
    
    This ensures that the package is actually built for the the 2.6.34
    ABI.

diff --git a/debian/changelog b/debian/changelog
index 8925f4a..5726491 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) UNRELEASED; urgency=
   * New upstream snapshot, with uevent support.
     - Add build-dependency on libudev-dev.
   * Build against updated librm, kernel 2.6.34 is now required.
+    - Bump build-dependency on libdrm-dev to (>= 2.4.20-3~).
   * Add a NEWS.Debian for that problem and update README.Debian.
   
  -- Sven Joachim <svenjoac@gmx.de>  Sat, 22 May 2010 10:08:55 +0200
diff --git a/debian/control b/debian/control
index bdd93d8..9b1c14c 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends:
  x11proto-randr-dev (>= 1.2),
  x11proto-render-dev,
  x11proto-xext-dev,
- libdrm-dev (>= 2.4.18-4~),
+ libdrm-dev (>= 2.4.20-3~),
  x11proto-xf86dri-dev,
  x11proto-gl-dev,
  mesa-common-dev,

commit 09652f0dbfcf3fb5ffe2f7ccfc6da4c33f9084c9
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:27:05 2010 +0200

    Add a NEWS.Debian file stating that kernel 2.6.34 is required

diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
new file mode 100644
index 0000000..5df80f4
--- /dev/null
+++ b/debian/NEWS.Debian
@@ -0,0 +1,7 @@
+xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) experimental; urgency=low
+  
+  * This version of xserver-xorg-video-nouveau is linked against a newer
+    libdrm-nouveau which breaks the ABI and is not compatible with kernels
+    <= 2.6.33.  You need to upgrade the kernel to 2.6.34-rc1 or newer.
+
+ -- Sven Joachim <svenjoac@gmx.de>  Sat, 22 May 2010 10:22:42 +0200
diff --git a/debian/changelog b/debian/changelog
index c7f907b..8925f4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,9 @@ xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) UNRELEASED; urgency=
 
   * New upstream snapshot, with uevent support.
     - Add build-dependency on libudev-dev.
-
+  * Build against updated librm, kernel 2.6.34 is now required.
+  * Add a NEWS.Debian for that problem and update README.Debian.
+  
  -- Sven Joachim <svenjoac@gmx.de>  Sat, 22 May 2010 10:08:55 +0200
 
 xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-4) unstable; urgency=medium
diff --git a/debian/xserver-xorg-video-nouveau.docs b/debian/xserver-xorg-video-nouveau.docs
new file mode 100644
index 0000000..45ce158
--- /dev/null
+++ b/debian/xserver-xorg-video-nouveau.docs
@@ -0,0 +1,2 @@
+debian/README.Debian
+debian/NEWS.Debian

commit 2af625bbecec9b3fd0c593acf5e35c0f7d8a0c06
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:18:19 2010 +0200

    README.Debian: Update required kernel versions

diff --git a/debian/README.Debian b/debian/README.Debian
index 93851d0..b03524c 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -5,11 +5,10 @@ You need a Linux kernel that contains a nouveau.ko module which works
 with the libdrm-nouveau package in Debian.  Unfortunately,
 libdrm-nouveau and the kernel module are coupled very tightly, and you
 may not be able to upgrade one without the other.  As of this writing,
-supported kernels are the Debian 2.6.32 kernel, starting with
-linux-image-2.6.32-4-$arch versions, and any 2.6.33 kernel.  Upstream
-kernels <= 2.6.32 lack the nouveau module altogether, and versions >=
-2.6.34 contain an incompatible version.  If you build your own kernel,
-you have to enable the module under Drivers -> Staging drivers.
+supported kernels are 2.6.34-rc1 and newer, earlier versions lack the
+nouveau module altogether or contain an incompatible version.  If you
+build your own kernel, you have to enable the module under Drivers ->
+Staging drivers.
 
 There's no need for any firmware at all, the Linux kernel takes care of
 that automatically.
@@ -85,4 +84,4 @@ http://nouveau.freedesktop.org/wiki/
 http://nouveau.freedesktop.org/wiki/FAQ
 http://nouveau.freedesktop.org/wiki/TroubleShooting
 
- -- Sven Joachim <svenjoac@gmx.de>, Wed, 14 Apr 2010 18:29:55 +0200
+ -- Sven Joachim <svenjoac@gmx.de>, Sat, 22 May 2010 10:16:56 +0200

commit 246715ff26e5c91c008e9e36ad1ce353b7502e29
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:13:44 2010 +0200

    Add build-dependency on libudev-dev

diff --git a/debian/changelog b/debian/changelog
index 4e41c9d..c7f907b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) UNRELEASED; urgency=low
 
-  * New upstream snapshot.
+  * New upstream snapshot, with uevent support.
+    - Add build-dependency on libudev-dev.
 
  -- Sven Joachim <svenjoac@gmx.de>  Sat, 22 May 2010 10:08:55 +0200
 
diff --git a/debian/control b/debian/control
index ff15c54..bdd93d8 100644
--- a/debian/control
+++ b/debian/control
@@ -17,6 +17,7 @@ Build-Depends:
  x11proto-xf86dri-dev,
  x11proto-gl-dev,
  mesa-common-dev,
+ libudev-dev,
  automake,
  libtool,
  xutils-dev,

commit e41053a5c1f2e0fe8ebbcf2ae7ed969b0cc39d1d
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:09:56 2010 +0200

    debian/changelog entry for new upstream snapshot

diff --git a/debian/changelog b/debian/changelog
index 6320f43..4e41c9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Sven Joachim <svenjoac@gmx.de>  Sat, 22 May 2010 10:08:55 +0200
+
 xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-4) unstable; urgency=medium
 
   * Update xsfbs and use new ${xviddriver:Depends} substvar.

commit 5e42ba341c0abf124fc513cfde8279523e3dfdd1
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:06:03 2010 +0200

    debian/rules: Update PREFIX in get-orig-source target
    
    Upstream is now at version 0.0.16.

diff --git a/debian/rules b/debian/rules
index 6be1777..d49a91e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,7 +29,7 @@ get-orig-source:
 	git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau && \
 	cd xf86-video-nouveau && git log > ChangeLog && \
 	REVISION=$$(git show --pretty=format:"%h" HEAD | head -n1) && cd .. && \
-	PREFIX=xserver-xorg-video-nouveau_0.0.15+git$$(date +%Y%m%d)+$$REVISION && \
+	PREFIX=xserver-xorg-video-nouveau_0.0.16+git$$(date +%Y%m%d)+$$REVISION && \
 	rm -rf xf86-video-nouveau/.git && \
 	tar czf $$PREFIX.orig.tar.gz xf86-video-nouveau && \
 	rm -rf xf86-video-nouveau

commit 90c51223e010a4e1516c3f574aec679d0ef8a272
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Sat May 22 10:04:14 2010 +0200

    Update ChangeLog

diff --git a/ChangeLog b/ChangeLog
index e4c9e5e..71b05d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,77 @@
+commit 4b8f1a082069a17555d4142003213cf83d4e5464
+Author: Lubomir Rintel <lkundrak@v3.sk>
+Date:   Mon May 10 09:25:55 2010 +0200
+
+    Handle startup without monitor attached more gracefully
+    
+    Refuse to configure a screen which has no valid modes. Otherwise X server
+    would crash attempting to dereference to modes list later on.
+    
+    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit ac8f8d14a82ae8ba5b41fa88903edcad67f339c2
+Author: Maarten Maathuis <madman2003@gmail.com>
+Date:   Fri May 7 20:51:43 2010 +0200
+
+    wfb: use 28 bits instead of 32 bits for multiply_factor optimisation
+    
+    - Avoiding division in a hot code path is noticable even on an otherwise idle
+    computer, but it's subject to rounding errors. If anyone knows a corner case
+    and has better ideas, don't hesitate to contact me. For the moment this should
+    make the problem less likely to trigger.
+    
+    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
+
+commit 13c10430ba8f7b0edff3ad8aae4a97672eea4a8f
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Apr 23 14:09:35 2010 +1000
+
+    Bump version number to 0.0.16
+    
+    Forgotten when the ABI broke a while back..
+
+commit 6ff8ade0c7cd835b4172257ea310a8d88f28e757
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Apr 16 16:09:51 2010 +1000
+
+    Add uevent support
+    
+    When a hotplug event is received from the kernel we should notify the
+    client side to reconfigure the display.
+    
+    Ported to nouveau from radeon driver, based on work by ajax in intel driver.
+
+commit 4063616938f76af8028491276039d422c0782b1b
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Apr 9 20:43:51 2010 +1000
+
+    Import latest nouveau_class.h from renouveau
+
+commit bfb95cc0ca600135474ff02a99889b09d41b3c80
+Author: Rico Tzschichholz <ricotz@t-online.de>
+Date:   Thu Apr 1 20:39:23 2010 +0200
+
+    Fix "make dist".
+    
+     - remove README.NV1 reference from Makefile.am
+     - add nv_rop.h to src/Makefile.am
+    
+    Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 2462b417fc550b71f021ca9736808f8f2d1cb6f0
+Author: Ben Skeggs <skeggsb@beleth.localdomain>
+Date:   Mon May 4 17:04:34 2009 +1000
+
+    xv: only use bicubic filtering when scaling >=2x
+
+commit e2146d3b29a4bea3d584c145e3190c3313692ed9
+Author: Francisco Jerez <currojerez@riseup.net>
+Date:   Thu Mar 18 14:32:54 2010 +0100
+
+    Fix for the latest nouveau_class.h.
+    
+    Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
 commit 7858345b6b384e88902ccc516715156401edec04
 Author: Ben Skeggs <bskeggs@redhat.com>
 Date:   Tue Mar 16 13:08:37 2010 +1000

commit 1fc1bc2ba17b9e5d9d572cfaf009fd21fd567a6f
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat May 15 12:04:18 2010 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 47f9dfd..6320f43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-4) UNRELEASED; urgency=low
+xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-4) unstable; urgency=medium
 
   * Update xsfbs and use new ${xviddriver:Depends} substvar.
 
- -- Julien Cristau <jcristau@debian.org>  Sat, 15 May 2010 12:00:23 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sat, 15 May 2010 12:04:08 +0200
 
 xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-3) unstable; urgency=low
 

commit d2137c9f060606a04dad88f0f015c88b93d3189f
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat May 15 12:00:48 2010 +0200

    Update xsfbs and use new ${xviddriver:Depends} substvar.

diff --git a/debian/changelog b/debian/changelog
index 1944b49..47f9dfd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-4) UNRELEASED; urgency=low
+
+  * Update xsfbs and use new ${xviddriver:Depends} substvar.
+
+ -- Julien Cristau <jcristau@debian.org>  Sat, 15 May 2010 12:00:23 +0200
+
 xserver-xorg-video-nouveau (1:0.0.15+git20100329+7858345-3) unstable; urgency=low
 
   [ Sven Joachim ]
diff --git a/debian/control b/debian/control
index a86ee44..ff15c54 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Chris Lamb <lamby@debian.org>, Matthew Johnson <mjj29@debian.org>, Cy
 Build-Depends:
  debhelper (>= 7),
  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,
@@ -31,7 +31,7 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- ${xserver:Depends},
+ ${xviddriver:Depends},
 Provides: ${xviddriver:Provides}
 Description: X.Org X server -- Nouveau display driver (experimental)
  This driver for the X.Org X server (see xserver-xorg for a further description)

commit 4b8f1a082069a17555d4142003213cf83d4e5464
Author: Lubomir Rintel <lkundrak@v3.sk>
Date:   Mon May 10 09:25:55 2010 +0200

    Handle startup without monitor attached more gracefully
    
    Refuse to configure a screen which has no valid modes. Otherwise X server
    would crash attempting to dereference to modes list later on.
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 795859f..f60b6d9 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -794,6 +794,10 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 						     pScrn->depth);
 	}
 
+	/* No usable mode */
+	if (!pScrn->modes)
+		return FALSE;
+
 	/* Set the current mode to the first in the list */
 	pScrn->currentMode = pScrn->modes;
 

commit ac8f8d14a82ae8ba5b41fa88903edcad67f339c2
Author: Maarten Maathuis <madman2003@gmail.com>
Date:   Fri May 7 20:51:43 2010 +0200

    wfb: use 28 bits instead of 32 bits for multiply_factor optimisation
    
    - Avoiding division in a hot code path is noticable even on an otherwise idle
    computer, but it's subject to rounding errors. If anyone knows a corner case
    and has better ideas, don't hesitate to contact me. For the moment this should
    make the problem less likely to trigger.
    
    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>

diff --git a/src/nouveau_wfb.c b/src/nouveau_wfb.c
index adee492..7575672 100644
--- a/src/nouveau_wfb.c
+++ b/src/nouveau_wfb.c
@@ -79,7 +79,7 @@ nouveau_wfb_rd_tiled(const void *ptr, int size) {
 
 	offset -= wfb->base;
 
-	y = (offset * wfb->multiply_factor) >> 32;
+	y = (offset * wfb->multiply_factor) >> 36;
 	x = offset - y * wfb->pitch;
 
 	offset  = (x >> TP) + ((y >> TH) * wfb->horiz_tiles);
@@ -111,7 +111,7 @@ nouveau_wfb_wr_tiled(void *ptr, FbBits value, int size) {
 
 	offset -= wfb->base;
 
-	y = (offset * wfb->multiply_factor) >> 32;
+	y = (offset * wfb->multiply_factor) >> 36;
 	x = offset - y * wfb->pitch;
 
 	offset  = (x >> TP) + ((y >> TH) * wfb->horiz_tiles);
@@ -175,7 +175,8 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite,
 		wfb->pitch = 0;
 	} else {
 		wfb->pitch = ppix->devKind;
-		wfb->multiply_factor = (0xFFFFFFFF / wfb->pitch) + 1;
+		/* 8192x8192x4 is 28 bits max, 64 - 28 == 36. */
+		wfb->multiply_factor = (((1ULL << 36) - 1) / wfb->pitch) + 1;
 		wfb->tile_height = bo->tile_mode + 2;
 		wfb->horiz_tiles = wfb->pitch / 64;
 		have_tiled = 1;

commit 81fc271788605b52e85c2d11635a0371fb44605e
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun May 2 02:14:45 2010 +0200

    Add xorg-driver-{video,input} to Provides.

diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
index 77c4a39..3c59c20 100755
--- a/debian/xsfbs/xsfbs.mk
+++ b/debian/xsfbs/xsfbs.mk
@@ -261,8 +261,8 @@ 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)
-VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
-INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
+VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI), xorg-driver-video
+INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI), xorg-driver-input
 
 ifeq ($(PACKAGE),)
 PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)

commit 13c10430ba8f7b0edff3ad8aae4a97672eea4a8f
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Apr 23 14:09:35 2010 +1000

    Bump version number to 0.0.16
    
    Forgotten when the ABI broke a while back..

diff --git a/configure.ac b/configure.ac
index 66a7d78..1c39923 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nouveau],
-        0.0.15,
+        0.0.16,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nouveau)
 

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 6ff8ade0c7cd835b4172257ea310a8d88f28e757
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Apr 16 16:09:51 2010 +1000

    Add uevent support
    
    When a hotplug event is received from the kernel we should notify the
    client side to reconfigure the display.
    
    Ported to nouveau from radeon driver, based on work by ajax in intel driver.

diff --git a/configure.ac b/configure.ac
index f5df8ad..66a7d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,14 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 # Checks for libraries.
 PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10])
 
+PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no])
+if test "x$LIBUDEV" = xyes; then
+	AC_DEFINE(HAVE_LIBUDEV, 1, [libudev support])
+fi
+AM_CONDITIONAL(LIBUDEV, [ test "x$LIBUDEV" = "xyes" ] )
+AC_SUBST([LIBUDEV_CFLAGS])
+AC_SUBST([LIBUDEV_LIBS])
+
 # Checks for header files.
 AC_HEADER_STDC
 
diff --git a/src/Makefile.am b/src/Makefile.am
index b5d287e..9340c45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,9 +23,10 @@
 # -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 = @XORG_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@
 nouveau_drv_la_LTLIBRARIES = nouveau_drv.la
-nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@
+nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@ \
+			 @LIBUDEV_LIBS@
 nouveau_drv_ladir = @moduledir@/drivers
 
 nouveau_drv_la_SOURCES = \
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index df881da..7867ddb 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -38,12 +38,19 @@
 #include "X11/Xatom.h"
 
 #include <sys/ioctl.h>
+#ifdef HAVE_LIBUDEV
+#include "libudev.h"
+#endif
 
 typedef struct {
     int fd;
     uint32_t fb_id;
     drmModeResPtr mode_res;
     int cpp;
+#ifdef HAVE_LIBUDEV
+    struct udev_monitor *uevent_monitor;
+    InputHandlerProc uevent_handler;
+#endif
 } drmmode_rec, *drmmode_ptr;
 
 typedef struct {
@@ -1169,3 +1176,79 @@ drmmode_cursor_init(ScreenPtr pScreen)
 	return xf86_cursors_init(pScreen, size, size, flags);
 }
 
+#ifdef HAVE_LIBUDEV
+static drmmode_ptr
+drmmode_from_scrn(ScrnInfoPtr scrn)
+{
+	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+	drmmode_crtc_private_ptr drmmode_crtc;
+
+	drmmode_crtc = xf86_config->crtc[0]->driver_private;
+	return drmmode_crtc->drmmode;
+}
+
+static void
+drmmode_handle_uevents(int fd, void *closure)
+{
+	ScrnInfoPtr scrn = closure;
+	drmmode_ptr drmmode = drmmode_from_scrn(scrn);
+	struct udev_device *dev;
+
+	dev = udev_monitor_receive_device(drmmode->uevent_monitor);
+	if (!dev)
+		return;
+
+	RRGetInfo(screenInfo.screens[scrn->scrnIndex], TRUE);
+	udev_device_unref(dev);
+}
+#endif
+
+void
+drmmode_uevent_init(ScrnInfoPtr scrn)
+{
+#ifdef HAVE_LIBUDEV
+	drmmode_ptr drmmode = drmmode_from_scrn(scrn);
+	struct udev *u;
+	struct udev_monitor *mon;
+
+	u = udev_new();
+	if (!u)
+		return;
+	mon = udev_monitor_new_from_netlink(u, "udev");
+	if (!mon) {
+		udev_unref(u);
+		return;
+	}
+
+	if (udev_monitor_filter_add_match_subsystem_devtype(mon,
+							    "drm",
+							    "drm_minor") < 0 ||
+	    udev_monitor_enable_receiving(mon) < 0) {
+		udev_monitor_unref(mon);
+		udev_unref(u);
+		return;
+	}
+
+	drmmode->uevent_handler =
+		xf86AddGeneralHandler(udev_monitor_get_fd(mon),
+				      drmmode_handle_uevents, scrn);
+
+	drmmode->uevent_monitor = mon;
+#endif
+}
+
+void
+drmmode_uevent_fini(ScrnInfoPtr scrn)
+{
+#ifdef HAVE_LIBUDEV
+	drmmode_ptr drmmode = drmmode_from_scrn(scrn);
+
+	if (drmmode->uevent_handler) {
+		struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor);
+		xf86RemoveGeneralHandler(drmmode->uevent_handler);
+
+		udev_monitor_unref(drmmode->uevent_monitor);
+		udev_unref(u);
+	}
+#endif
+}
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 4b00e3d..795859f 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -411,6 +411,8 @@ NVCloseScreen(int scrnIndex, ScreenPtr pScreen)
 	ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
 	NVPtr pNv = NVPTR(pScrn);
 
+	drmmode_uevent_fini(pScrn);
+
 	nouveau_dri2_fini(pScreen);
 
 	if (pScrn->vtSema) {
@@ -1167,6 +1169,7 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	if (serverGeneration == 1)
 		xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
 
+	drmmode_uevent_init(pScrn);
 	return TRUE;
 }
 
diff --git a/src/nv_proto.h b/src/nv_proto.h
index 9534f4e..d6791ef 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -7,6 +7,8 @@ void drmmode_adjust_frame(ScrnInfoPtr pScrn, int x, int y, int flags);
 void drmmode_remove_fb(ScrnInfoPtr pScrn);
 Bool drmmode_cursor_init(ScreenPtr pScreen);
 void drmmode_fbcon_copy(ScreenPtr pScreen);
+void drmmode_uevent_init(ScrnInfoPtr);
+void drmmode_uevent_fini(ScrnInfoPtr);
 
 /* in nv_accel_common.c */
 Bool NVAccelCommonInit(ScrnInfoPtr pScrn);

commit 4063616938f76af8028491276039d422c0782b1b
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Apr 9 20:43:51 2010 +1000

    Import latest nouveau_class.h from renouveau

diff --git a/src/Makefile.am b/src/Makefile.am
index f3c2c96..b5d287e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,7 @@ nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@
 nouveau_drv_ladir = @moduledir@/drivers
 
 nouveau_drv_la_SOURCES = \
-			 nouveau_local.h \
+			 nouveau_class.h nouveau_local.h \
 			 nouveau_exa.c nouveau_xv.c nouveau_dri2.c \
 			 nouveau_wfb.c \
 			 nv_accel_common.c \
diff --git a/src/nouveau_class.h b/src/nouveau_class.h
new file mode 100644
index 0000000..a701b9d
--- /dev/null
+++ b/src/nouveau_class.h
@@ -0,0 +1,9024 @@
+/*************************************************************************
+
+   Autogenerated file, do not edit !
+
+   This file was generated by renouveau-gen from renouveau.xml, the
+   XML database of nvidia objects and methods. renouveau-gen and
+   renouveau.xml can be found in CVS module renouveau of sourceforge.net
+   project nouveau:
+
+cvs -z3 -d:pserver:anonymous@nouveau.cvs.sourceforge.net:/cvsroot/nouveau co -P renouveau
+
+**************************************************************************
+
+   Copyright (C) 2006-2008 :
+   Dmitry Baryshkov,
+   Laurent Carlier,
+   Matthieu Castet,
+   Dawid Gajownik,
+   Jeremy Kolb,
+   Stephane Loeuillet,
+   Patrice Mandin,
+   Stephane Marchesin,
+   Serge Martin,
+   Sylvain Munaut,
+   Simon Raffeiner,
+   Ben Skeggs,
+   Erik Waling,
+   koala_br,
+
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*************************************************************************/
+
+
+#ifndef NOUVEAU_REG_H
+#define NOUVEAU_REG_H 1
+
+
+#define NV01_ROOT									0x00000001
+
+
+
+#define NV01_CONTEXT_DMA								0x00000002
+
+
+
+#define NV01_DEVICE									0x00000003
+
+
+
+#define NV01_TIMER									0x00000004
+
+#define  NV01_TIMER_SYNCHRONIZE								0x00000100
+#define  NV01_TIMER_STOP_ALARM								0x00000104
+#define  NV01_TIMER_DMA_NOTIFY								0x00000180
+#define  NV01_TIMER_TIME(x)								(0x00000300+((x)*4))
+#define  NV01_TIMER_TIME__SIZE								0x00000002
+#define  NV01_TIMER_ALARM_NOTIFY							0x00000308
+
+
+#define NV01_CONTEXT_BETA1								0x00000012
+
+#define  NV01_CONTEXT_BETA1_NOP								0x00000100
+#define  NV01_CONTEXT_BETA1_NOTIFY							0x00000104
+#define  NV01_CONTEXT_BETA1_DMA_NOTIFY							0x00000180
+#define  NV01_CONTEXT_BETA1_BETA_1D31							0x00000300
+
+
+#define NV01_CONTEXT_COLOR_KEY								0x00000017
+
+#define  NV01_CONTEXT_COLOR_KEY_NOP							0x00000100
+#define  NV01_CONTEXT_COLOR_KEY_NOTIFY							0x00000104
+#define  NV01_CONTEXT_COLOR_KEY_DMA_NOTIFY						0x00000180
+#define  NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT						0x00000300
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16A8Y8					0x00000001
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X24Y8					0x00000002
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16A1R5G5B5				0x00000003
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X17R5G5B5					0x00000004
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A8R8G8B8					0x00000005
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X8R8G8B8					0x00000006
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A16Y16					0x00000007
+#define   NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16Y16					0x00000008
+#define  NV01_CONTEXT_COLOR_KEY_COLOR							0x00000304
+
+
+#define NV04_CONTEXT_COLOR_KEY								0x00000057
+
+
+
+#define NV01_CONTEXT_PATTERN								0x00000018
+
+#define  NV01_CONTEXT_PATTERN_NOP							0x00000100
+#define  NV01_CONTEXT_PATTERN_NOTIFY							0x00000104
+#define  NV01_CONTEXT_PATTERN_DMA_NOTIFY						0x00000180
+#define  NV01_CONTEXT_PATTERN_COLOR_FORMAT						0x00000300
+#define  NV01_CONTEXT_PATTERN_MONOCHROME_FORMAT						0x00000304
+#define  NV01_CONTEXT_PATTERN_SHAPE							0x00000308
+#define  NV01_CONTEXT_PATTERN_COLOR(x)							(0x00000310+((x)*4))
+#define  NV01_CONTEXT_PATTERN_COLOR__SIZE						0x00000002
+#define  NV01_CONTEXT_PATTERN_PATTERN(x)						(0x00000318+((x)*4))
+#define  NV01_CONTEXT_PATTERN_PATTERN__SIZE						0x00000002
+
+
+#define NV01_CONTEXT_CLIP_RECTANGLE							0x00000019
+
+#define  NV01_CONTEXT_CLIP_RECTANGLE_NOP						0x00000100
+#define  NV01_CONTEXT_CLIP_RECTANGLE_NOTIFY						0x00000104
+#define  NV01_CONTEXT_CLIP_RECTANGLE_DMA_NOTIFY						0x00000180
+#define  NV01_CONTEXT_CLIP_RECTANGLE_POINT						0x00000300
+#define   NV01_CONTEXT_CLIP_RECTANGLE_POINT_X_SHIFT					0
+#define   NV01_CONTEXT_CLIP_RECTANGLE_POINT_X_MASK					0x0000ffff
+#define   NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y_SHIFT					16
+#define   NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y_MASK					0xffff0000
+#define  NV01_CONTEXT_CLIP_RECTANGLE_SIZE						0x00000304
+#define   NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W_SHIFT					0
+#define   NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W_MASK					0x0000ffff
+#define   NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H_SHIFT					16
+#define   NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H_MASK					0xffff0000
+
+
+#define NV01_RENDER_SOLID_LINE								0x0000001c
+
+#define  NV01_RENDER_SOLID_LINE_NOP							0x00000100
+#define  NV01_RENDER_SOLID_LINE_NOTIFY							0x00000104
+#define  NV01_RENDER_SOLID_LINE_PATCH							0x0000010c
+#define  NV01_RENDER_SOLID_LINE_DMA_NOTIFY						0x00000180
+#define  NV01_RENDER_SOLID_LINE_CLIP_RECTANGLE						0x00000184
+#define  NV01_RENDER_SOLID_LINE_PATTERN							0x00000188
+#define  NV01_RENDER_SOLID_LINE_ROP							0x0000018c
+#define  NV01_RENDER_SOLID_LINE_BETA1							0x00000190
+#define  NV01_RENDER_SOLID_LINE_SURFACE							0x00000194
+#define  NV01_RENDER_SOLID_LINE_OPERATION						0x000002fc
+#define   NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_AND					0x00000000
+#define   NV01_RENDER_SOLID_LINE_OPERATION_ROP_AND					0x00000001
+#define   NV01_RENDER_SOLID_LINE_OPERATION_BLEND_AND					0x00000002
+#define   NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY					0x00000003
+#define   NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_PREMULT				0x00000004
+#define   NV01_RENDER_SOLID_LINE_OPERATION_BLEND_PREMULT				0x00000005
+#define  NV01_RENDER_SOLID_LINE_COLOR_FORMAT						0x00000300
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16A8Y8					0x00000001
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X24Y8					0x00000002
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16A1R5G5B5				0x00000003
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X17R5G5B5					0x00000004
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A8R8G8B8					0x00000005
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X8R8G8B8					0x00000006
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A16Y16					0x00000007
+#define   NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16Y16					0x00000008
+#define  NV01_RENDER_SOLID_LINE_COLOR							0x00000304
+#define  NV01_RENDER_SOLID_LINE_LINE_POINT0(x)						(0x00000400+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_LINE_POINT0__SIZE					0x00000010
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT0_X_SHIFT					0
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT0_X_MASK					0x0000ffff
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT0_Y_SHIFT					16
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT0_Y_MASK					0xffff0000
+#define  NV01_RENDER_SOLID_LINE_LINE_POINT1(x)						(0x00000404+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_LINE_POINT1__SIZE					0x00000010
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT1_X_SHIFT					0
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT1_X_MASK					0x0000ffff
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT1_Y_SHIFT					16
+#define   NV01_RENDER_SOLID_LINE_LINE_POINT1_Y_MASK					0xffff0000
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT0_X(x)					(0x00000480+((x)*16))
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT0_X__SIZE					0x00000010
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y(x)					(0x00000484+((x)*16))
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y__SIZE					0x00000010
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT1_X(x)					(0x00000488+((x)*16))
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT1_X__SIZE					0x00000010
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y(x)					(0x0000048c+((x)*16))
+#define  NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y__SIZE					0x00000010
+#define  NV01_RENDER_SOLID_LINE_POLYLINE(x)						(0x00000500+((x)*4))
+#define  NV01_RENDER_SOLID_LINE_POLYLINE__SIZE						0x00000020
+#define   NV01_RENDER_SOLID_LINE_POLYLINE_X_SHIFT					0
+#define   NV01_RENDER_SOLID_LINE_POLYLINE_X_MASK					0x0000ffff
+#define   NV01_RENDER_SOLID_LINE_POLYLINE_Y_SHIFT					16
+#define   NV01_RENDER_SOLID_LINE_POLYLINE_Y_MASK					0xffff0000
+#define  NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X(x)					(0x00000580+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X__SIZE				0x00000010
+#define  NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y(x)					(0x00000584+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y__SIZE				0x00000010
+#define  NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR(x)					(0x00000600+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR__SIZE					0x00000010
+#define  NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT(x)					(0x00000604+((x)*8))
+#define  NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT__SIZE					0x00000010
+#define   NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X_SHIFT				0
+#define   NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X_MASK					0x0000ffff
+#define   NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y_SHIFT				16
+#define   NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y_MASK					0xffff0000
+
+
+#define NV04_RENDER_SOLID_LINE								0x0000005c
+
+#define  NV04_RENDER_SOLID_LINE_BETA4							0x00000194
+#define  NV04_RENDER_SOLID_LINE_SURFACE							0x00000198
+
+
+#define NV01_RENDER_SOLID_TRIANGLE							0x0000001d
+
+#define  NV01_RENDER_SOLID_TRIANGLE_NOP							0x00000100
+#define  NV01_RENDER_SOLID_TRIANGLE_NOTIFY						0x00000104
+#define  NV01_RENDER_SOLID_TRIANGLE_PATCH						0x0000010c
+#define  NV01_RENDER_SOLID_TRIANGLE_DMA_NOTIFY						0x00000180
+#define  NV01_RENDER_SOLID_TRIANGLE_CLIP_RECTANGLE					0x00000184
+#define  NV01_RENDER_SOLID_TRIANGLE_PATTERN						0x00000188
+#define  NV01_RENDER_SOLID_TRIANGLE_ROP							0x0000018c
+#define  NV01_RENDER_SOLID_TRIANGLE_BETA1						0x00000190
+#define  NV01_RENDER_SOLID_TRIANGLE_SURFACE						0x00000194
+#define  NV01_RENDER_SOLID_TRIANGLE_OPERATION						0x000002fc
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_AND				0x00000000
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_ROP_AND					0x00000001
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_AND				0x00000002
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY					0x00000003
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_PREMULT				0x00000004
+#define   NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_PREMULT				0x00000005
+#define  NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT					0x00000300
+#define  NV01_RENDER_SOLID_TRIANGLE_COLOR						0x00000304
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0					0x00000310
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X_SHIFT				0
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X_MASK				0x0000ffff
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y_SHIFT				16
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y_MASK				0xffff0000
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1					0x00000314
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X_SHIFT				0
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X_MASK				0x0000ffff
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y_SHIFT				16
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y_MASK				0xffff0000
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2					0x00000318
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X_SHIFT				0
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X_MASK				0x0000ffff
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y_SHIFT				16
+#define   NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y_MASK				0xffff0000
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_X					0x00000320
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_Y					0x00000324
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_X					0x00000328
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_Y					0x0000032c
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_X					0x00000330
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_Y					0x00000334
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIMESH(x)						(0x00000400+((x)*4))
+#define  NV01_RENDER_SOLID_TRIANGLE_TRIMESH__SIZE					0x00000020


Reply to: