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

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



 ChangeLog                                     |  121 ++
 debian/changelog                              |   15 
 debian/control                                |    4 
 debian/patches/03_work-around-exa-hangs.patch |   33 
 debian/patches/series                         |    1 
 src/drmmode_display.c                         |   20 
 src/nouveau_class.h                           | 1169 ++++++++++++++++++++++++--
 src/nouveau_dri2.c                            |   12 
 src/nouveau_exa.c                             |   49 -
 src/nouveau_xv.c                              |   21 
 src/nv04_exa.c                                |    4 
 src/nv30_exa.c                                |    2 
 src/nv40_exa.c                                |    2 
 src/nv50_accel.c                              |    8 
 src/nv50_exa.c                                |   22 
 src/nv50_xv.c                                 |   20 
 src/nv_driver.c                               |   42 
 src/nv_type.h                                 |    1 
 18 files changed, 1362 insertions(+), 184 deletions(-)

New commits:
commit dc851af294bfc477c40cda0c0c5cc5fa0404e820
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Aug 25 18:47:03 2010 +0200

    Upgrade Standards-Version to 3.9.1

diff --git a/debian/changelog b/debian/changelog
index 5bd50d3..cbf08e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) UNRELEASED; urgency=
   * New upstream snapshot.
   * Bump build-dependency on libdrm-dev to (>= 2.4.21-2~) to ensure that
     we keep building against the experimental libdrm.
+  * Bump Standards-Version to 3.9.1, no changes needed.
 
   [ Christopher James Halse Rogers ]
   * debian/patches/03_work-around-exa-hangs.patch:
diff --git a/debian/control b/debian/control
index 4dbf4cf..a488d3c 100644
--- a/debian/control
+++ b/debian/control
@@ -23,7 +23,7 @@ Build-Depends:
  libtool,
  xutils-dev,
  quilt,
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Homepage: http://nouveau.freedesktop.org/wiki/
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-nouveau
 Vcs-Browser: http://git.debian.org/?=pkg-xorg/driver/xserver-xorg-video-nouveau.git

commit cea431112585531b5a4e4c588a1b360edddc4d29
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Aug 25 18:41:17 2010 +0200

    Bump libdrm-dev build-dependency to 2.4.21.2~
    
    Since libdrm 2.4.21 unexpectedly landed in sid, this is necessary to
    ensure that we build and are used with the updated libdrm-nouveau1.

diff --git a/debian/changelog b/debian/changelog
index a5e76de..5bd50d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) UNRELEASED; urgency=
 
   [ Sven Joachim ]
   * New upstream snapshot.
+  * Bump build-dependency on libdrm-dev to (>= 2.4.21-2~) to ensure that
+    we keep building against the experimental libdrm.
 
   [ Christopher James Halse Rogers ]
   * debian/patches/03_work-around-exa-hangs.patch:
diff --git a/debian/control b/debian/control
index c89be29..4dbf4cf 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends:
  x11proto-randr-dev (>= 1.2),
  x11proto-render-dev,
  x11proto-xext-dev,
- libdrm-dev (>= 2.4.20-3~),
+ libdrm-dev (>= 2.4.21-2~),
  x11proto-xf86dri-dev,
  x11proto-gl-dev,
  mesa-common-dev,

commit abd151c99620bb4264881209b426c65bd1ae522e
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Aug 25 13:32:55 2010 +0200

    New patch 03_work-around-exa-hangs.patch
    
    Restore a workaround for exa hangs.  The fix in the kernel is in
    Linus' tree since 2.6.36-rc1, but not in 2.6.35.  Patch stolen from
    the ubuntu branch.

diff --git a/debian/changelog b/debian/changelog
index 20f9551..a5e76de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,13 @@
 xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) UNRELEASED; urgency=low
 
+  [ Sven Joachim ]
   * New upstream snapshot.
 
+  [ Christopher James Halse Rogers ]
+  * debian/patches/03_work-around-exa-hangs.patch:
+    - Revert a commit which removes a work-around for EXA hangs; we do not yet
+      have the associated kernel commit in our tree.
+
  -- Sven Joachim <svenjoac@gmx.de>  Wed, 25 Aug 2010 13:20:39 +0200
 
 xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) experimental; urgency=low
diff --git a/debian/patches/03_work-around-exa-hangs.patch b/debian/patches/03_work-around-exa-hangs.patch
new file mode 100644
index 0000000..0c5e7fd
--- /dev/null
+++ b/debian/patches/03_work-around-exa-hangs.patch
@@ -0,0 +1,33 @@
+Description: Re-add exa hang workaround.
+ .
+ This reverts commit 321eb2df5c8b1da4d6469037dd1d8888b508fabd:
+ .
+    Revert "nv04-nv40/exa: Match the blob behavior more closely on PrepareCopy."
+ .
+    This reverts commit 9de0d97bd2fc2ee8800d48b5340a3d495525ad3e. Unnecessary
+    after kernel commit "drm/nouveau: Ack the context switch interrupt before
+    switching contexts.".
+ .
+ We do not yet have the named commit in our kernel tree.
+
+
+Index: xserver-xorg-video-nouveau/src/nv04_exa.c
+===================================================================
+--- xserver-xorg-video-nouveau.orig/src/nv04_exa.c	2010-08-05 15:03:35.247880586 +1000
++++ xserver-xorg-video-nouveau/src/nv04_exa.c	2010-08-05 15:04:17.969451030 +1000
+@@ -207,11 +207,15 @@
+ 			return FALSE;
+ 		}
+ 
++		BEGIN_RING(chan, blit, NV04_IMAGE_BLIT_SURFACE, 1);
++		OUT_RING  (chan, pNv->NvContextSurfaces->handle);
+ 		BEGIN_RING(chan, blit, NV01_IMAGE_BLIT_OPERATION, 1);
+ 		OUT_RING  (chan, 1); /* ROP_AND */
+ 
+ 		NV04EXASetROP(pScrn, alu, planemask);
+ 	} else {
++		BEGIN_RING(chan, blit, NV04_IMAGE_BLIT_SURFACE, 1);
++		OUT_RING  (chan, pNv->NvContextSurfaces->handle);
+ 		BEGIN_RING(chan, blit, NV01_IMAGE_BLIT_OPERATION, 1);
+ 		OUT_RING  (chan, 3); /* SRCCOPY */
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index d6892cf..cc5a97a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-set-NV_DRIVER_DATE-from-ChangeLog.diff
+03_work-around-exa-hangs.patch

commit 8cdeaffbce89c2ef99c2ffb28d41fab4359a556e
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Aug 25 13:21:00 2010 +0200

    debian/changelog entry for new upstream snapshot

diff --git a/debian/changelog b/debian/changelog
index aceb0bb..20f9551 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Sven Joachim <svenjoac@gmx.de>  Wed, 25 Aug 2010 13:20:39 +0200
+
 xserver-xorg-video-nouveau (1:0.0.16+git20100518+4b8f1a0-1) experimental; urgency=low
 
   [ Sven Joachim ]

commit ba76db30d996fbed341ab716186fa637492dfc13
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Aug 25 12:37:21 2010 +0200

    Update ChangeLog

diff --git a/ChangeLog b/ChangeLog
index 71b05d6..acb23dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,124 @@
+commit 390f1c86d9583f4ceabd407ee47410073c2a1b55
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Aug 20 09:48:32 2010 +1000
+
+    nv50/xv: support UYVY
+    
+    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 00d390952c912d4e9fc2c962caaeb90bf563d5b1
+Author: Maarten Maathuis <madman2003@gmail.com>
+Date:   Fri Aug 13 22:24:26 2010 +0200
+
+    nv50/xv: Fix the uncommon codepath to use width/height variable.
+    
+    - The common codepath should be the correct one, because that is
+      triggered often, while the other is rare.
+    - This isn't neccesarily a problem, but let's be on the safe side.
+    
+    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
+
+commit f5b486dd237679aec1987985f9ecffc6a4fd3105
+Author: Maarten Maathuis <madman2003@gmail.com>
+Date:   Fri Aug 13 22:16:51 2010 +0200
+
+    nv50/xv: We have 18 relocs, not 16, adjust MARK_RING.
+    
+    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
+
+commit 1cb6c91a9afe88d73f8a1180b00f56a9150a16ed
+Author: Roy Spliet <r.spliet@student.tudelft.nl>
+Date:   Sat Aug 7 20:59:06 2010 +0200
+
+    nouveau_exa.c: move line_count logic out of UTS/DFS loop
+    
+    Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
+    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
+
+commit 9f50b62229d5984ee5c16bc54953c7f8e2d5e575
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Aug 6 08:28:34 2010 +1000
+
+    nvc0: recognise these chipsets, and allow NoAccel mode on them
+    
+    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit b96170a4e51c1d3167601210ca31e98283c02885
+Author: Francisco Jerez <currojerez@riseup.net>
+Date:   Thu Aug 5 00:40:40 2010 +0200
+
+    nv10/exa: Bump maxX/maxY to 4096/4096.
+    
+    This way we can do accelerated 2D on larger pixmaps, it will still
+    fall back to software when we hit the 2048x2048 texturing limit in a
+    composite operation.
+
+commit 321eb2df5c8b1da4d6469037dd1d8888b508fabd
+Author: Francisco Jerez <currojerez@riseup.net>
+Date:   Wed Aug 4 13:11:24 2010 +0200
+
+    Revert "nv04-nv40/exa: Match the blob behavior more closely on PrepareCopy."
+    
+    This reverts commit 9de0d97bd2fc2ee8800d48b5340a3d495525ad3e. Unnecessary
+    after kernel commit "drm/nouveau: Ack the context switch interrupt before
+    switching contexts.".
+
+commit db98ad23633958e52f84501c5a2061d42d346b64
+Author: Francisco Jerez <currojerez@riseup.net>
+Date:   Tue Jun 15 15:32:36 2010 +0200
+
+    dri2: Fix for the last DRI2InfoRec ABI.
+    
+    Just pre-fill the whole structure with zeros to avoid future
+    segfaults.
+
+commit 9a3d0ab43f6335ab6cd48be4aa2f4f728386b386
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Fri Jun 11 21:58:38 2010 +1000
+
+    call NVEnterVT from CreateScreenResources
+    
+    We need to grab DRM master here for things to work, so we may as well call
+    NVEnterVT as we used to in NVScreenInit up until the previous commit.
+    
+    Fixes server regeneration.
+
+commit 964eeac6dc2209da6aa8861aa8b0bc028700ab3d
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Thu Jun 10 09:38:19 2010 +1000
+
+    fix for server 1.9
+
+commit c079408e287ad09e954fa3985f95912c02cf06bc
+Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
+Date:   Thu Jun 10 01:07:49 2010 +0200
+
+    nv50/accel: fix perspective interps in YUV to RGB shader
+
+commit 65153490f7d74d45a92adbd9c5e2bbe11c884b00
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Wed Jun 9 16:12:28 2010 +1000
+
+    use libc directly for [cm]alloc/free
+
+commit 2958cf464dca9761f0fa21c8dd2d8fa8c8a96791
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Thu May 27 10:06:47 2010 +1000
+
+    nv50/exa: rip out compat defines, we depend on 1.7 anyway
+
+commit af40bf0af47ebcb7de2dc418429f0b56f8c04d15
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Wed May 26 16:11:01 2010 +1000
+
+    nv50/exa: new nouveau_class.h has correct blend func defines
+
+commit 8950c5b2a0d318e2568bec38a39d744b968c9b85
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Wed May 26 16:09:48 2010 +1000
+
+    update nouveau_class.h
+
 commit 4b8f1a082069a17555d4142003213cf83d4e5464
 Author: Lubomir Rintel <lkundrak@v3.sk>
 Date:   Mon May 10 09:25:55 2010 +0200

commit 390f1c86d9583f4ceabd407ee47410073c2a1b55
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Aug 20 09:48:32 2010 +1000

    nv50/xv: support UYVY
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index 4437aa6..b531f10 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1983,7 +1983,8 @@ NV50TexturedImages[] =
 {
 	XVIMAGE_YV12,
 	XVIMAGE_I420,
-	XVIMAGE_YUY2
+	XVIMAGE_YUY2,
+	XVIMAGE_UYVY
 };
 
 static XF86VideoAdaptorPtr
diff --git a/src/nv50_xv.c b/src/nv50_xv.c
index 2e0f080..b9349a2 100644
--- a/src/nv50_xv.c
+++ b/src/nv50_xv.c
@@ -147,11 +147,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src,
 	OUT_RING  (chan, 0x03000000);
 	OUT_RING  (chan, 0x00000000);
 	} else {
+	if (id == FOURCC_UYVY) {
+	OUT_RING  (chan, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM |
+			 NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM |
+			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
+			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
+			 NV50TIC_0_0_FMT_8_8);
+	} else {
 	OUT_RING  (chan, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM |
 			 NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM |
 			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
 			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
 			 NV50TIC_0_0_FMT_8_8);
+	}
 	if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) ||
 	    OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
 		       NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) {
@@ -163,11 +171,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src,
 	OUT_RING  (chan, (1 << NV50TIC_0_5_DEPTH_SHIFT) | src_h);
 	OUT_RING  (chan, 0x03000000);
 	OUT_RING  (chan, 0x00000000);
+	if (id == FOURCC_UYVY) {
+	OUT_RING  (chan, NV50TIC_0_0_MAPA_C2 | NV50TIC_0_0_TYPEA_UNORM |
+			 NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM |
+			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
+			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
+			 NV50TIC_0_0_FMT_8_8_8_8);
+	} else {
 	OUT_RING  (chan, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM |
 			 NV50TIC_0_0_MAPB_C1 | NV50TIC_0_0_TYPEB_UNORM |
 			 NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM |
 			 NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM |
 			 NV50TIC_0_0_FMT_8_8_8_8);
+	}
 	if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) ||
 	    OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD |
 		       NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) {

commit 00d390952c912d4e9fc2c962caaeb90bf563d5b1
Author: Maarten Maathuis <madman2003@gmail.com>
Date:   Fri Aug 13 22:24:26 2010 +0200

    nv50/xv: Fix the uncommon codepath to use width/height variable.
    
    - The common codepath should be the correct one, because that is
      triggered often, while the other is rare.
    - This isn't neccesarily a problem, but let's be on the safe side.
    
    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>

diff --git a/src/nv50_xv.c b/src/nv50_xv.c
index 9be8156..2e0f080 100644
--- a/src/nv50_xv.c
+++ b/src/nv50_xv.c
@@ -331,7 +331,7 @@ nv50_xv_image_put(ScrnInfoPtr pScrn,
 
 		if (AVAIL_RING(chan) < 64) {
 			if (!nv50_xv_state_emit(ppix, id, src, packed_y, uv,
-						src_w, src_h))
+						width, height))
 				return BadAlloc;
 		}
 

commit f5b486dd237679aec1987985f9ecffc6a4fd3105
Author: Maarten Maathuis <madman2003@gmail.com>
Date:   Fri Aug 13 22:16:51 2010 +0200

    nv50/xv: We have 18 relocs, not 16, adjust MARK_RING.
    
    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>

diff --git a/src/nv50_xv.c b/src/nv50_xv.c
index 255fa51..9be8156 100644
--- a/src/nv50_xv.c
+++ b/src/nv50_xv.c
@@ -70,7 +70,7 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src,
 	const unsigned tcb_flags = NOUVEAU_BO_RDWR | NOUVEAU_BO_VRAM;
 	uint32_t mode = 0xd0005000 | (src->tile_mode << 22);
 
-	if (MARK_RING(chan, 256, 16))
+	if (MARK_RING(chan, 256, 18))
 		return FALSE;
 
 	BEGIN_RING(chan, tesla, NV50TCL_RT_ADDRESS_HIGH(0), 5);

commit 1cb6c91a9afe88d73f8a1180b00f56a9150a16ed
Author: Roy Spliet <r.spliet@student.tudelft.nl>
Date:   Sat Aug 7 20:59:06 2010 +0200

    nouveau_exa.c: move line_count logic out of UTS/DFS loop
    
    Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
    Signed-off-by: Maarten Maathuis <madman2003@gmail.com>

diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 80d0338..3b2c9be 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -52,6 +52,8 @@ NVAccelDownloadM2MF(PixmapPtr pspix, int x, int y, int w, int h,
 	unsigned cpp = pspix->drawable.bitsPerPixel / 8;
 	unsigned line_len = w * cpp;
 	unsigned src_offset = 0, src_pitch = 0, linear = 0;
+	/* Maximum DMA transfer */
+	unsigned line_count = pNv->GART->size / line_len;
 
 	if (!nv50_style_tiled_pixmap(pspix)) {
 		linear     = 1;
@@ -59,21 +61,16 @@ NVAccelDownloadM2MF(PixmapPtr pspix, int x, int y, int w, int h,
 		src_offset += (y * src_pitch) + (x * cpp);
 	}
 
+	/* HW limitations */
+	if (line_count > 2047)
+		line_count = 2047;
+
 	while (h) {
-		int line_count, i;
+		int i;
 		char *src;
 
-		if (h * line_len <= pNv->GART->size) {
+		if (line_count > h)
 			line_count = h;
-		} else {
-			line_count = pNv->GART->size / line_len;
-			if (line_count > h)
-				line_count = h;
-		}
-
-		/* HW limitations */
-		if (line_count > 2047)
-			line_count = 2047;
 
 		if (MARK_RING(chan, 32, 6))
 			return FALSE;
@@ -169,6 +166,8 @@ NVAccelUploadM2MF(PixmapPtr pdpix, int x, int y, int w, int h,
 	unsigned cpp = pdpix->drawable.bitsPerPixel / 8;
 	unsigned line_len = w * cpp;
 	unsigned dst_offset = 0, dst_pitch = 0, linear = 0;
+	/* Maximum DMA transfer */
+	unsigned line_count = pNv->GART->size / line_len;
 
 	if (!nv50_style_tiled_pixmap(pdpix)) {
 		linear     = 1;
@@ -176,22 +175,16 @@ NVAccelUploadM2MF(PixmapPtr pdpix, int x, int y, int w, int h,
 		dst_offset += (y * dst_pitch) + (x * cpp);
 	}
 
+	/* HW limitations */
+	if (line_count > 2047)
+		line_count = 2047;
+
 	while (h) {
-		int line_count, i;
+		int i;
 		char *dst;
 
-		/* Determine max amount of data we can DMA at once */
-		if (h * line_len <= pNv->GART->size) {
+		if (line_count > h)
 			line_count = h;
-		} else {
-			line_count = pNv->GART->size / line_len;
-			if (line_count > h)
-				line_count = h;
-		}
-
-		/* HW limitations */
-		if (line_count > 2047)
-			line_count = 2047;
 
 		/* Upload to GART */
 		if (nouveau_bo_map(pNv->GART, NOUVEAU_BO_WR))

commit 9f50b62229d5984ee5c16bc54953c7f8e2d5e575
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Aug 6 08:28:34 2010 +1000

    nvc0: recognise these chipsets, and allow NoAccel mode on them
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 0abe400..3c16918 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -254,6 +254,7 @@ NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev,
 	case 0x80:
 	case 0x90:
 	case 0xa0:
+	case 0xc0:
 		break;
 	default:
 		xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
@@ -652,6 +653,9 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	case 0xa0:
 		pNv->Architecture = NV_ARCH_50;
 		break;
+	case 0xc0:
+		pNv->Architecture = NV_ARCH_C0;
+		break;
 	default:
 		return FALSE;
 	}
@@ -674,8 +678,8 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 			break;
 		case 30:
 			/* OK on NV50 KMS */
-			if (pNv->Architecture != NV_ARCH_50)
-				NVPreInitFail("Depth 30 supported on G80 only\n");
+			if (pNv->Architecture < NV_ARCH_50)
+				NVPreInitFail("Depth 30 supported on G80+ only\n");
 			break;
 		case 15: /* 15 may get done one day, so leave any code for it in place */
 		default:
diff --git a/src/nv_type.h b/src/nv_type.h
index 0bfe721..9c22ea9 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -24,6 +24,7 @@
 #define NV_ARCH_30  0x30
 #define NV_ARCH_40  0x40
 #define NV_ARCH_50  0x50
+#define NV_ARCH_C0  0xc0
 
 /* NV50 */
 typedef struct _NVRec *NVPtr;

commit b96170a4e51c1d3167601210ca31e98283c02885
Author: Francisco Jerez <currojerez@riseup.net>
Date:   Thu Aug 5 00:40:40 2010 +0200

    nv10/exa: Bump maxX/maxY to 4096/4096.
    
    This way we can do accelerated 2D on larger pixmaps, it will still
    fall back to software when we hit the 2048x2048 texturing limit in a
    composite operation.

diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 1b8888e..80d0338 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -524,7 +524,7 @@ nouveau_exa_init(ScreenPtr pScreen)
 		exa->maxX = 8192;
 		exa->maxY = 8192;
 	} else
-	if (pNv->Architecture >= NV_ARCH_20) {
+	if (pNv->Architecture >= NV_ARCH_10) {
 		exa->maxX = 4096;
 		exa->maxY = 4096;
 	} else {

commit 321eb2df5c8b1da4d6469037dd1d8888b508fabd
Author: Francisco Jerez <currojerez@riseup.net>
Date:   Wed Aug 4 13:11:24 2010 +0200

    Revert "nv04-nv40/exa: Match the blob behavior more closely on PrepareCopy."
    
    This reverts commit 9de0d97bd2fc2ee8800d48b5340a3d495525ad3e. Unnecessary
    after kernel commit "drm/nouveau: Ack the context switch interrupt before
    switching contexts.".

diff --git a/src/nv04_exa.c b/src/nv04_exa.c
index c5e44a5..19c5fc5 100644
--- a/src/nv04_exa.c
+++ b/src/nv04_exa.c
@@ -207,15 +207,11 @@ NV04EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx, int dy,
 			return FALSE;
 		}
 
-		BEGIN_RING(chan, blit, NV04_IMAGE_BLIT_SURFACE, 1);
-		OUT_RING  (chan, pNv->NvContextSurfaces->handle);
 		BEGIN_RING(chan, blit, NV01_IMAGE_BLIT_OPERATION, 1);
 		OUT_RING  (chan, 1); /* ROP_AND */
 
 		NV04EXASetROP(pScrn, alu, planemask);
 	} else {
-		BEGIN_RING(chan, blit, NV04_IMAGE_BLIT_SURFACE, 1);
-		OUT_RING  (chan, pNv->NvContextSurfaces->handle);
 		BEGIN_RING(chan, blit, NV01_IMAGE_BLIT_OPERATION, 1);
 		OUT_RING  (chan, 3); /* SRCCOPY */
 	}

commit db98ad23633958e52f84501c5a2061d42d346b64
Author: Francisco Jerez <currojerez@riseup.net>
Date:   Tue Jun 15 15:32:36 2010 +0200

    dri2: Fix for the last DRI2InfoRec ABI.
    
    Just pre-fill the whole structure with zeros to avoid future
    segfaults.

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 9082515..f7675fc 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -121,7 +121,7 @@ nouveau_dri2_init(ScreenPtr pScreen)
 {
 	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
 	NVPtr pNv = NVPTR(pScrn);
-	DRI2InfoRec dri2;
+	DRI2InfoRec dri2 = { 0 };
 
 	if (pNv->Architecture >= NV_ARCH_30)
 		dri2.driverName = "nouveau";
@@ -135,12 +135,6 @@ nouveau_dri2_init(ScreenPtr pScreen)
 	dri2.CreateBuffer = nouveau_dri2_create_buffer;
 	dri2.DestroyBuffer = nouveau_dri2_destroy_buffer;
 	dri2.CopyRegion = nouveau_dri2_copy_region;
-#if DRI2INFOREC_VERSION >= 4
-	dri2.ScheduleSwap = NULL;
-	dri2.ScheduleWaitMSC = NULL;
-	dri2.GetMSC = NULL;
-	dri2.numDrivers = 0;
-#endif
 
 	return DRI2ScreenInit(pScreen, &dri2);
 }

commit 9a3d0ab43f6335ab6cd48be4aa2f4f728386b386
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Fri Jun 11 21:58:38 2010 +1000

    call NVEnterVT from CreateScreenResources
    
    We need to grab DRM master here for things to work, so we may as well call
    NVEnterVT as we used to in NVScreenInit up until the previous commit.
    
    Fixes server regeneration.

diff --git a/src/nv_driver.c b/src/nv_driver.c
index d9c5115..0abe400 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -390,7 +390,7 @@ NVCreateScreenResources(ScreenPtr pScreen)
 	pScreen->CreateScreenResources = NVCreateScreenResources;
 
 	drmmode_fbcon_copy(pScreen);
-	if (!xf86SetDesiredModes(pScrn))
+	if (!NVEnterVT(pScrn->scrnIndex, 0))
 		return FALSE;
 
 	if (!pNv->NoAccel) {

commit 964eeac6dc2209da6aa8861aa8b0bc028700ab3d
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Thu Jun 10 09:38:19 2010 +1000

    fix for server 1.9

diff --git a/src/nv_driver.c b/src/nv_driver.c
index a0483df..d9c5115 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -389,6 +389,10 @@ NVCreateScreenResources(ScreenPtr pScreen)
 		return FALSE;
 	pScreen->CreateScreenResources = NVCreateScreenResources;
 
+	drmmode_fbcon_copy(pScreen);
+	if (!xf86SetDesiredModes(pScrn))
+		return FALSE;
+
 	if (!pNv->NoAccel) {
 		ppix = pScreen->GetScreenPixmap(pScreen);
 		nouveau_bo_ref(pNv->scanout, &nouveau_pixmap(ppix)->bo);
@@ -1138,10 +1142,6 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	pNv->BlockHandler = pScreen->BlockHandler;
 	pScreen->BlockHandler = NVBlockHandler;
 
-	drmmode_fbcon_copy(pScreen);
-
-	if (!NVEnterVT(pScrn->scrnIndex, 0))
-		return FALSE;
 	pScrn->vtSema = TRUE;
 	pScrn->pScreen = pScreen;
 

commit c079408e287ad09e954fa3985f95912c02cf06bc
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Thu Jun 10 01:07:49 2010 +0200

    nv50/accel: fix perspective interps in YUV to RGB shader

diff --git a/src/nv50_accel.c b/src/nv50_accel.c
index 1218e18..bbcea23 100644
--- a/src/nv50_accel.c
+++ b/src/nv50_accel.c
@@ -322,8 +322,8 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn)
 	BEGIN_RING_NI(chan, tesla, NV50TCL_CB_DATA(0), 34);
 	OUT_RING  (chan, 0x80000008);
 	OUT_RING  (chan, 0x90000408);
-	OUT_RING  (chan, 0x80010400);
-	OUT_RING  (chan, 0x80020404);
+	OUT_RING  (chan, 0x82010400);
+	OUT_RING  (chan, 0x82020404);
 	OUT_RING  (chan, 0xf0400001);
 	OUT_RING  (chan, 0x00008784);
 	OUT_RING  (chan, 0xc0080001);
@@ -334,8 +334,8 @@ NVAccelInitNV50TCL(ScrnInfoPtr pScrn)
 	OUT_RING  (chan, 0x03f078ff);
 	OUT_RING  (chan, 0xb0220015);
 	OUT_RING  (chan, 0x0bf8a677);
-	OUT_RING  (chan, 0x80030400);
-	OUT_RING  (chan, 0x80040404);
+	OUT_RING  (chan, 0x82030400);
+	OUT_RING  (chan, 0x82040404);
 	OUT_RING  (chan, 0xf0400201);
 	OUT_RING  (chan, 0x0000c784);
 	OUT_RING  (chan, 0xc0160009);

commit 65153490f7d74d45a92adbd9c5e2bbe11c884b00
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Wed Jun 9 16:12:28 2010 +1000

    use libc directly for [cm]alloc/free

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7867ddb..9b5d52d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -293,7 +293,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	if (!xf86CrtcRotate(crtc))
 		return FALSE;
 
-	output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output);
+	output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
 	if (!output_ids)
 		return FALSE;
 
@@ -321,7 +321,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 
 	ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
 			     fb_id, x, y, output_ids, output_count, &kmode);
-	xfree(output_ids);
+	free(output_ids);
 
 	if (ret) {
 		xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
@@ -646,10 +646,10 @@ drmmode_output_destroy(xf86OutputPtr output)
 		drmModeFreePropertyBlob(drmmode_output->edid_blob);
 	for (i = 0; i < drmmode_output->num_props; i++) {
 		drmModeFreeProperty(drmmode_output->props[i].mode_prop);
-		xfree(drmmode_output->props[i].atoms);
+		free(drmmode_output->props[i].atoms);
 	}
 	drmModeFreeConnector(drmmode_output->mode_output);
-	xfree(drmmode_output);
+	free(drmmode_output);
 	output->driver_private = NULL;
 }
 
@@ -707,7 +707,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
 	uint32_t value;
 	int i, j, err;
 
-	drmmode_output->props = xcalloc(mode_output->count_props, sizeof(drmmode_prop_rec));
+	drmmode_output->props = calloc(mode_output->count_props, sizeof(drmmode_prop_rec));
 	if (!drmmode_output->props)
 		return;
 
@@ -734,7 +734,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
 			INT32 range[2];
 
 			p->num_atoms = 1;
-			p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+			p->atoms = calloc(p->num_atoms, sizeof(Atom));
 			if (!p->atoms)
 				continue;
 			p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -757,7 +757,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
 			}
 		} else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) {
 			p->num_atoms = drmmode_prop->count_enums + 1;
-			p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+			p->atoms = calloc(p->num_atoms, sizeof(Atom));
 			if (!p->atoms)
 				continue;
 			p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -969,7 +969,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
 		return;
 	}
 
-	drmmode_output = xcalloc(sizeof(drmmode_output_private_rec), 1);
+	drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1);
 	if (!drmmode_output) {
 		xf86OutputDestroy(output);
 		drmModeFreeConnector(koutput);
@@ -1054,9 +1054,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 	}
 
 	if (pNv->ShadowPtr) {
-		xfree(pNv->ShadowPtr);
+		free(pNv->ShadowPtr);
 		pNv->ShadowPitch = pitch;
-		pNv->ShadowPtr = xalloc(pNv->ShadowPitch * height);
+		pNv->ShadowPtr = malloc(pNv->ShadowPitch * height);
 	}
 
 	ppix = screen->GetScreenPixmap(screen);
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index e33bf16..9082515 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -30,7 +30,7 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
 	struct nouveau_dri2_buffer *nvbuf;
 	PixmapPtr ppix;
 
-	nvbuf = xcalloc(1, sizeof(*nvbuf));
+	nvbuf = calloc(1, sizeof(*nvbuf));
 	if (!nvbuf)
 		return NULL;
 
@@ -81,7 +81,7 @@ nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
 		return;
 
 	pDraw->pScreen->DestroyPixmap(nvbuf->ppix);
-	xfree(nvbuf);
+	free(nvbuf);
 }
 
 void
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 964bc73..1b8888e 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -322,13 +322,13 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth,
 	int ret, size, cpp = bitsPerPixel >> 3;
 
 	if (!width || !height)
-		return xcalloc(1, sizeof(*nvpix));
+		return calloc(1, sizeof(*nvpix));
 
 	if (!pNv->exa_force_cp &&
 	     pNv->dev->vm_vram_size <= 32*1024*1024)
 		return NULL;
 
-	nvpix = xcalloc(1, sizeof(*nvpix));
+	nvpix = calloc(1, sizeof(*nvpix));
 	if (!nvpix)
 		return NULL;
 
@@ -369,7 +369,7 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth,
 	ret = nouveau_bo_new_tile(pNv->dev, flags, 0, size, tile_mode,
 				  tile_flags, &nvpix->bo);
 	if (ret) {
-		xfree(nvpix);
+		free(nvpix);
 		return NULL;
 	}
 
@@ -385,7 +385,7 @@ nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv)
 		return;
 
 	nouveau_bo_ref(NULL, &nvpix->bo);
-	xfree(nvpix);
+	free(nvpix);
 }
 
 bool
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index d1f87c3..4437aa6 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1579,7 +1579,7 @@ NVSetupBlitVideo (ScreenPtr pScreen)
 	NVPortPrivPtr       pPriv;
 	int i;
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 					sizeof(NVPortPrivRec) +
 					(sizeof(DevUnion) * NUM_BLIT_PORTS)))) {
 		return NULL;
@@ -1647,7 +1647,7 @@ NVSetupOverlayVideoAdapter(ScreenPtr pScreen)
 	XF86VideoAdaptorPtr adapt;
 	NVPortPrivPtr       pPriv;
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 					sizeof(NVPortPrivRec) +
 					sizeof(DevUnion)))) {
 		return NULL;
@@ -1843,7 +1843,7 @@ NV30SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic)
 	NVPortPrivPtr pPriv;
 	int i;
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 				 sizeof(NVPortPrivRec) +
 				 (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) {
 		return NULL;
@@ -1924,7 +1924,7 @@ NV40SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic)
 	NVPortPrivPtr pPriv;
 	int i;
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 				 sizeof(NVPortPrivRec) +
 				 (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) {
 		return NULL;
@@ -1995,7 +1995,7 @@ NV50SetupTexturedVideo (ScreenPtr pScreen)
 	NVPortPrivPtr pPriv;
 	int i;
 
-	if (!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+	if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
 				 sizeof(NVPortPrivRec) +
 				 (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) {
 		return NULL;
@@ -2099,7 +2099,7 @@ NVInitVideo(ScreenPtr pScreen)
 		if(textureAdaptor[0]) size++;
 		if(textureAdaptor[1]) size++;
 
-		newAdaptors = xalloc(size * sizeof(XF86VideoAdaptorPtr *));
+		newAdaptors = malloc(size * sizeof(XF86VideoAdaptorPtr *));
 		if(newAdaptors) {
 			if(num_adaptors) {
 				memcpy(newAdaptors, adaptors, num_adaptors *
@@ -2133,14 +2133,14 @@ NVInitVideo(ScreenPtr pScreen)
 	if (num_adaptors)
 		xf86XVScreenInit(pScreen, adaptors, num_adaptors);
 	if (newAdaptors)
-		xfree(newAdaptors);
+		free(newAdaptors);
 	
 	/*
 	 * For now we associate with the plain texture adapter since it is logical, but we can
 	 * associate with any/all adapters since VL doesn't depend on Xv for color conversion.
 	 */
 	if (textureAdaptor[0]) {
-		XF86MCAdaptorPtr *adaptorsXvMC = xalloc(sizeof(XF86MCAdaptorPtr));
+		XF86MCAdaptorPtr *adaptorsXvMC = malloc(sizeof(XF86MCAdaptorPtr));
 		
 		if (adaptorsXvMC) {
 			adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, textureAdaptor[0]->name);
@@ -2150,7 +2150,7 @@ NVInitVideo(ScreenPtr pScreen)
 				vlDestroyAdaptorXvMC(adaptorsXvMC[0]);
 			}
 			
-			xfree(adaptorsXvMC);
+			free(adaptorsXvMC);
 		}
 	}
 }
diff --git a/src/nv30_exa.c b/src/nv30_exa.c
index b736fb3..b34b29c 100644
--- a/src/nv30_exa.c
+++ b/src/nv30_exa.c
@@ -109,7 +109,7 @@ NV30EXAHackupA8Shaders(ScrnInfoPtr pScrn)
 		nv_shader_t *def, *a8;


Reply to: