summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-2.6.20-rc2.patch (renamed from meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-git-20060629.patch)364
-rw-r--r--meta/packages/linux/linux-rp_2.6.19+2.6.20-rc4.bb1
2 files changed, 209 insertions, 156 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-git-20060629.patch b/meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-2.6.20-rc2.patch
index 188ce6094e..b1b0fc3549 100644
--- a/meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-git-20060629.patch
+++ b/meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-2.6.20-rc2.patch
@@ -1,22 +1,7 @@
1# Patch generated against a6047eef1c465c38aacfbdab193161b3f0cd144 1diff --git a/Documentation/fb/vesafb.txt b/Documentation/fb/vesafb.txt
2--- 2index ee277dd..93d6e6e 100644
3# Documentation/fb/vesafb.txt | 250 ++++-- 3--- a/Documentation/fb/vesafb.txt
4# arch/i386/boot/video.S | 12 4+++ b/Documentation/fb/vesafb.txt
5# drivers/video/Kconfig | 56 +
6# drivers/video/Makefile | 6
7# drivers/video/fbmem.c | 1
8# drivers/video/modedb.c | 1
9# drivers/video/vesafb-thread.c | 727 +++++++++++++++++++
10# drivers/video/vesafb-tng.c | 1598 ++++++++++++++++++++++++++++++++++++++++++
11# include/linux/sched.h | 2
12# include/video/vesa.h | 150 +++
13# kernel/fork.c | 35
14# mm/memory.c | 1
15# mm/mmap.c | 1
16# 13 files changed, 2748 insertions(+), 92 deletions(-)
17#
18--- linux-2.6.17.orig/Documentation/fb/vesafb.txt
19+++ linux-2.6.17/Documentation/fb/vesafb.txt
20@@ -2,16 +2,18 @@ 5@@ -2,16 +2,18 @@
21 What is vesafb? 6 What is vesafb?
22 =============== 7 ===============
@@ -94,7 +79,7 @@
94 79
95 Linux_kernel_mode_number = VESA_mode_number + 0x200 80 Linux_kernel_mode_number = VESA_mode_number + 0x200
96 81
97@@ -56,15 +67,15 @@ So the table for the Kernel mode numbers 82@@ -56,15 +67,15 @@ So the table for the Kernel mode numbers are:
98 83
99 | 640x480 800x600 1024x768 1280x1024 84 | 640x480 800x600 1024x768 1280x1024
100 ----+------------------------------------- 85 ----+-------------------------------------
@@ -118,7 +103,7 @@
118 103
119 If this does not work, this might be because your BIOS does not support 104 If this does not work, this might be because your BIOS does not support
120 linear framebuffers or because it does not support this mode at all. 105 linear framebuffers or because it does not support this mode at all.
121@@ -72,11 +83,12 @@ Even if your board does, it might be the 106@@ -72,11 +83,12 @@ Even if your board does, it might be the BIOS which does not. VESA BIOS
122 Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a 107 Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a
123 "bad mode number" message if something goes wrong. 108 "bad mode number" message if something goes wrong.
124 109
@@ -132,7 +117,7 @@
132 X11 117 X11
133 === 118 ===
134 119
135@@ -84,98 +96,164 @@ XF68_FBDev should work just fine, but it 120@@ -84,98 +96,164 @@ XF68_FBDev should work just fine, but it is non-accelerated. Running
136 another (accelerated) X-Server like XF86_SVGA might or might not work. 121 another (accelerated) X-Server like XF86_SVGA might or might not work.
137 It depends on X-Server and graphics board. 122 It depends on X-Server and graphics board.
138 123
@@ -152,13 +137,13 @@
152+With VBE 3.0 compatible BIOSes and vesafb-tng it is possible to change 137+With VBE 3.0 compatible BIOSes and vesafb-tng it is possible to change
153+the refresh rate either at boot time (by specifying the @<rr> part of 138+the refresh rate either at boot time (by specifying the @<rr> part of
154+the mode name) or later, using the fbset utility. 139+the mode name) or later, using the fbset utility.
140+
141+If you want to use the default BIOS refresh rate while switching modes
142+on a running system, set pixclock to 0.
155 143
156- * configure and load the DOS-Tools for your the graphics board (if 144- * configure and load the DOS-Tools for your the graphics board (if
157- available) and boot linux with loadlin. 145- available) and boot linux with loadlin.
158- * use a native driver (matroxfb/atyfb) instead if vesafb. If none 146- * use a native driver (matroxfb/atyfb) instead if vesafb. If none
159+If you want to use the default BIOS refresh rate while switching modes
160+on a running system, set pixclock to 0.
161+
162+With VBE 2.0 there is no way to change the mode timings after booting 147+With VBE 2.0 there is no way to change the mode timings after booting
163+Linux. If you are not happy with the 60 Hz refresh rate, you have 148+Linux. If you are not happy with the 60 Hz refresh rate, you have
164+the following options: 149+the following options:
@@ -189,25 +174,15 @@
189-to pan the display. It is turned off by default because it 174-to pan the display. It is turned off by default because it
190-seems not to work with some BIOS versions, but there are options 175-seems not to work with some BIOS versions, but there are options
191-to turn it on. 176-to turn it on.
192+The VESA BIOS provides protected mode interface for changing some parameters. 177-
193+vesafb can use it for palette changes and to pan the display. It is turned
194+off by default because it seems not to work with some BIOS versions, but
195+there are options to turn it on.
196
197-You can pass options to vesafb using "video=vesafb:option" on 178-You can pass options to vesafb using "video=vesafb:option" on
198-the kernel command line. Multiple options should be separated 179-the kernel command line. Multiple options should be separated
199-by comma, like this: "video=vesafb:ypan,invers" 180-by comma, like this: "video=vesafb:ypan,invers"
200+You can pass options to vesafb using "video=vesafb:option" on the kernel 181-
201+command line. Multiple options should be separated by a comma, like this:
202+"video=vesafb:ypan,1024x768-32@85"
203
204-Accepted options: 182-Accepted options:
205+Note that vesafb-tng still uses the "video=vesafb:option" format of the 183-
206+kernel command line video parameter. "video=vesafb-tng:xxx" is incorrect.
207
208-invers no comment... 184-invers no comment...
209+Accepted options (both vesafb and vesafb-tng): 185-
210
211-ypan enable display panning using the VESA protected mode 186-ypan enable display panning using the VESA protected mode
212- interface. The visible screen is just a window of the 187- interface. The visible screen is just a window of the
213- video memory, console scrolling is done by changing the 188- video memory, console scrolling is done by changing the
@@ -219,6 +194,43 @@
219- kontra: * scrolling only parts of the screen causes some 194- kontra: * scrolling only parts of the screen causes some
220- ugly flicker effects (boot logo flickers for 195- ugly flicker effects (boot logo flickers for
221- example). 196- example).
197-
198-ywrap Same as ypan, but assumes your gfx board can wrap-around
199- the video memory (i.e. starts reading from top if it
200- reaches the end of video memory). Faster than ypan.
201-
202-redraw scroll by redrawing the affected part of the screen, this
203- is the safe (and slow) default.
204-
205-
206-vgapal Use the standard vga registers for palette changes.
207- This is the default.
208-pmipal Use the protected mode interface for palette changes.
209-
210-mtrr:n setup memory type range registers for the vesafb framebuffer
211- where n:
212- 0 - disabled (equivalent to nomtrr) (default)
213- 1 - uncachable
214- 2 - write-back
215- 3 - write-combining
216- 4 - write-through
217-
218- If you see the following in dmesg, choose the type that matches the
219- old one. In this example, use "mtrr:2".
220+The VESA BIOS provides protected mode interface for changing some parameters.
221+vesafb can use it for palette changes and to pan the display. It is turned
222+off by default because it seems not to work with some BIOS versions, but
223+there are options to turn it on.
224+
225+You can pass options to vesafb using "video=vesafb:option" on the kernel
226+command line. Multiple options should be separated by a comma, like this:
227+"video=vesafb:ypan,1024x768-32@85"
228+
229+Note that vesafb-tng still uses the "video=vesafb:option" format of the
230+kernel command line video parameter. "video=vesafb-tng:xxx" is incorrect.
231+
232+Accepted options (both vesafb and vesafb-tng):
233+
222+ypan Enable display panning using the VESA protected mode interface 234+ypan Enable display panning using the VESA protected mode interface
223+ The visible screen is just a window of the video memory, 235+ The visible screen is just a window of the video memory,
224+ console scrolling is done by changing the start of the window. 236+ console scrolling is done by changing the start of the window.
@@ -229,34 +241,19 @@
229+ con: * scrolling only parts of the screen causes some 241+ con: * scrolling only parts of the screen causes some
230+ ugly flicker effects (boot logo flickers for 242+ ugly flicker effects (boot logo flickers for
231+ example). 243+ example).
232 244+
233-ywrap Same as ypan, but assumes your gfx board can wrap-around
234- the video memory (i.e. starts reading from top if it
235- reaches the end of video memory). Faster than ypan.
236+ywrap Same as ypan, but assumes your gfx board can wrap-around the video 245+ywrap Same as ypan, but assumes your gfx board can wrap-around the video
237+ memory (i.e. starts reading from top if it reaches the end of 246+ memory (i.e. starts reading from top if it reaches the end of
238+ video memory). Faster than ypan. 247+ video memory). Faster than ypan.
239 248+
240-redraw scroll by redrawing the affected part of the screen, this
241- is the safe (and slow) default.
242+redraw Scroll by redrawing the affected part of the screen, this is the 249+redraw Scroll by redrawing the affected part of the screen, this is the
243+ safe (and slow) default. 250+ safe (and slow) default.
244 251+
245+vgapal Use the standard VGA registers for palette changes. 252+vgapal Use the standard VGA registers for palette changes.
246 253+
247-vgapal Use the standard vga registers for palette changes.
248- This is the default.
249-pmipal Use the protected mode interface for palette changes.
250+pmipal Use the protected mode interface for palette changes. 254+pmipal Use the protected mode interface for palette changes.
251+ This is the default is the protected mode interface is available. 255+ This is the default is the protected mode interface is available.
252 256+
253-mtrr:n setup memory type range registers for the vesafb framebuffer
254- where n:
255- 0 - disabled (equivalent to nomtrr) (default)
256- 1 - uncachable
257- 2 - write-back
258- 3 - write-combining
259- 4 - write-through
260+mtrr:n Setup memory type range registers for the vesafb framebuffer 257+mtrr:n Setup memory type range registers for the vesafb framebuffer
261+ where n: 258+ where n:
262+ 0 - disabled (equivalent to nomtrr) (default) 259+ 0 - disabled (equivalent to nomtrr) (default)
@@ -264,9 +261,7 @@
264+ 2 - write-back 261+ 2 - write-back
265+ 3 - write-combining 262+ 3 - write-combining
266+ 4 - write-through 263+ 4 - write-through
267 264+
268- If you see the following in dmesg, choose the type that matches the
269- old one. In this example, use "mtrr:2".
270+ If you see the following in dmesg, choose the type that matches 265+ If you see the following in dmesg, choose the type that matches
271+ the old one. In this example, use "mtrr:2". 266+ the old one. In this example, use "mtrr:2".
272 ... 267 ...
@@ -291,8 +286,7 @@
291 286
292-Have fun! 287-Have fun!
293+Options accepted only by vesafb-tng: 288+Options accepted only by vesafb-tng:
294 289+
295- Gerd
296+<mode> The mode you want to set, in the standard modedb format. Refer to 290+<mode> The mode you want to set, in the standard modedb format. Refer to
297+ modedb.txt for a detailed description. If you specify a mode that is 291+ modedb.txt for a detailed description. If you specify a mode that is
298+ not supported by your board's BIOS, vesafb-tng will attempt to set a 292+ not supported by your board's BIOS, vesafb-tng will attempt to set a
@@ -337,7 +331,8 @@
337+maxhf:n Maximum horizontal frequency (in kHz). 331+maxhf:n Maximum horizontal frequency (in kHz).
338+maxvf:n Maximum vertical frequency (in Hz). 332+maxvf:n Maximum vertical frequency (in Hz).
339+maxclk:n Maximum pixel clock (in MHz). 333+maxclk:n Maximum pixel clock (in MHz).
340+ 334
335- Gerd
341+Have fun! 336+Have fun!
342 337
343 -- 338 --
@@ -352,9 +347,11 @@
352+Extended documentation for vm86, VBE 3.0 and vesafb-tng by 347+Extended documentation for vm86, VBE 3.0 and vesafb-tng by
353+Michal Januszewski <spock@gentoo.org> 348+Michal Januszewski <spock@gentoo.org>
354+ 349+
355--- linux-2.6.17.orig/arch/i386/boot/video.S 350diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
356+++ linux-2.6.17/arch/i386/boot/video.S 351index 2c5b5cc..2c2d4b5 100644
357@@ -165,10 +165,12 @@ basret: ret 352--- a/arch/i386/boot/video.S
353+++ b/arch/i386/boot/video.S
354@@ -163,10 +163,12 @@ basret: ret
358 # parameters in the default 80x25 mode -- these are set directly, 355 # parameters in the default 80x25 mode -- these are set directly,
359 # because some very obscure BIOSes supply insane values. 356 # because some very obscure BIOSes supply insane values.
360 mode_params: 357 mode_params:
@@ -367,7 +364,7 @@
367 movb $0x03, %ah # Read cursor position 364 movb $0x03, %ah # Read cursor position
368 xorb %bh, %bh 365 xorb %bh, %bh
369 int $0x10 366 int $0x10
370@@ -201,6 +203,7 @@ mopar2: movb %al, %fs:(PARAM_VIDEO_LINES 367@@ -199,6 +201,7 @@ mopar2: movb %al, %fs:(PARAM_VIDEO_LINES)
371 ret 368 ret
372 369
373 #ifdef CONFIG_VIDEO_SELECT 370 #ifdef CONFIG_VIDEO_SELECT
@@ -375,7 +372,7 @@
375 # Fetching of VESA frame buffer parameters 372 # Fetching of VESA frame buffer parameters
376 mopar_gr: 373 mopar_gr:
377 leaw modelist+1024, %di 374 leaw modelist+1024, %di
378@@ -283,6 +286,7 @@ dac_done: 375@@ -281,6 +284,7 @@ dac_done:
379 movw %es, %fs:(PARAM_VESAPM_SEG) 376 movw %es, %fs:(PARAM_VESAPM_SEG)
380 movw %di, %fs:(PARAM_VESAPM_OFF) 377 movw %di, %fs:(PARAM_VESAPM_OFF)
381 no_pm: ret 378 no_pm: ret
@@ -383,7 +380,7 @@
383 380
384 # The video mode menu 381 # The video mode menu
385 mode_menu: 382 mode_menu:
386@@ -497,10 +501,12 @@ mode_set: 383@@ -495,10 +499,12 @@ mode_set:
387 384
388 cmpb $VIDEO_FIRST_V7>>8, %ah 385 cmpb $VIDEO_FIRST_V7>>8, %ah
389 jz setv7 386 jz setv7
@@ -398,7 +395,7 @@
398 orb %ah, %ah 395 orb %ah, %ah
399 jz setmenu 396 jz setmenu
400 397
401@@ -572,6 +578,7 @@ setr1: lodsw 398@@ -570,6 +576,7 @@ setr1: lodsw
402 movw -4(%si), %ax # Fetch mode ID 399 movw -4(%si), %ax # Fetch mode ID
403 jmp _m_s 400 jmp _m_s
404 401
@@ -406,7 +403,7 @@
406 check_vesa: 403 check_vesa:
407 leaw modelist+1024, %di 404 leaw modelist+1024, %di
408 subb $VIDEO_FIRST_VESA>>8, %bh 405 subb $VIDEO_FIRST_VESA>>8, %bh
409@@ -605,6 +612,7 @@ check_vesa: 406@@ -603,6 +610,7 @@ check_vesa:
410 ret 407 ret
411 408
412 _setbad: jmp setbad # Ugly... 409 _setbad: jmp setbad # Ugly...
@@ -414,9 +411,24 @@
414 411
415 # Recalculate vertical display end registers -- this fixes various 412 # Recalculate vertical display end registers -- this fixes various
416 # inconsistencies of extended modes on many adapters. Called when 413 # inconsistencies of extended modes on many adapters. Called when
417--- linux-2.6.17.orig/drivers/video/Kconfig 414diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
418+++ linux-2.6.17/drivers/video/Kconfig 415index 1393523..8a05f95 100644
419@@ -472,8 +472,22 @@ config FB_TGA 416--- a/drivers/char/sysrq.c
417+++ b/drivers/char/sysrq.c
418@@ -240,7 +240,7 @@ static void send_sig_all(int sig)
419 struct task_struct *p;
420
421 for_each_process(p) {
422- if (p->mm && !is_init(p))
423+ if (p->mm && !is_init(p) && !(p->flags & PF_BORROWED_MM))
424 /* Not swapper, init nor kernel thread */
425 force_sig(sig, p);
426 }
427diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
428index 4e83f01..ae122fd 100644
429--- a/drivers/video/Kconfig
430+++ b/drivers/video/Kconfig
431@@ -547,8 +547,22 @@ config FB_TGA
420 cards. Say Y if you have one of those. 432 cards. Say Y if you have one of those.
421 433
422 config FB_VESA 434 config FB_VESA
@@ -441,7 +453,7 @@
441 select FB_CFB_FILLRECT 453 select FB_CFB_FILLRECT
442 select FB_CFB_COPYAREA 454 select FB_CFB_COPYAREA
443 select FB_CFB_IMAGEBLIT 455 select FB_CFB_IMAGEBLIT
444@@ -481,7 +495,43 @@ config FB_VESA 456@@ -557,7 +571,43 @@ config FB_VESA
445 This is the frame buffer device driver for generic VESA 2.0 457 This is the frame buffer device driver for generic VESA 2.0
446 compliant graphic cards. The older VESA 1.2 cards are not supported. 458 compliant graphic cards. The older VESA 1.2 cards are not supported.
447 You will get a boot time penguin logo at no additional cost. Please 459 You will get a boot time penguin logo at no additional cost. Please
@@ -459,14 +471,14 @@
459+ select FB_CFB_COPYAREA 471+ select FB_CFB_COPYAREA
460+ select FB_CFB_IMAGEBLIT 472+ select FB_CFB_IMAGEBLIT
461+ help 473+ help
462+ This is the frame buffer device driver for generic VESA 2.0 474+ This is an enhanced generic frame buffer device driver for
463+ compliant graphic cards. It is capable of taking advantage of 475+ VBE 2.0 compliant graphic cards. It can take advantage of VBE 3.0
464+ VBE 3.0 features. With this driver you will be able to adjust 476+ features (refresh rate adjustment) when these are available.
465+ the refresh rate (VBE 3.0 compliant boards only) and change 477+ The driver also makes it possible to change the video mode
466+ the graphic mode on-the-fly. 478+ on the fly and to switch back to text mode when it's unloaded.
467+ 479+
468+ You will also get a boot time penguin logo at no additional cost. Please 480+ If the driver is compiled as a module, the module will be called
469+ read <file:Documentation/fb/vesafb.txt>. 481+ vesafb-tng.
470+ 482+
471+endchoice 483+endchoice
472+ 484+
@@ -484,12 +496,14 @@
484+ depends on FB_VESA 496+ depends on FB_VESA
485+ default y 497+ default y
486 498
487 config VIDEO_SELECT 499 config FB_IMAC
488 bool 500 bool "Intel-based Macintosh Framebuffer Support"
489--- linux-2.6.17.orig/drivers/video/Makefile 501diff --git a/drivers/video/Makefile b/drivers/video/Makefile
490+++ linux-2.6.17/drivers/video/Makefile 502index 309a26d..e57b0e7 100644
491@@ -97,7 +97,11 @@ obj-$(CONFIG_FB_IMX) += imx 503--- a/drivers/video/Makefile
492 obj-$(CONFIG_FB_S3C2410) += s3c2410fb.o 504+++ b/drivers/video/Makefile
505@@ -102,7 +102,11 @@ obj-$(CONFIG_FB_PNX4008_DUM_RGB) += pnx4008/
506 obj-$(CONFIG_FB_IBM_GXT4500) += gxt4500.o
493 507
494 # Platform or fallback drivers go here 508 # Platform or fallback drivers go here
495-obj-$(CONFIG_FB_VESA) += vesafb.o 509-obj-$(CONFIG_FB_VESA) += vesafb.o
@@ -498,12 +512,14 @@
498+else 512+else
499+ obj-$(CONFIG_FB_VESA) += vesafb-thread.o vesafb-tng.o 513+ obj-$(CONFIG_FB_VESA) += vesafb-thread.o vesafb-tng.o
500+endif 514+endif
515 obj-$(CONFIG_FB_IMAC) += imacfb.o
501 obj-$(CONFIG_FB_VGA16) += vga16fb.o vgastate.o 516 obj-$(CONFIG_FB_VGA16) += vga16fb.o vgastate.o
502 obj-$(CONFIG_FB_OF) += offb.o 517 obj-$(CONFIG_FB_OF) += offb.o
503 518diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
504--- linux-2.6.17.orig/drivers/video/fbmem.c 519index 3cfea31..bfb39cc 100644
505+++ linux-2.6.17/drivers/video/fbmem.c 520--- a/drivers/video/fbmem.c
506@@ -1438,6 +1438,7 @@ fbmem_init(void) 521+++ b/drivers/video/fbmem.c
522@@ -1408,6 +1408,7 @@ fbmem_init(void)
507 printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class)); 523 printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class));
508 fb_class = NULL; 524 fb_class = NULL;
509 } 525 }
@@ -511,9 +527,11 @@
511 return 0; 527 return 0;
512 } 528 }
513 529
514--- linux-2.6.17.orig/drivers/video/modedb.c 530diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
515+++ linux-2.6.17/drivers/video/modedb.c 531index 5df41f6..f838a53 100644
516@@ -671,6 +671,7 @@ void fb_var_to_videomode(struct fb_video 532--- a/drivers/video/modedb.c
533+++ b/drivers/video/modedb.c
534@@ -674,6 +674,7 @@ void fb_var_to_videomode(struct fb_videomode *mode,
517 { 535 {
518 u32 pixclock, hfreq, htotal, vtotal; 536 u32 pixclock, hfreq, htotal, vtotal;
519 537
@@ -521,9 +539,17 @@
521 mode->name = NULL; 539 mode->name = NULL;
522 mode->xres = var->xres; 540 mode->xres = var->xres;
523 mode->yres = var->yres; 541 mode->yres = var->yres;
542@@ -1025,3 +1026,4 @@ EXPORT_SYMBOL(fb_find_best_mode);
543 EXPORT_SYMBOL(fb_find_nearest_mode);
544 EXPORT_SYMBOL(fb_videomode_to_modelist);
545 EXPORT_SYMBOL(fb_find_mode);
546+EXPORT_SYMBOL(fb_destroy_modelist);
547diff --git a/drivers/video/vesafb-thread.c b/drivers/video/vesafb-thread.c
548new file mode 100644
549index 0000000..543e202
524--- /dev/null 550--- /dev/null
525+++ linux-2.6.17/drivers/video/vesafb-thread.c 551+++ b/drivers/video/vesafb-thread.c
526@@ -0,0 +1,727 @@ 552@@ -0,0 +1,751 @@
527+/* 553+/*
528+ * Framebuffer driver for VBE 2.0+ compliant graphic boards. 554+ * Framebuffer driver for VBE 2.0+ compliant graphic boards.
529+ * Kernel thread and vm86 routines. 555+ * Kernel thread and vm86 routines.
@@ -532,8 +558,6 @@
532+ * 558+ *
533+ */ 559+ */
534+ 560+
535+#include <linux/config.h>
536+#include <linux/slab.h>
537+#include <linux/workqueue.h> 561+#include <linux/workqueue.h>
538+#include <linux/completion.h> 562+#include <linux/completion.h>
539+#include <linux/module.h> 563+#include <linux/module.h>
@@ -542,6 +566,7 @@
542+#include <linux/mm.h> 566+#include <linux/mm.h>
543+#include <linux/delay.h> 567+#include <linux/delay.h>
544+#include <linux/signal.h> 568+#include <linux/signal.h>
569+#include <linux/freezer.h>
545+#include <linux/suspend.h> 570+#include <linux/suspend.h>
546+#include <linux/unistd.h> 571+#include <linux/unistd.h>
547+#include <video/vesa.h> 572+#include <video/vesa.h>
@@ -554,9 +579,7 @@
554+#include <asm/mmu_context.h> 579+#include <asm/mmu_context.h>
555+#include "edid.h" 580+#include "edid.h"
556+ 581+
557+#ifdef MODULE 582+static int errno;
558+int errno;
559+#endif
560+ 583+
561+static DECLARE_COMPLETION(vesafb_th_completion); 584+static DECLARE_COMPLETION(vesafb_th_completion);
562+static DECLARE_MUTEX(vesafb_task_list_sem); 585+static DECLARE_MUTEX(vesafb_task_list_sem);
@@ -566,9 +589,6 @@
566+static struct vm86_struct vm86; 589+static struct vm86_struct vm86;
567+static int vesafb_pid = 0; 590+static int vesafb_pid = 0;
568+ 591+
569+_syscall3(int,ioperm,unsigned long, a, unsigned long, b, unsigned long, c);
570+_syscall1(int,vm86old,struct vm86_struct __user*, v86);
571+
572+#define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK) 592+#define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
573+#define VM86_PUSHW(x) \ 593+#define VM86_PUSHW(x) \
574+do { \ 594+do { \
@@ -601,6 +621,36 @@
601+ 621+
602+#define FLAG_D (1 << 10) 622+#define FLAG_D (1 << 10)
603+ 623+
624+/* Syscalls used by the vesafb thread */
625+static int vm86old(struct vm86_struct __user* v86)
626+{
627+ long res;
628+ __asm__ volatile ("push %%ebx; movl %2, %%ebx ; int $0x80 ; pop %%ebx"
629+ : "=a" (res)
630+ : "0" (__NR_vm86old), "ri" ((long)(v86)) : "memory");
631+
632+ if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) {
633+ errno = -res;
634+ res = -1;
635+ }
636+ return (int)res;
637+}
638+
639+static int ioperm(unsigned long a, unsigned long b, unsigned long c)
640+{
641+ long res;
642+ __asm__ volatile ("push %%ebx; movl %2, %%ebx ; int $0x80 ; pop %%ebx"
643+ : "=a" (res)
644+ : "0" (__NR_ioperm), "ri" ((long)(a)), "c" ((long)(b)),
645+ "d" ((long)(c)) : "memory");
646+
647+ if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) {
648+ errno = -res;
649+ res = -1;
650+ }
651+ return (int)res;
652+}
653+
604+/* Segment prefix opcodes */ 654+/* Segment prefix opcodes */
605+enum { 655+enum {
606+ P_CS = 0x2e, 656+ P_CS = 0x2e,
@@ -962,7 +1012,7 @@
962+ struct mm_struct *mm = current->mm; 1012+ struct mm_struct *mm = current->mm;
963+ int ret = 0; 1013+ int ret = 0;
964+ 1014+
965+ vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); 1015+ vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
966+ if (!vma) 1016+ if (!vma)
967+ return -ENOMEM; 1017+ return -ENOMEM;
968+ memset(vma, 0, sizeof(*vma)); 1018+ memset(vma, 0, sizeof(*vma));
@@ -1251,9 +1301,12 @@
1251+MODULE_LICENSE("GPL"); 1301+MODULE_LICENSE("GPL");
1252+MODULE_AUTHOR("Michal Januszewski"); 1302+MODULE_AUTHOR("Michal Januszewski");
1253+ 1303+
1304diff --git a/drivers/video/vesafb-tng.c b/drivers/video/vesafb-tng.c
1305new file mode 100644
1306index 0000000..b4d4394
1254--- /dev/null 1307--- /dev/null
1255+++ linux-2.6.17/drivers/video/vesafb-tng.c 1308+++ b/drivers/video/vesafb-tng.c
1256@@ -0,0 +1,1598 @@ 1309@@ -0,0 +1,1586 @@
1257+/* 1310+/*
1258+ * Framebuffer driver for VBE 2.0+ compliant graphic boards 1311+ * Framebuffer driver for VBE 2.0+ compliant graphic boards
1259+ * 1312+ *
@@ -2027,16 +2080,10 @@
2027+ int clen = 0, i; 2080+ int clen = 0, i;
2028+ 2081+
2029+ for (i = 0; i < vbe_modes_cnt; i++) { 2082+ for (i = 0; i < vbe_modes_cnt; i++) {
2030+ clen += sprintf(buf + clen, "%dx%d-%d\n", vbe_modes[i].x_res, 2083+ clen += min(snprintf(buf + clen, len - clen, "%dx%d-%d\n", vbe_modes[i].x_res,
2031+ vbe_modes[i].y_res, vbe_modes[i].depth); 2084+ vbe_modes[i].y_res, vbe_modes[i].depth), len - clen);
2032+ }
2033+ *start = buf + offset;
2034+
2035+ if (clen > offset) {
2036+ clen -= offset;
2037+ } else {
2038+ clen = 0;
2039+ } 2085+ }
2086+ *eof = 1;
2040+ return clen; 2087+ return clen;
2041+} 2088+}
2042+ 2089+
@@ -2045,25 +2092,19 @@
2045+{ 2092+{
2046+ int clen = 0; 2093+ int clen = 0;
2047+ 2094+
2048+ clen += sprintf(buf + clen, "Version: %d.%d\n", 2095+ clen += min(snprintf(buf + clen, len, "Version: %d.%d\n",
2049+ ((vbe_ib.vbe_version & 0xff00) >> 8), 2096+ ((vbe_ib.vbe_version & 0xff00) >> 8),
2050+ vbe_ib.vbe_version & 0xff); 2097+ vbe_ib.vbe_version & 0xff), len);
2051+ clen += sprintf(buf + clen, "Vendor: %s\n", 2098+ clen += min(snprintf(buf + clen, len - clen, "Vendor: %s\n",
2052+ (char*)vbe_ib.oem_vendor_name_ptr); 2099+ (char*)vbe_ib.oem_vendor_name_ptr), len - clen);
2053+ clen += sprintf(buf + clen, "Product: %s\n", 2100+ clen += min(snprintf(buf + clen, len - clen, "Product: %s\n",
2054+ (char*)vbe_ib.oem_product_name_ptr); 2101+ (char*)vbe_ib.oem_product_name_ptr), len - clen);
2055+ clen += sprintf(buf + clen, "OEM rev: %s\n", 2102+ clen += min(snprintf(buf + clen, len - clen, "OEM rev: %s\n",
2056+ (char*)vbe_ib.oem_product_rev_ptr); 2103+ (char*)vbe_ib.oem_product_rev_ptr), len - clen);
2057+ clen += sprintf(buf + clen, "OEM string: %s\n", 2104+ clen += min(snprintf(buf + clen, len - clen, "OEM string: %s\n",
2058+ (char*)vbe_ib.oem_string_ptr); 2105+ (char*)vbe_ib.oem_string_ptr), len - clen);
2059+ 2106+
2060+ *start = buf + offset; 2107+ *eof = 1;
2061+
2062+ if (clen > offset) {
2063+ clen -= offset;
2064+ } else {
2065+ clen = 0;
2066+ }
2067+ return clen; 2108+ return clen;
2068+} 2109+}
2069+ 2110+
@@ -2817,8 +2858,8 @@
2817+MODULE_PARM_DESC(vgapal,"bool: set palette using VGA registers"); 2858+MODULE_PARM_DESC(vgapal,"bool: set palette using VGA registers");
2818+module_param_named(pmipal, pmi_setpal, bool, 0); 2859+module_param_named(pmipal, pmi_setpal, bool, 0);
2819+MODULE_PARM_DESC(pmipal,"bool: set palette using PMI calls"); 2860+MODULE_PARM_DESC(pmipal,"bool: set palette using PMI calls");
2820+module_param_named(nomtrr, mtrr, invbool, 0); 2861+module_param(mtrr, uint, 0);
2821+MODULE_PARM_DESC(nomtrr,"bool: disable use of MTRR registers"); 2862+MODULE_PARM_DESC(mtrr,"Memory Type Range Registers setting. Use 0 to disable.");
2822+module_param(blank, bool, 1); 2863+module_param(blank, bool, 1);
2823+MODULE_PARM_DESC(blank,"bool: enable hardware blanking"); 2864+MODULE_PARM_DESC(blank,"bool: enable hardware blanking");
2824+module_param(nocrtc, bool, 0); 2865+module_param(nocrtc, bool, 0);
@@ -2852,9 +2893,11 @@
2852+MODULE_AUTHOR("Michal Januszewski"); 2893+MODULE_AUTHOR("Michal Januszewski");
2853+MODULE_DESCRIPTION("Framebuffer driver for VBE2.0+ compliant graphics boards"); 2894+MODULE_DESCRIPTION("Framebuffer driver for VBE2.0+ compliant graphics boards");
2854+ 2895+
2855--- linux-2.6.17.orig/include/linux/sched.h 2896diff --git a/include/linux/sched.h b/include/linux/sched.h
2856+++ linux-2.6.17/include/linux/sched.h 2897index 4463735..7283e48 100644
2857@@ -1159,6 +1159,8 @@ extern void mmput(struct mm_struct *); 2898--- a/include/linux/sched.h
2899+++ b/include/linux/sched.h
2900@@ -1390,6 +1390,8 @@ extern void mmput(struct mm_struct *);
2858 extern struct mm_struct *get_task_mm(struct task_struct *task); 2901 extern struct mm_struct *get_task_mm(struct task_struct *task);
2859 /* Remove the current tasks stale references to the old mm_struct */ 2902 /* Remove the current tasks stale references to the old mm_struct */
2860 extern void mm_release(struct task_struct *, struct mm_struct *); 2903 extern void mm_release(struct task_struct *, struct mm_struct *);
@@ -2863,8 +2906,11 @@
2863 2906
2864 extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); 2907 extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
2865 extern void flush_thread(void); 2908 extern void flush_thread(void);
2909diff --git a/include/video/vesa.h b/include/video/vesa.h
2910new file mode 100644
2911index 0000000..bb5abcf
2866--- /dev/null 2912--- /dev/null
2867+++ linux-2.6.17/include/video/vesa.h 2913+++ b/include/video/vesa.h
2868@@ -0,0 +1,150 @@ 2914@@ -0,0 +1,150 @@
2869+#if 0 2915+#if 0
2870+#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , \ 2916+#define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , \
@@ -3016,17 +3062,19 @@
3016+ struct vesafb_crtc_ib crtc; 3062+ struct vesafb_crtc_ib crtc;
3017+}; 3063+};
3018+ 3064+
3019--- linux-2.6.17.orig/kernel/fork.c 3065diff --git a/kernel/fork.c b/kernel/fork.c
3020+++ linux-2.6.17/kernel/fork.c 3066index fc723e5..dc8f93b 100644
3021@@ -97,6 +97,7 @@ kmem_cache_t *fs_cachep; 3067--- a/kernel/fork.c
3068+++ b/kernel/fork.c
3069@@ -100,6 +100,7 @@ struct kmem_cache *fs_cachep;
3022 3070
3023 /* SLAB cache for vm_area_struct structures */ 3071 /* SLAB cache for vm_area_struct structures */
3024 kmem_cache_t *vm_area_cachep; 3072 struct kmem_cache *vm_area_cachep;
3025+EXPORT_SYMBOL_GPL(vm_area_cachep); 3073+EXPORT_SYMBOL_GPL(vm_area_cachep);
3026 3074
3027 /* SLAB cache for mm_struct structures (tsk->mm) */ 3075 /* SLAB cache for mm_struct structures (tsk->mm) */
3028 static kmem_cache_t *mm_cachep; 3076 static struct kmem_cache *mm_cachep;
3029@@ -383,6 +384,40 @@ void mmput(struct mm_struct *mm) 3077@@ -399,6 +400,40 @@ void mmput(struct mm_struct *mm)
3030 EXPORT_SYMBOL_GPL(mmput); 3078 EXPORT_SYMBOL_GPL(mmput);
3031 3079
3032 /** 3080 /**
@@ -3067,9 +3115,11 @@
3067 * get_task_mm - acquire a reference to the task's mm 3115 * get_task_mm - acquire a reference to the task's mm
3068 * 3116 *
3069 * Returns %NULL if the task has no mm. Checks PF_BORROWED_MM (meaning 3117 * Returns %NULL if the task has no mm. Checks PF_BORROWED_MM (meaning
3070--- linux-2.6.17.orig/mm/memory.c 3118diff --git a/mm/memory.c b/mm/memory.c
3071+++ linux-2.6.17/mm/memory.c 3119index 563792f..a9519ea 100644
3072@@ -1162,6 +1162,7 @@ int zeromap_page_range(struct vm_area_st 3120--- a/mm/memory.c
3121+++ b/mm/memory.c
3122@@ -1193,6 +1193,7 @@ int zeromap_page_range(struct vm_area_struct *vma,
3073 } while (pgd++, addr = next, addr != end); 3123 } while (pgd++, addr = next, addr != end);
3074 return err; 3124 return err;
3075 } 3125 }
@@ -3077,9 +3127,11 @@
3077 3127
3078 pte_t * fastcall get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl) 3128 pte_t * fastcall get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)
3079 { 3129 {
3080--- linux-2.6.17.orig/mm/mmap.c 3130diff --git a/mm/mmap.c b/mm/mmap.c
3081+++ linux-2.6.17/mm/mmap.c 3131index 9717337..6fa5b1c 100644
3082@@ -1996,6 +1996,7 @@ int insert_vm_struct(struct mm_struct * 3132--- a/mm/mmap.c
3133+++ b/mm/mmap.c
3134@@ -2024,6 +2024,7 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
3083 vma_link(mm, vma, prev, rb_link, rb_parent); 3135 vma_link(mm, vma, prev, rb_link, rb_parent);
3084 return 0; 3136 return 0;
3085 } 3137 }
diff --git a/meta/packages/linux/linux-rp_2.6.19+2.6.20-rc4.bb b/meta/packages/linux/linux-rp_2.6.19+2.6.20-rc4.bb
index ef1d0bd2ac..d15141fa53 100644
--- a/meta/packages/linux/linux-rp_2.6.19+2.6.20-rc4.bb
+++ b/meta/packages/linux/linux-rp_2.6.19+2.6.20-rc4.bb
@@ -44,6 +44,7 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.20-rc4.
44 file://pxa-serial-hack.patch;patch=1;status=hack \ 44 file://pxa-serial-hack.patch;patch=1;status=hack \
45 file://connectplus-remove-ide-HACK.patch;patch=1;status=hack \ 45 file://connectplus-remove-ide-HACK.patch;patch=1;status=hack \
46 file://squashfs3.0-2.6.15.patch;patch=1;status=external \ 46 file://squashfs3.0-2.6.15.patch;patch=1;status=external \
47 file://vesafb-tng-1.0-rc2-2.6.20-rc2.patch;patch=1;status=external \
47 file://defconfig-c7x0 \ 48 file://defconfig-c7x0 \
48 file://defconfig-hx2000 \ 49 file://defconfig-hx2000 \
49 file://defconfig-collie \ 50 file://defconfig-collie \