rpms/xorg-x11-drv-nouveau/F-13 nouveau-no-outputs.patch, NONE, 1.1 nouveau-nva0-corruption-fix.patch, NONE, 1.1 xorg-x11-drv-nouveau.spec, 1.69, 1.70

Ben Skeggs bskeggs at fedoraproject.org
Tue May 11 00:04:16 UTC 2010


Author: bskeggs

Update of /cvs/pkgs/rpms/xorg-x11-drv-nouveau/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14709

Modified Files:
	xorg-x11-drv-nouveau.spec 
Added Files:
	nouveau-no-outputs.patch nouveau-nva0-corruption-fix.patch 
Log Message:
* Mon May 10 2010 Ben Skeggs <bskeggs at redhat.com> 0.0.16-5.20100423git13c1043
- fix corruption issue seen on some GT2xx chipsets (rh#590216)
- fail gracefully when no outputs connected instead of crashing



nouveau-no-outputs.patch:
 nv_driver.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- NEW FILE nouveau-no-outputs.patch ---
>From f12e6877945e8c224ce143983a74697a03fbfeb9 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Mon, 10 May 2010 09:25:55 +0200
Subject: [PATCH] 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.
---
 src/nv_driver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 795859f..aed24f7 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;
 
-- 
1.6.5.2


nouveau-nva0-corruption-fix.patch:
 drmmode_display.c |    4 ++--
 nv_driver.c       |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

--- NEW FILE nouveau-nva0-corruption-fix.patch ---
>From bf9ee3339d5bd0258df493e766f2e6677cd4d73f Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs at redhat.com>
Date: Mon, 10 May 2010 08:31:36 +1000
Subject: [PATCH] force consistant tiling mode to prevent corruption issues

---
 src/drmmode_display.c |    4 ++--
 src/nv_driver.c       |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7867ddb..4a9daa1 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -420,7 +420,7 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 
 	if (pNv->Architecture >= NV_ARCH_50) {
 		tile_mode = 4;
-		tile_flags = (drmmode->cpp == 2) ? 0x7000 : 0x7a00;
+		tile_flags = 0x7000; //(drmmode->cpp == 2) ? 0x7000 : 0x7a00;
 		ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2));
 		pitch = NOUVEAU_ALIGN(width * drmmode->cpp, 64);
 	} else {
@@ -1018,7 +1018,7 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 
 	if (pNv->Architecture >= NV_ARCH_50 && pNv->wfb_enabled) {
 		tile_mode = 4;
-		tile_flags = (scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00;
+		tile_flags = 0x7000; //(scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00;
 		ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2));
 		pitch = NOUVEAU_ALIGN(width * (scrn->bitsPerPixel >> 3), 64);
 	} else {
diff --git a/src/nv_driver.c b/src/nv_driver.c
index ca2c669..f74e415 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -838,7 +838,7 @@ NVMapMem(ScrnInfoPtr pScrn)
 	size = pScrn->displayWidth * (pScrn->bitsPerPixel >> 3);
 	if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) {
 		tile_mode = 4;
-		tile_flags = pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00;
+		tile_flags = 0x7000; //pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00;
 		size *= NOUVEAU_ALIGN(pScrn->virtualY, (1 << (tile_mode + 2)));
 	} else {
 		size *= pScrn->virtualY;
-- 
1.7.0.1



Index: xorg-x11-drv-nouveau.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nouveau/F-13/xorg-x11-drv-nouveau.spec,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -p -r1.69 -r1.70
--- xorg-x11-drv-nouveau.spec	28 Apr 2010 04:33:14 -0000	1.69
+++ xorg-x11-drv-nouveau.spec	11 May 2010 00:04:14 -0000	1.70
@@ -19,7 +19,7 @@ Name:      xorg-x11-drv-nouveau
 # need to set an epoch to get version number in sync with upstream
 Epoch:     1
 Version:   %{nouveau_version}
-Release:   4.%{snapshot}%{?dist}
+Release:   5.%{snapshot}%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -43,6 +43,8 @@ Requires:  kernel-drm-nouveau = 16
 Requires:  libudev-devel
 
 Patch0: nouveau-bgnr.patch
+Patch1: nouveau-nva0-corruption-fix.patch
+Patch2: nouveau-no-outputs.patch
 
 %description 
 X.Org X11 nouveau video driver.
@@ -51,6 +53,8 @@ X.Org X11 nouveau video driver.
 %setup -q -n %{tarball}-%{version}
 
 %patch0 -p1 -b .bgnr
+%patch1 -p1 -b .tile7000
+%patch2 -p1 -b .no-outputs
 
 %build
 autoreconf -v --install
@@ -74,6 +78,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/nouveau.4*
 
 %changelog
+* Mon May 10 2010 Ben Skeggs <bskeggs at redhat.com> 0.0.16-5.20100423git13c1043
+- fix corruption issue seen on some GT2xx chipsets (rh#590216)
+- fail gracefully when no outputs connected instead of crashing
+
 * Wed Apr 28 2010 Ben Skeggs <bskeggs at redhat.com> 0.0.16-4.20100423git13c1043
 - update from upstream, hotplug uevent support + integrates some patches
 



More information about the scm-commits mailing list