From 97453a1b8122ae2cd0e86e5fc8551de20f34b541 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 17 Jan 2007 15:51:26 +0000 Subject: [PATCH] linux-rp: Add missing vesa-tng patch for 2.6.19+2.6.20-rc4 for qemux86 git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1156 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- ...ch => vesafb-tng-1.0-rc2-2.6.20-rc2.patch} | 364 ++++++++++-------- .../linux/linux-rp_2.6.19+2.6.20-rc4.bb | 1 + 2 files changed, 209 insertions(+), 156 deletions(-) rename meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/{vesafb-tng-1.0-rc2-git-20060629.patch => vesafb-tng-1.0-rc2-2.6.20-rc2.patch} (93%) 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 similarity index 93% rename from meta/packages/linux/linux-rp-2.6.19+2.6.20-rc4/vesafb-tng-1.0-rc2-git-20060629.patch rename to 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 @@ -# Patch generated against a6047eef1c465c38aacfbdab193161b3f0cd144 ---- -# Documentation/fb/vesafb.txt | 250 ++++-- -# arch/i386/boot/video.S | 12 -# drivers/video/Kconfig | 56 + -# drivers/video/Makefile | 6 -# drivers/video/fbmem.c | 1 -# drivers/video/modedb.c | 1 -# drivers/video/vesafb-thread.c | 727 +++++++++++++++++++ -# drivers/video/vesafb-tng.c | 1598 ++++++++++++++++++++++++++++++++++++++++++ -# include/linux/sched.h | 2 -# include/video/vesa.h | 150 +++ -# kernel/fork.c | 35 -# mm/memory.c | 1 -# mm/mmap.c | 1 -# 13 files changed, 2748 insertions(+), 92 deletions(-) -# ---- linux-2.6.17.orig/Documentation/fb/vesafb.txt -+++ linux-2.6.17/Documentation/fb/vesafb.txt +diff --git a/Documentation/fb/vesafb.txt b/Documentation/fb/vesafb.txt +index ee277dd..93d6e6e 100644 +--- a/Documentation/fb/vesafb.txt ++++ b/Documentation/fb/vesafb.txt @@ -2,16 +2,18 @@ What is vesafb? =============== @@ -94,7 +79,7 @@ Linux_kernel_mode_number = VESA_mode_number + 0x200 -@@ -56,15 +67,15 @@ So the table for the Kernel mode numbers +@@ -56,15 +67,15 @@ So the table for the Kernel mode numbers are: | 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- @@ -118,7 +103,7 @@ If this does not work, this might be because your BIOS does not support linear framebuffers or because it does not support this mode at all. -@@ -72,11 +83,12 @@ Even if your board does, it might be the +@@ -72,11 +83,12 @@ Even if your board does, it might be the BIOS which does not. VESA BIOS Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a "bad mode number" message if something goes wrong. @@ -132,7 +117,7 @@ X11 === -@@ -84,98 +96,164 @@ XF68_FBDev should work just fine, but it +@@ -84,98 +96,164 @@ XF68_FBDev should work just fine, but it is non-accelerated. Running another (accelerated) X-Server like XF86_SVGA might or might not work. It depends on X-Server and graphics board. @@ -152,13 +137,13 @@ +With VBE 3.0 compatible BIOSes and vesafb-tng it is possible to change +the refresh rate either at boot time (by specifying the @ part of +the mode name) or later, using the fbset utility. ++ ++If you want to use the default BIOS refresh rate while switching modes ++on a running system, set pixclock to 0. - * configure and load the DOS-Tools for your the graphics board (if - available) and boot linux with loadlin. - * use a native driver (matroxfb/atyfb) instead if vesafb. If none -+If you want to use the default BIOS refresh rate while switching modes -+on a running system, set pixclock to 0. -+ +With VBE 2.0 there is no way to change the mode timings after booting +Linux. If you are not happy with the 60 Hz refresh rate, you have +the following options: @@ -189,25 +174,15 @@ -to pan the display. It is turned off by default because it -seems not to work with some BIOS versions, but there are options -to turn it on. -+The VESA BIOS provides protected mode interface for changing some parameters. -+vesafb can use it for palette changes and to pan the display. It is turned -+off by default because it seems not to work with some BIOS versions, but -+there are options to turn it on. - +- -You can pass options to vesafb using "video=vesafb:option" on -the kernel command line. Multiple options should be separated -by comma, like this: "video=vesafb:ypan,invers" -+You can pass options to vesafb using "video=vesafb:option" on the kernel -+command line. Multiple options should be separated by a comma, like this: -+"video=vesafb:ypan,1024x768-32@85" - +- -Accepted options: -+Note that vesafb-tng still uses the "video=vesafb:option" format of the -+kernel command line video parameter. "video=vesafb-tng:xxx" is incorrect. - +- -invers no comment... -+Accepted options (both vesafb and vesafb-tng): - +- -ypan enable display panning using the VESA protected mode - interface. The visible screen is just a window of the - video memory, console scrolling is done by changing the @@ -219,6 +194,43 @@ - kontra: * scrolling only parts of the screen causes some - ugly flicker effects (boot logo flickers for - example). +- +-ywrap Same as ypan, but assumes your gfx board can wrap-around +- the video memory (i.e. starts reading from top if it +- reaches the end of video memory). Faster than ypan. +- +-redraw scroll by redrawing the affected part of the screen, this +- is the safe (and slow) default. +- +- +-vgapal Use the standard vga registers for palette changes. +- This is the default. +-pmipal Use the protected mode interface for palette changes. +- +-mtrr:n setup memory type range registers for the vesafb framebuffer +- where n: +- 0 - disabled (equivalent to nomtrr) (default) +- 1 - uncachable +- 2 - write-back +- 3 - write-combining +- 4 - write-through +- +- If you see the following in dmesg, choose the type that matches the +- old one. In this example, use "mtrr:2". ++The VESA BIOS provides protected mode interface for changing some parameters. ++vesafb can use it for palette changes and to pan the display. It is turned ++off by default because it seems not to work with some BIOS versions, but ++there are options to turn it on. ++ ++You can pass options to vesafb using "video=vesafb:option" on the kernel ++command line. Multiple options should be separated by a comma, like this: ++"video=vesafb:ypan,1024x768-32@85" ++ ++Note that vesafb-tng still uses the "video=vesafb:option" format of the ++kernel command line video parameter. "video=vesafb-tng:xxx" is incorrect. ++ ++Accepted options (both vesafb and vesafb-tng): ++ +ypan Enable display panning using the VESA protected mode interface + The visible screen is just a window of the video memory, + console scrolling is done by changing the start of the window. @@ -229,34 +241,19 @@ + con: * scrolling only parts of the screen causes some + ugly flicker effects (boot logo flickers for + example). - --ywrap Same as ypan, but assumes your gfx board can wrap-around -- the video memory (i.e. starts reading from top if it -- reaches the end of video memory). Faster than ypan. ++ +ywrap Same as ypan, but assumes your gfx board can wrap-around the video + memory (i.e. starts reading from top if it reaches the end of + video memory). Faster than ypan. - --redraw scroll by redrawing the affected part of the screen, this -- is the safe (and slow) default. ++ +redraw Scroll by redrawing the affected part of the screen, this is the + safe (and slow) default. - ++ +vgapal Use the standard VGA registers for palette changes. - --vgapal Use the standard vga registers for palette changes. -- This is the default. --pmipal Use the protected mode interface for palette changes. ++ +pmipal Use the protected mode interface for palette changes. + This is the default is the protected mode interface is available. - --mtrr:n setup memory type range registers for the vesafb framebuffer -- where n: -- 0 - disabled (equivalent to nomtrr) (default) -- 1 - uncachable -- 2 - write-back -- 3 - write-combining -- 4 - write-through ++ +mtrr:n Setup memory type range registers for the vesafb framebuffer + where n: + 0 - disabled (equivalent to nomtrr) (default) @@ -264,9 +261,7 @@ + 2 - write-back + 3 - write-combining + 4 - write-through - -- If you see the following in dmesg, choose the type that matches the -- old one. In this example, use "mtrr:2". ++ + If you see the following in dmesg, choose the type that matches + the old one. In this example, use "mtrr:2". ... @@ -291,8 +286,7 @@ -Have fun! +Options accepted only by vesafb-tng: - -- Gerd ++ + The mode you want to set, in the standard modedb format. Refer to + modedb.txt for a detailed description. If you specify a mode that is + not supported by your board's BIOS, vesafb-tng will attempt to set a @@ -337,7 +331,8 @@ +maxhf:n Maximum horizontal frequency (in kHz). +maxvf:n Maximum vertical frequency (in Hz). +maxclk:n Maximum pixel clock (in MHz). -+ + +- Gerd +Have fun! -- @@ -352,9 +347,11 @@ +Extended documentation for vm86, VBE 3.0 and vesafb-tng by +Michal Januszewski + ---- linux-2.6.17.orig/arch/i386/boot/video.S -+++ linux-2.6.17/arch/i386/boot/video.S -@@ -165,10 +165,12 @@ basret: ret +diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S +index 2c5b5cc..2c2d4b5 100644 +--- a/arch/i386/boot/video.S ++++ b/arch/i386/boot/video.S +@@ -163,10 +163,12 @@ basret: ret # parameters in the default 80x25 mode -- these are set directly, # because some very obscure BIOSes supply insane values. mode_params: @@ -367,7 +364,7 @@ movb $0x03, %ah # Read cursor position xorb %bh, %bh int $0x10 -@@ -201,6 +203,7 @@ mopar2: movb %al, %fs:(PARAM_VIDEO_LINES +@@ -199,6 +201,7 @@ mopar2: movb %al, %fs:(PARAM_VIDEO_LINES) ret #ifdef CONFIG_VIDEO_SELECT @@ -375,7 +372,7 @@ # Fetching of VESA frame buffer parameters mopar_gr: leaw modelist+1024, %di -@@ -283,6 +286,7 @@ dac_done: +@@ -281,6 +284,7 @@ dac_done: movw %es, %fs:(PARAM_VESAPM_SEG) movw %di, %fs:(PARAM_VESAPM_OFF) no_pm: ret @@ -383,7 +380,7 @@ # The video mode menu mode_menu: -@@ -497,10 +501,12 @@ mode_set: +@@ -495,10 +499,12 @@ mode_set: cmpb $VIDEO_FIRST_V7>>8, %ah jz setv7 @@ -398,7 +395,7 @@ orb %ah, %ah jz setmenu -@@ -572,6 +578,7 @@ setr1: lodsw +@@ -570,6 +576,7 @@ setr1: lodsw movw -4(%si), %ax # Fetch mode ID jmp _m_s @@ -406,7 +403,7 @@ check_vesa: leaw modelist+1024, %di subb $VIDEO_FIRST_VESA>>8, %bh -@@ -605,6 +612,7 @@ check_vesa: +@@ -603,6 +610,7 @@ check_vesa: ret _setbad: jmp setbad # Ugly... @@ -414,9 +411,24 @@ # Recalculate vertical display end registers -- this fixes various # inconsistencies of extended modes on many adapters. Called when ---- linux-2.6.17.orig/drivers/video/Kconfig -+++ linux-2.6.17/drivers/video/Kconfig -@@ -472,8 +472,22 @@ config FB_TGA +diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c +index 1393523..8a05f95 100644 +--- a/drivers/char/sysrq.c ++++ b/drivers/char/sysrq.c +@@ -240,7 +240,7 @@ static void send_sig_all(int sig) + struct task_struct *p; + + for_each_process(p) { +- if (p->mm && !is_init(p)) ++ if (p->mm && !is_init(p) && !(p->flags & PF_BORROWED_MM)) + /* Not swapper, init nor kernel thread */ + force_sig(sig, p); + } +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 4e83f01..ae122fd 100644 +--- a/drivers/video/Kconfig ++++ b/drivers/video/Kconfig +@@ -547,8 +547,22 @@ config FB_TGA cards. Say Y if you have one of those. config FB_VESA @@ -441,7 +453,7 @@ select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT -@@ -481,7 +495,43 @@ config FB_VESA +@@ -557,7 +571,43 @@ config FB_VESA This is the frame buffer device driver for generic VESA 2.0 compliant graphic cards. The older VESA 1.2 cards are not supported. You will get a boot time penguin logo at no additional cost. Please @@ -459,14 +471,14 @@ + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help -+ This is the frame buffer device driver for generic VESA 2.0 -+ compliant graphic cards. It is capable of taking advantage of -+ VBE 3.0 features. With this driver you will be able to adjust -+ the refresh rate (VBE 3.0 compliant boards only) and change -+ the graphic mode on-the-fly. -+ -+ You will also get a boot time penguin logo at no additional cost. Please -+ read . ++ This is an enhanced generic frame buffer device driver for ++ VBE 2.0 compliant graphic cards. It can take advantage of VBE 3.0 ++ features (refresh rate adjustment) when these are available. ++ The driver also makes it possible to change the video mode ++ on the fly and to switch back to text mode when it's unloaded. ++ ++ If the driver is compiled as a module, the module will be called ++ vesafb-tng. + +endchoice + @@ -484,12 +496,14 @@ + depends on FB_VESA + default y - config VIDEO_SELECT - bool ---- linux-2.6.17.orig/drivers/video/Makefile -+++ linux-2.6.17/drivers/video/Makefile -@@ -97,7 +97,11 @@ obj-$(CONFIG_FB_IMX) += imx - obj-$(CONFIG_FB_S3C2410) += s3c2410fb.o + config FB_IMAC + bool "Intel-based Macintosh Framebuffer Support" +diff --git a/drivers/video/Makefile b/drivers/video/Makefile +index 309a26d..e57b0e7 100644 +--- a/drivers/video/Makefile ++++ b/drivers/video/Makefile +@@ -102,7 +102,11 @@ obj-$(CONFIG_FB_PNX4008_DUM_RGB) += pnx4008/ + obj-$(CONFIG_FB_IBM_GXT4500) += gxt4500.o # Platform or fallback drivers go here -obj-$(CONFIG_FB_VESA) += vesafb.o @@ -498,12 +512,14 @@ +else + obj-$(CONFIG_FB_VESA) += vesafb-thread.o vesafb-tng.o +endif + obj-$(CONFIG_FB_IMAC) += imacfb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o vgastate.o obj-$(CONFIG_FB_OF) += offb.o - ---- linux-2.6.17.orig/drivers/video/fbmem.c -+++ linux-2.6.17/drivers/video/fbmem.c -@@ -1438,6 +1438,7 @@ fbmem_init(void) +diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c +index 3cfea31..bfb39cc 100644 +--- a/drivers/video/fbmem.c ++++ b/drivers/video/fbmem.c +@@ -1408,6 +1408,7 @@ fbmem_init(void) printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class)); fb_class = NULL; } @@ -511,9 +527,11 @@ return 0; } ---- linux-2.6.17.orig/drivers/video/modedb.c -+++ linux-2.6.17/drivers/video/modedb.c -@@ -671,6 +671,7 @@ void fb_var_to_videomode(struct fb_video +diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c +index 5df41f6..f838a53 100644 +--- a/drivers/video/modedb.c ++++ b/drivers/video/modedb.c +@@ -674,6 +674,7 @@ void fb_var_to_videomode(struct fb_videomode *mode, { u32 pixclock, hfreq, htotal, vtotal; @@ -521,9 +539,17 @@ mode->name = NULL; mode->xres = var->xres; mode->yres = var->yres; +@@ -1025,3 +1026,4 @@ EXPORT_SYMBOL(fb_find_best_mode); + EXPORT_SYMBOL(fb_find_nearest_mode); + EXPORT_SYMBOL(fb_videomode_to_modelist); + EXPORT_SYMBOL(fb_find_mode); ++EXPORT_SYMBOL(fb_destroy_modelist); +diff --git a/drivers/video/vesafb-thread.c b/drivers/video/vesafb-thread.c +new file mode 100644 +index 0000000..543e202 --- /dev/null -+++ linux-2.6.17/drivers/video/vesafb-thread.c -@@ -0,0 +1,727 @@ ++++ b/drivers/video/vesafb-thread.c +@@ -0,0 +1,751 @@ +/* + * Framebuffer driver for VBE 2.0+ compliant graphic boards. + * Kernel thread and vm86 routines. @@ -532,8 +558,6 @@ + * + */ + -+#include -+#include +#include +#include +#include @@ -542,6 +566,7 @@ +#include +#include +#include ++#include +#include +#include +#include