From: Pete P. <pp...@us...> - 2002-04-18 00:02:07
|
Update of /cvsroot/linux-mips/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv31537/drivers/video Modified Files: Config.in Makefile au1100fb.c fbmem.c Log Message: Changed the PB1100 config name to AU1100 and updated the lcd driver and options parsing. Index: Config.in =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/video/Config.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Config.in 10 Apr 2002 01:10:11 -0000 1.17 +++ Config.in 18 Apr 2002 00:02:04 -0000 1.18 @@ -160,7 +160,7 @@ bool ' Use TFT Panel on Pb1100 ' CONFIG_PB1500_TFT fi if [ "$CONFIG_MIPS_PB1100" = "y" ]; then - bool ' Au1100 LCD Driver' CONFIG_FB_PB1100 + bool ' Au1100 LCD Driver' CONFIG_FB_AU1100 fi fi tristate ' ITE IT8181 framebuffer support' CONFIG_FB_IT8181 Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/video/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile 10 Apr 2002 01:10:11 -0000 1.14 +++ Makefile 18 Apr 2002 00:02:04 -0000 1.15 @@ -86,7 +86,7 @@ obj-$(CONFIG_FB_MAXINE) += maxinefb.o obj-$(CONFIG_FB_TX3912) += tx3912fb.o obj-$(CONFIG_FB_MQ200) += mq200fb.o -obj-$(CONFIG_FB_PB1100) += au1100fb.o fbgen.o +obj-$(CONFIG_FB_AU1100) += au1100fb.o fbgen.o subdir-$(CONFIG_FB_MATROX) += matrox ifeq ($(CONFIG_FB_MATROX),y) @@ -116,7 +116,6 @@ obj-$(CONFIG_FB_HIT) += hitfb.o fbgen.o obj-$(CONFIG_FB_E1355) += epson1355fb.o fbgen.o obj-$(CONFIG_FB_E1356) += epson1356fb.o -obj-$(CONFIG_FB_AU1100) += au1100lcd.o obj-$(CONFIG_FB_IT8181) += it8181fb.o fbgen.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o Index: au1100fb.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/video/au1100fb.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- au1100fb.c 16 Apr 2002 17:20:27 -0000 1.4 +++ au1100fb.c 18 Apr 2002 00:02:04 -0000 1.5 @@ -57,6 +57,14 @@ #include <video/fbcon-cfb8.h> #include <video/fbcon-cfb16.h> +/* + * Sanity check. If this is a new Au1100 based board, search for + * the PB1100 ifdefs to make sure you modify the code accordingly. + */ +#ifndef CONFIG_MIPS_PB1100 +error Unknown Au1100 board +#endif + #define CMAPSIZE 16 static int my_lcd_index; /* default is zero */ @@ -69,6 +77,7 @@ unsigned long fb_size; unsigned long fb_phys; int mmaped; + int nohwcursor; struct { unsigned red, green, blue, pad; } palette[256]; @@ -98,6 +107,8 @@ static int au1100fb_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg, int con, struct fb_info *info); +void au1100_nocursor(struct display *p, int mode, int xx, int yy){}; + static struct fb_ops au1100fb_ops = { owner: THIS_MODULE, fb_get_fix: fbgen_get_fix, @@ -142,7 +153,6 @@ fix->ywrapstep = 0; fix->xpanstep = 1; fix->ypanstep = 1; - //fix->line_length = par->line_length; fix->line_length = current_par.line_length; return 0; } @@ -303,20 +313,26 @@ switch (blank_mode) { case VESA_NO_BLANKING: /* turn on panel */ + //printk("turn on panel\n"); +#ifdef CONFIG_MIPS_PB1100 p_lcd_reg->lcd_control |= LCD_CONTROL_GO; - writew(readw(PB1500_G_CONTROL) | p_lcd->mode_backlight, - PB1500_G_CONTROL); + writew(readw(PB1100_G_CONTROL) | p_lcd->mode_backlight, + PB1100_G_CONTROL); au_sync(); +#endif break; case VESA_VSYNC_SUSPEND: case VESA_HSYNC_SUSPEND: case VESA_POWERDOWN: /* turn off panel */ + //printk("turn off panel\n"); +#ifdef CONFIG_MIPS_PB1100 p_lcd_reg->lcd_control &= ~LCD_CONTROL_GO; - writew(readw(PB1500_G_CONTROL) & ~p_lcd->mode_backlight, - PB1500_G_CONTROL); + writew(readw(PB1100_G_CONTROL) & ~p_lcd->mode_backlight, + PB1100_G_CONTROL); au_sync(); +#endif break; default: printk("Au1100fb: unknown blank mode %d\n", @@ -336,12 +352,16 @@ #ifdef FBCON_HAS_CFB8 case 8: disp->dispsw = &fbcon_cfb8; + if (fb_info.nohwcursor) + fbcon_cfb8.cursor = au1100_nocursor; break; #endif #ifdef FBCON_HAS_CFB16 case 16: disp->dispsw = &fbcon_cfb16; disp->dispsw_data = fb_info.fbcon_cmap16; + if (fb_info.nohwcursor) + fbcon_cfb16.cursor = au1100_nocursor; break; #endif default: @@ -454,10 +474,12 @@ p_lcd_reg->lcd_words = words - 1; p_lcd_reg->lcd_dmaaddr0 = fb_info.fb_phys; +#ifdef CONFIG_MIPS_PB1100 /* turn on panel */ - writew(readw(PB1500_G_CONTROL) | p_lcd->mode_backlight, - PB1500_G_CONTROL); + writew(readw(PB1100_G_CONTROL) | p_lcd->mode_backlight, + PB1100_G_CONTROL); p_lcd_reg->lcd_control |= LCD_CONTROL_GO; +#endif return 0; } @@ -583,20 +605,29 @@ { char* this_opt; int i; + int num_panels = sizeof(panels)/sizeof(struct known_lcd_panels); + if (!options || !*options) return; - this_opt=strtok(options, ","); - - /* Get the panel name, everything else if fixed */ - for (i=0; i<(sizeof(panels)/sizeof(struct known_lcd_panels)); i++) { - if (!strncmp(this_opt, panels[i].panel_name, - strlen(this_opt))) { - my_lcd_index = i; - break; + for(this_opt=strtok(options, ","); this_opt; + this_opt=strtok(NULL, ",")) { + if (!strncmp(this_opt, "panel:", 6)) { + /* Get the panel name, everything else if fixed */ + for (i=0; i<num_panels; i++) { + if (!strncmp(this_opt+6, panels[i].panel_name, + strlen(this_opt))) { + my_lcd_index = i; + break; + } + } } - } + else if (!strncmp(this_opt, "nohwcursor", 10)) { + printk("nohwcursor\n"); + fb_info.nohwcursor = 1; + } + } } @@ -615,5 +646,4 @@ MODULE_AUTHOR("Pete Popov <pp...@mv...>"); MODULE_DESCRIPTION("Au1100 LCD framebuffer device driver"); - #endif /* MODULE */ Index: fbmem.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/video/fbmem.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- fbmem.c 10 Apr 2002 01:10:12 -0000 1.21 +++ fbmem.c 18 Apr 2002 00:02:04 -0000 1.22 @@ -328,7 +328,7 @@ #ifdef CONFIG_FB_HPCSFB { "hpcsfb", hpcsfb_init, hpcsfb_setup }, #endif -#ifdef CONFIG_FB_PB1100 +#ifdef CONFIG_FB_AU1100 { "au1100fb", au1100fb_init, au1100fb_setup }, #endif |