From 7ddb194822b5b84e7396ae983974c5ec9ca1f132 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 11 Oct 2007 15:45:13 +0000 Subject: linux-rp: update 2.6.23-rc4 to 2.6.23 (non-default as c7x0, akita, zylonite, hx2000 breaks) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2861 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch | 2590 ++++++++++++++++++++ 1 file changed, 2590 insertions(+) create mode 100644 meta/packages/linux/linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch (limited to 'meta/packages/linux/linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch') diff --git a/meta/packages/linux/linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch b/meta/packages/linux/linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch new file mode 100644 index 0000000000..711375114f --- /dev/null +++ b/meta/packages/linux/linux-rp-2.6.23/uvesafb-0.1-rc3-2.6.22.patch @@ -0,0 +1,2590 @@ +--- + Documentation/fb/uvesafb.txt | 188 +++ + drivers/video/Kconfig | 18 + drivers/video/Makefile | 1 + drivers/video/modedb.c | 28 + drivers/video/uvesafb.c | 2058 +++++++++++++++++++++++++++++++++++++++++++ + include/linux/connector.h | 7 + include/video/Kbuild | 2 + include/video/uvesafb.h | 193 ++++ + 8 files changed, 2479 insertions(+), 16 deletions(-) + +Index: linux-2.6.22/Documentation/fb/uvesafb.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.22/Documentation/fb/uvesafb.txt 2007-08-28 21:56:34.000000000 +0100 +@@ -0,0 +1,188 @@ ++ ++uvesafb - A Generic Driver for VBE2+ compliant video cards ++========================================================== ++ ++1. Requirements ++--------------- ++ ++uvesafb should work with any video card that has a Video BIOS compliant ++with the VBE 2.0 standard. ++ ++Unlike other drivers, uvesafb makes use of a userspace helper called ++v86d. v86d is used to run the x86 Video BIOS code in a simulated and ++controlled environment. This allows uvesafb to function on arches other ++than x86. Check the v86d documentation for a list of currently supported ++arches. ++ ++v86d source code can be downloaded from the following website: ++ http://dev.gentoo.org/~spock/projects/uvesafb ++ ++Please refer to the v86d documentation for detailed configuration and ++installation instructions. ++ ++Note that the v86d userspace helper has to be available at all times in ++order for uvesafb to work properly. If you want to use uvesafb during ++early boot, you will have to include v86d into an initramfs image, and ++either compile it into the kernel or use it as an initrd. ++ ++2. Caveats and limitations ++-------------------------- ++ ++uvesafb is a _generic_ driver which supports a wide variety of video ++cards, but which is ultimately limited by the Video BIOS interface. ++The most important limitations are: ++ ++- Lack of any type of acceleration. ++- A strict and limited set of supported video modes. Often the native ++ or most optimal resolution/refresh rate for your setup will not work ++ with uvesafb, simply because the Video BIOS doesn't support the ++ video mode you want to use. This can be especially painful with ++ widescreen panels, where native video modes don't have the 4:3 aspect ++ ratio, which is what most BIOS-es are limited to. ++- Adjusting the refresh rate is only possible with a VBE 3.0 compliant ++ Video BIOS. Note that many nVidia Video BIOS-es claim to be VBE 3.0 ++ compliant, while they simply ignore any refresh rate settings. ++ ++3. Configuration ++---------------- ++ ++uvesafb can be compiled either as a module, or directly into the kernel. ++In both cases it supports the same set of configuration options, which ++are either given on the kernel command line or as module parameters, e.g.: ++ ++ video=uvesafb:1024x768-32,mtrr:3,ywrap (compiled into the kernel) ++ ++ # modprobe uvesafb mode=1024x768-32 mtrr=3 scroll=ywrap (module) ++ ++Accepted options: ++ ++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. Available on x86 only. ++ ++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. ++ Available on x86 only. ++ ++redraw Scroll by redrawing the affected part of the screen, this ++ is the safe (and slow) default. ++ ++(If you're using uvesafb as a module, the above three options are ++ used a parameter of the scroll option, e.g. scroll=ypan.) ++ ++vgapal Use the standard VGA registers for palette changes. ++ ++pmipal Use the protected mode interface for palette changes. ++ This is the default if the protected mode interface is ++ available. Available on x86 only. ++ ++mtrr:n Setup memory type range registers for the 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". ++... ++mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining ++... ++ ++nomtrr Do not use memory type range registers. ++ ++vremap:n ++ Remap 'n' MiB of video RAM. If 0 or not specified, remap memory ++ according to video mode. ++ ++vtotal:n ++ If the video BIOS of your card incorrectly determines the total ++ amount of video RAM, use this option to override the BIOS (in MiB). ++ ++ The mode you want to set, in the standard modedb format. Refer to ++ modedb.txt for a detailed description. When uvesafb is compiled as ++ a module, the mode string should be provided as a value of the ++ 'mode' option. ++ ++vbemode:x ++ Force the use of VBE mode x. The mode will only be set if it's ++ found in the VBE-provided list of supported modes. ++ NOTE: The mode number 'x' should be specified in VESA mode number ++ notation, not the Linux kernel one (eg. 257 instead of 769). ++ HINT: If you use this option because normal parameter does ++ not work for you and you use a X server, you'll probably want to ++ set the 'nocrtc' option to ensure that the video mode is properly ++ restored after console <-> X switches. ++ ++nocrtc Do not use CRTC timings while setting the video mode. This option ++ has any effect only if the Video BIOS is VBE 3.0 compliant. Use it ++ if you have problems with modes set the standard way. Note that ++ using this option implies that any refresh rate adjustments will ++ be ignored and the refresh rate will stay at your BIOS default (60 Hz). ++ ++noedid Do not try to fetch and use EDID-provided modes. ++ ++noblank Disable hardware blanking. ++ ++v86d:path ++ Set path to the v86d executable. This option is only available as ++ a module parameter, and not as a part of the video= string. If you ++ need to use it and have uvesafb built into the kernel, use ++ uvesafb.v86d="path". ++ ++Additionally, the following parameters may be provided. They all override the ++EDID-provided values and BIOS defaults. Refer to your monitor's specs to get ++the correct values for maxhf, maxvf and maxclk for your hardware. ++ ++maxhf:n Maximum horizontal frequency (in kHz). ++maxvf:n Maximum vertical frequency (in Hz). ++maxclk:n Maximum pixel clock (in MHz). ++ ++4. The sysfs interface ++---------------------- ++ ++uvesafb provides several sysfs nodes for configurable parameters and ++additional information. ++ ++Driver attributes: ++ ++/sys/bus/platform/drivers/uvesafb ++ - v86d (default: /sbin/v86d) ++ Path to the v86d executable. v86d is started by uvesafb ++ if an instance of the daemon isn't already running. ++ ++Device attributes: ++ ++/sys/bus/platform/drivers/uvesafb/uvesafb.0 ++ - nocrtc ++ Use the default refresh rate (60 Hz) if set to 1. ++ ++ - oem_product_name ++ - oem_product_rev ++ - oem_string ++ - oem_vendor ++ Information about the card and its maker. ++ ++ - vbe_modes ++ A list of video modes supported by the Video BIOS along with their ++ VBE mode numbers in hex. ++ ++ - vbe_version ++ A BCD value indicating the implemented VBE standard. ++ ++5. Miscellaneous ++---------------- ++ ++Uvesafb will set a video mode with the default refresh rate and timings ++from the Video BIOS if you set pixclock to 0 in fb_var_screeninfo. ++ ++ ++-- ++ Michal Januszewski ++ Last updated: 2007-06-16 ++ ++ Documentation of the uvesafb options is loosely based on vesafb.txt. ++ +Index: linux-2.6.22/drivers/video/Kconfig +=================================================================== +--- linux-2.6.22.orig/drivers/video/Kconfig 2007-08-28 21:56:33.000000000 +0100 ++++ linux-2.6.22/drivers/video/Kconfig 2007-08-28 21:56:34.000000000 +0100 +@@ -592,6 +592,24 @@ config FB_TGA + + Say Y if you have one of those. + ++config FB_UVESA ++ tristate "Userspace VESA VGA graphics support" ++ depends on FB && CONNECTOR ++ select FB_CFB_FILLRECT ++ select FB_CFB_COPYAREA ++ select FB_CFB_IMAGEBLIT ++ select FB_MODE_HELPERS ++ help ++ This is the frame buffer driver for generic VBE 2.0 compliant ++ graphic cards. It can also take advantage of VBE 3.0 features, ++ such as refresh rate adjustment. ++ ++ This driver generally provides more features than vesafb but ++ requires a userspace helper application called 'v86d'. See ++ for more information. ++ ++ If unsure, say N. ++ + config FB_VESA + bool "VESA VGA graphics support" + depends on (FB = y) && X86 +Index: linux-2.6.22/drivers/video/Makefile +=================================================================== +--- linux-2.6.22.orig/drivers/video/Makefile 2007-08-28 21:56:33.000000000 +0100 ++++ linux-2.6.22/drivers/video/Makefile 2007-08-28 21:56:34.000000000 +0100 +@@ -116,6 +116,7 @@ obj-$(CONFIG_FB_XILINX) += xil + obj-$(CONFIG_FB_OMAP) += omap/ + + # Platform or fallback drivers go here ++obj-$(CONFIG_FB_UVESA) += uvesafb.o + obj-$(CONFIG_FB_VESA) += vesafb.o + obj-$(CONFIG_FB_IMAC) += imacfb.o + obj-$(CONFIG_FB_VGA16) += vga16fb.o +Index: linux-2.6.22/drivers/video/modedb.c +=================================================================== +--- linux-2.6.22.orig/drivers/video/modedb.c 2007-08-28 21:54:13.000000000 +0100 ++++ linux-2.6.22/drivers/video/modedb.c 2007-08-28 21:56:34.000000000 +0100 +@@ -606,26 +606,29 @@ done: + DPRINTK("Trying specified video mode%s %ix%i\n", + refresh_specified ? "" : " (ignoring refresh rate)", xres, yres); + +- diff = refresh; ++ if (!refresh_specified) ++ diff = 0; ++ else ++ diff = refresh; ++ + best = -1; + for (i = 0; i < dbsize; i++) { +- if (name_matches(db[i], name, namelen) || +- (res_specified && res_matches(db[i], xres, yres))) { +- if(!fb_try_mode(var, info, &db[i], bpp)) { +- if(!refresh_specified || db[i].refresh == refresh) +- return 1; +- else { +- if(diff > abs(db[i].refresh - refresh)) { +- diff = abs(db[i].refresh - refresh); +- best = i; +- } ++ if ((name_matches(db[i], name, namelen) || ++ (res_specified && res_matches(db[i], xres, yres))) && ++ !fb_try_mode(var, info, &db[i], bpp)) { ++ if (refresh_specified && db[i].refresh == refresh) { ++ return 1; ++ } else { ++ if (diff < db[i].refresh) { ++ diff = db[i].refresh; ++ best = i; + } + } + } + } + if (best != -1) { + fb_try_mode(var, info, &db[best], bpp); +- return 2; ++ return (refresh_specified) ? 2 : 1; + } + + diff = xres + yres; +@@ -938,6 +941,7 @@ void fb_destroy_modelist(struct list_hea + kfree(pos); + } + } ++EXPORT_SYMBOL_GPL(fb_destroy_modelist); + + /** + * fb_videomode_to_modelist: convert mode array to mode list +Index: linux-2.6.22/drivers/video/uvesafb.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.22/drivers/video/uvesafb.c 2007-08-28 21:56:34.000000000 +0100 +@@ -0,0 +1,2058 @@ ++/* ++ * A framebuffer driver for VBE 2.0+ compliant video cards ++ * ++ * (c) 2007 Michal Januszewski ++ * Loosely based upon the vesafb driver. ++ * ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include