]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - xorg-x11-drv-nv/patches/nv-save-rom.patch
Move all packages to root.
[people/ms/ipfire-3.x.git] / xorg-x11-drv-nv / patches / nv-save-rom.patch
1 diff -up xf86-video-nv-2.1.14/src/g80_driver.c.da xf86-video-nv-2.1.14/src/g80_driver.c
2 --- xf86-video-nv-2.1.14/src/g80_driver.c.da 2009-08-04 16:03:45.000000000 +1000
3 +++ xf86-video-nv-2.1.14/src/g80_driver.c 2009-08-04 16:04:06.000000000 +1000
4 @@ -27,6 +27,9 @@
5 #endif
6
7 #include <string.h>
8 +#include <sys/types.h>
9 +#include <sys/stat.h>
10 +#include <fcntl.h>
11
12 #include <xf86.h>
13 #include <xf86_OSproc.h>
14 @@ -163,6 +166,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
15 char *s;
16 CARD32 tmp;
17 memType BAR1sizeKB;
18 + int fd;
19
20 if(flags & PROBE_DETECT)
21 return TRUE;
22 @@ -390,6 +394,14 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
23 else
24 pNv->table1 -= 0x10000;
25
26 + /* Gag me with a horse */
27 +
28 + fd = open ("/var/run/video.rom", O_CREAT|O_RDWR|O_EXCL, 0700);
29 + if(fd != -1) {
30 + write (fd, pNv->table1, 0x10000);
31 + close (fd);
32 + }
33 +
34 xf86CrtcConfigInit(pScrn, &randr12_screen_funcs);
35 xf86CrtcSetSizeRange(pScrn, 320, 200, 8192, 8192);
36
37 @@ -939,6 +951,8 @@ G80EnterVT(int scrnIndex, int flags)
38 ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
39 G80Ptr pNv = G80PTR(pScrn);
40
41 + G80DispPreInit(pScrn);
42 +
43 /* Reinit the hardware */
44 if(pNv->xaa)
45 G80InitHW(pScrn);