rpms/xorg-x11-drv-nv/devel nv-2.1.6-starvation.patch, NONE, 1.1 xorg-x11-drv-nv.spec, 1.62, 1.63

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Tue Jan 22 21:19:06 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-drv-nv/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30850

Modified Files:
	xorg-x11-drv-nv.spec 
Added Files:
	nv-2.1.6-starvation.patch 
Log Message:
* Tue Jan 22 2008 Adam Jackson <ajax at redhat.com> 2.1.6-6
- nv-2.1.6-starvation.patch: Avoid starving nv4-gen chips of memory
  bandwidth on huge modes.  There's surely a better way to do this.
  (#383891)


nv-2.1.6-starvation.patch:

--- NEW FILE nv-2.1.6-starvation.patch ---
diff -up xf86-video-nv-2.1.6/src/nv_driver.c.jx xf86-video-nv-2.1.6/src/nv_driver.c
--- xf86-video-nv-2.1.6/src/nv_driver.c.jx	2007-09-26 20:59:50.000000000 -0400
+++ xf86-video-nv-2.1.6/src/nv_driver.c	2008-01-22 16:11:24.000000000 -0500
@@ -1148,12 +1148,19 @@ NVFreeScreen(int scrnIndex, int flags)
 static ModeStatus
 NVValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
 {
-    NVPtr pNv = NVPTR(xf86Screens[scrnIndex]);
+    ScrnInfoPtr pScrn = &xf86Screens[scrnIndex];
+    NVPtr pNv = NVPTR(pScrn);
 
     if(pNv->fpWidth && pNv->fpHeight)
       if((pNv->fpWidth < mode->HDisplay) || (pNv->fpHeight < mode->VDisplay))
         return (MODE_PANEL);
 
+    /* avoid starving the chip on scanout */
+    if (pNv->Architecture == NV_ARCH_04 &&
+	(mode->HDisplay * mode->VDisplay * (pScrn->bitsPerPixel / 8) >
+	    pScrn->videoRam * 952)) /* 1024 * 0.93, yay magic numbers */
+	return MODE_BANDWIDTH;
+
     return (MODE_OK);
 }
 


Index: xorg-x11-drv-nv.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nv/devel/xorg-x11-drv-nv.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- xorg-x11-drv-nv.spec	18 Jan 2008 05:46:19 -0000	1.62
+++ xorg-x11-drv-nv.spec	22 Jan 2008 21:17:36 -0000	1.63
@@ -9,7 +9,7 @@
 Summary:   Xorg X11 nv video driver
 Name:      xorg-x11-drv-nv
 Version:   2.1.6
-Release:   5%{?dist}
+Release:   6%{?dist}
 URL:       http://www.x.org
 License: MIT
 Group:     User Interface/X Hardware Support
@@ -35,6 +35,7 @@
 Patch2:	    nv-2.1.6-alloca.patch
 Patch3:     nouveau-alloca.patch
 Patch4:     nv-reserve-fbarea.patch
+Patch5:	    nv-2.1.6-starvation.patch
 
 %description 
 X.Org X11 nv video driver.
@@ -54,6 +55,7 @@
 #patch0 -p1 -b .nv34-tweak
 %patch2 -p1 -b .alloca
 %patch4 -p1 -b .reserve-fbarea
+%patch5 -p1 -b .starve
 
 pushd ..
 tar jxf %{SOURCE1}
@@ -101,6 +103,11 @@
 %{_mandir}/man4/nouveau.4*
 
 %changelog
+* Tue Jan 22 2008 Adam Jackson <ajax at redhat.com> 2.1.6-6
+- nv-2.1.6-starvation.patch: Avoid starving nv4-gen chips of memory
+  bandwidth on huge modes.  There's surely a better way to do this.
+  (#383891)
+
 * Fri Jan 18 2008 Dave Airlie <airlied at redhat.com> 2.1.6-5
 - fixup the fixup for fb vs XAA alignment
 




More information about the fedora-extras-commits mailing list