diff -urN linux-2.4.34.orig/Documentation/fb/neofb.txt linux-2.4.34/Documentation/fb/neofb.txt --- linux-2.4.34.orig/Documentation/fb/neofb.txt 1969-12-31 16:00:00.000000000 -0800 +++ linux-2.4.34/Documentation/fb/neofb.txt 2003-03-02 20:27:07.000000000 -0800 @@ -0,0 +1,27 @@ +the neofb framebuffer driver supports the following Neomagic chipsets: + +NM2070: "MagicGraph 128" +NM2090: "MagicGraph 128V" +NM2093: "MagicGraph 128ZV" +NM2097: "MagicGraph 128ZV+" +NM2160: "MagicGraph 128XD" +NM2200: "MagicGraph 256AV" +NM2230: "MagicGraph 256AV+" +NM2360: "MagicGraph 256ZX" +NM2380: "MagicGraph 256XL+" + +with the following options: + +disabled Disable this driver's initialization. +internal Enable output on internal LCD Display. +external Enable output on external CRT. +nostretch Disable stretching of modes smaller than LCD. +nopciburst Disable PCI burst mode. +libretto Force Libretto 100/110 800x480 LCD. +picturebook Force Picturebook 1024x480 LCD. + +it's referred to as 'neo' at the boot prompt: + video=neo:picturebook + +as a module: + modprobe neofb picturebook=1 diff -urN linux-2.4.34.orig/drivers/video/neofb.c linux-2.4.34/drivers/video/neofb.c --- linux-2.4.34.orig/drivers/video/neofb.c 2003-03-12 02:15:04.000000000 -0800 +++ linux-2.4.34/drivers/video/neofb.c 2003-03-12 02:21:37.000000000 -0800 @@ -83,6 +83,8 @@ static int external = 0; static int nostretch = 0; static int nopciburst = 0; +static int libretto = 0; +static int picturebook = 0; #ifdef MODULE @@ -100,6 +102,10 @@ MODULE_PARM_DESC(nostretch, "Disable stretching of modes smaller than LCD."); MODULE_PARM(nopciburst, "i"); MODULE_PARM_DESC(nopciburst, "Disable PCI burst mode."); +MODULE_PARM(libretto, "i"); +MODULE_PARM_DESC(libretto, "Force Libretto 100/110 800x480 LCD."); +MODULE_PARM(picturebook, "i"); +MODULE_PARM_DESC(picturebook, "Force Picturebook 1024x480 LCD."); #endif @@ -1093,11 +1099,11 @@ mode_ok = 1; break; case 1024: - if (var->yres == 768) + if (var->yres == (info->picturebook ? 480 : 768)) mode_ok = 1; break; case 800: - if (var->yres == 600) + if (var->yres == (info->libretto ? 480 : 600)) mode_ok = 1; break; case 640: @@ -1782,6 +1788,24 @@ vmode: FB_VMODE_NONINTERLACED }; +static struct fb_var_screeninfo __devinitdata neofb_var800x480x8 = { + .accel_flags = FB_ACCELF_TEXT, + .xres = 800, + .yres = 480, + .xres_virtual = 800, + .yres_virtual = 30000, + .bits_per_pixel = 8, + .pixclock = 25000, + .left_margin = 88, + .right_margin = 40, + .upper_margin = 23, + .lower_margin = 1, + .hsync_len = 128, + .vsync_len = 4, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .vmode = FB_VMODE_NONINTERLACED +}; + static struct fb_var_screeninfo __devinitdata neofb_var1024x768x8 = { accel_flags: FB_ACCELF_TEXT, xres: 1024, @@ -1800,6 +1824,24 @@ vmode: FB_VMODE_NONINTERLACED }; +static struct fb_var_screeninfo __devinitdata neofb_var1024x480x8 = { + accel_flags: FB_ACCELF_TEXT, + xres: 1024, + yres: 480, + xres_virtual: 1024, + yres_virtual: 30000, + bits_per_pixel: 8, + pixclock: 15385, + left_margin: 168, + right_margin: 8, + upper_margin: 32, + lower_margin: 11, + hsync_len: 144, + vsync_len: 2, + sync: FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + vmode: FB_VMODE_NONINTERLACED +}; + #ifdef NOT_DONE static struct fb_var_screeninfo __devinitdata neofb_var1280x1024x8 = { accel_flags: FB_ACCELF_TEXT, @@ -1961,13 +2003,13 @@ break; case 0x01: info->NeoPanelWidth = 800; - info->NeoPanelHeight = 600; - neofb_var = &neofb_var800x600x8; + info->NeoPanelHeight = info->libretto ? 480 : 600; + neofb_var = info->libretto ? &neofb_var800x480x8 : &neofb_var800x600x8; break; case 0x02: info->NeoPanelWidth = 1024; - info->NeoPanelHeight = 768; - neofb_var = &neofb_var1024x768x8; + info->NeoPanelHeight = info->picturebook ? 480 : 768; + neofb_var = info->picturebook ? &neofb_var1024x480x8 : &neofb_var1024x768x8; break; case 0x03: /* 1280x1024 panel support needs to be added */ @@ -1977,7 +2019,7 @@ neofb_var = &neofb_var1280x1024x8; break; #else - printk (KERN_ERR "neofb: Only 640x480, 800x600 and 1024x768 panels are currently supported\n"); + printk (KERN_ERR "neofb: Only 640x480, 800x600/480 and 1024x768/480 panels are currently supported\n"); return -1; #endif default: @@ -2103,6 +2145,8 @@ info->pci_burst = !nopciburst; info->lcd_stretch = !nostretch; + info->libretto = libretto; + info->picturebook = picturebook; if (!internal && !external) { @@ -2377,6 +2421,10 @@ nostretch = 1; if (!strncmp(this_opt, "nopciburst", 10)) nopciburst = 1; + if (!strncmp(this_opt, "libretto", 8)) + libretto = 1; + if (!strncmp(this_opt, "picturebook", 11)) + picturebook = 1; } return 0; diff -urN linux-2.4.34.orig/drivers/video/neofb.h linux-2.4.34/drivers/video/neofb.h --- linux-2.4.34.orig/drivers/video/neofb.h 2002-08-02 17:39:45.000000000 -0700 +++ linux-2.4.34/drivers/video/neofb.h 2003-03-10 22:28:39.000000000 -0800 @@ -154,6 +154,8 @@ int lcd_stretch; int internal_display; int external_display; + int libretto; + int picturebook; struct { u16 red, green, blue, transp;