Framebuffer horizontal underscan patch
Malcolm <[email protected]> Sun, 20 Jul 2008 16:15:44 +0100
| Newsgroups | gmane.linux.ports.game-cube.devel |
|---|---|
| Message-ID | <[email protected]> |
On my widescreen LCD TV, there are 19 pixel black borders on either side when using wii linux. This patch gets rid of them. It's another hack, ideally fbset would let you adjust the left and right margins. patch also includes previous vertical overscan changes. -- Malcolm Parsons ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gc-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gc-linux-devel
gcnfb.patch
(text/x-diff, 3.4 KB)
Index: drivers/video/gcnfb.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/drivers/video/gcnfb.c,v
retrieving revision 1.19
diff -u -p -r1.19 gcnfb.c
--- drivers/video/gcnfb.c 27 Mar 2008 22:35:42 -0000 1.19
+++ drivers/video/gcnfb.c 20 Jul 2008 15:11:54 -0000
@@ -39,7 +39,7 @@
"Todd Jeffreys <[email protected]>, " \
"Albert Herranz"
-static char vifb_driver_version[] = "1.0i";
+static char vifb_driver_version[] = "1.0j";
#define drv_printk(level, format, arg...) \
printk(level DRV_MODULE_NAME ": " format , ## arg)
@@ -104,22 +104,22 @@ struct vi_video_mode {
};
static const u32 vi_Mode640X480NtscYUV16[32] = {
- 0x0F060001, 0x476901AD, 0x02EA5140, 0x00030018,
+ 0x0F060001, 0x476901AD, 0x031047C0, 0x00030018,
0x00020019, 0x410C410C, 0x40ED40ED, 0x00435A4E,
0x00000000, 0x00435A4E, 0x00000000, 0x00000000,
0x110701AE, 0x10010001, 0x00010001, 0x00010001,
- 0x00000000, 0x00000000, 0x28500100, 0x1AE771F0,
+ 0x00000000, 0x00000000, 0x285010f2, 0x1AE771F0,
0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF,
0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000,
0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF
};
static const u32 vi_Mode640x480NtscProgressiveYUV16[32] = {
- 0x1e0c0005, 0x476901ad, 0x02ea5140, 0x00060030,
+ 0x1e0c0005, 0x476901ad, 0x031047C0, 0x00060030,
0x00060030, 0x81d881d8, 0x81d881d8, 0x10000000,
0x00000000, 0x00000000, 0x00000000, 0x037702b6,
0x90010001, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x28280100, 0x1ae771f0,
+ 0x00000000, 0x00000000, 0x282810f2, 0x1ae771f0,
0x0db4a574, 0x00c1188e, 0xc4c0cbe2, 0xfcecdecf,
0x13130f08, 0x00080c0f, 0x00ff0000, 0x00010001,
0x02800000, 0x000000ff, 0x00ff00ff, 0x00ff00ff,
@@ -137,11 +137,11 @@ static const u32 vi_Mode640X576Pal50YUV1
};
static const u32 vi_Mode640X480Pal60YUV16[32] = {
- 0x0F060001, 0x476901AD, 0x02EA5140, 0x00030018,
+ 0x0F060001, 0x476901AD, 0x031047C0, 0x00030018,
0x00020019, 0x410C410C, 0x40ED40ED, 0x0066D480,
0x00000000, 0x0066D980, 0x00000000, 0x00C9010F,
0x910701AE, 0x90010001, 0x00010001, 0x00010001,
- 0x00000000, 0x00000000, 0x28500100, 0x1AE771F0,
+ 0x00000000, 0x00000000, 0x285010f2, 0x1AE771F0,
0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF,
0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000,
0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF
@@ -762,7 +762,7 @@ static int vifb_do_probe(struct device *
vi_guess_mode(ctl);
info->var.xres = vi_current_video_mode->width;
- info->var.yres = vi_current_video_mode->height;
+ info->var.yres = vi_current_video_mode->height - 29;
/* enable non-interlaced if it supports progressive */
if (vi_can_do_progressive(ctl))
@@ -784,7 +784,7 @@ static int vifb_do_probe(struct device *
(void *)info->fix.smem_start);
}
- info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
+ info->screen_base = ioremap(info->fix.smem_start + 16 * info->fix.line_length, info->fix.smem_len - 29 * info->fix.line_length);
if (!info->screen_base) {
drv_printk(KERN_ERR,
"failed to ioremap video memory at %p (%dk)\n",
@@ -838,7 +838,7 @@ static int vifb_do_probe(struct device *
info->var.left_margin = (info->var.xres / 8) & 0xf8;
info->var.hsync_len = (info->var.xres / 8) & 0xf8;
- /* we support ony 16 bits per pixel */
+ /* we support only 16 bits per pixel */
info->var.red.offset = 11;
info->var.red.length = 5;
info->var.green.offset = 5;