]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - xorg-x11-drv-nv/patches/nv-2.1.6-starvation.patch
Move all packages to root.
[people/amarx/ipfire-3.x.git] / xorg-x11-drv-nv / patches / nv-2.1.6-starvation.patch
CommitLineData
147366a6
SS
1diff -up xf86-video-nv-2.1.6/src/nv_driver.c.jx xf86-video-nv-2.1.6/src/nv_driver.c
2--- xf86-video-nv-2.1.6/src/nv_driver.c.jx 2007-09-26 20:59:50.000000000 -0400
3+++ xf86-video-nv-2.1.6/src/nv_driver.c 2008-01-22 16:11:24.000000000 -0500
4@@ -1148,12 +1148,19 @@ NVFreeScreen(int scrnIndex, int flags)
5 static ModeStatus
6 NVValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
7 {
8- NVPtr pNv = NVPTR(xf86Screens[scrnIndex]);
9+ ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
10+ NVPtr pNv = NVPTR(pScrn);
11
12 if(pNv->fpWidth && pNv->fpHeight)
13 if((pNv->fpWidth < mode->HDisplay) || (pNv->fpHeight < mode->VDisplay))
14 return (MODE_PANEL);
15
16+ /* avoid starving the chip on scanout */
17+ if (pNv->Architecture == NV_ARCH_04 &&
18+ (mode->HDisplay * mode->VDisplay * (pScrn->bitsPerPixel / 8) >
19+ pScrn->videoRam * 952)) /* 1024 * 0.93, yay magic numbers */
20+ return MODE_BANDWIDTH;
21+
22 return (MODE_OK);
23 }
24