Lines Matching full:lcd

3  *	Au1200 LCD Driver.
53 #define DRIVER_DESC "LCD controller driver for AU1200 processors"
160 /* LCD controller restrictions */
179 static struct au1200_lcd *lcd = (struct au1200_lcd *) AU1200_LCD_ADDR; variable
349 /* List of panels known to work with the AU1200 LCD controller.
710 winctrl0 = lcd->window[plane].winctrl0; in au1200_setlocation()
711 winctrl1 = lcd->window[plane].winctrl1; in au1200_setlocation()
733 fb_offset += (((0 - xpos) * winbpp(lcd->window[plane].winctrl1))/8); in au1200_setlocation()
758 winenable = lcd->winenable & (1 << plane); in au1200_setlocation()
760 lcd->winenable &= ~(1 << plane); in au1200_setlocation()
761 lcd->window[plane].winctrl0 = winctrl0; in au1200_setlocation()
762 lcd->window[plane].winctrl1 = winctrl1; in au1200_setlocation()
763 lcd->window[plane].winbuf0 = in au1200_setlocation()
764 lcd->window[plane].winbuf1 = fbdev->fb_phys; in au1200_setlocation()
765 lcd->window[plane].winbufctrl = 0; /* select winbuf0 */ in au1200_setlocation()
766 lcd->winenable |= winenable; in au1200_setlocation()
776 * Perform global setup/init of LCD controller in au1200_setpanel()
781 winenable = lcd->winenable; in au1200_setpanel()
782 lcd->winenable = 0; in au1200_setpanel()
787 if (lcd->screen & LCD_SCREEN_SEN) { in au1200_setpanel()
789 lcd->intstatus = LCD_INT_SS; in au1200_setpanel()
790 while ((lcd->intstatus & LCD_INT_SS) == 0) in au1200_setpanel()
793 lcd->screen &= ~LCD_SCREEN_SEN; /*disable the controller*/ in au1200_setpanel()
796 lcd->intstatus = lcd->intstatus; /*clear interrupts*/ in au1200_setpanel()
799 } while ((lcd->intstatus & LCD_INT_SD) == 0); in au1200_setpanel()
819 * Setup clocking if internal LCD clock source (assumes sys_auxpll valid) in au1200_setpanel()
839 lcd->screen = panel->mode_screen; in au1200_setpanel()
840 lcd->horztiming = panel->mode_horztiming; in au1200_setpanel()
841 lcd->verttiming = panel->mode_verttiming; in au1200_setpanel()
842 lcd->clkcontrol = panel->mode_clkcontrol; in au1200_setpanel()
843 lcd->pwmdiv = panel->mode_pwmdiv; in au1200_setpanel()
844 lcd->pwmhi = panel->mode_pwmhi; in au1200_setpanel()
845 lcd->outmask = panel->mode_outmask; in au1200_setpanel()
846 lcd->fifoctrl = panel->mode_fifoctrl; in au1200_setpanel()
857 lcd->winenable = winenable; in au1200_setpanel()
862 lcd->screen |= LCD_SCREEN_SEN; in au1200_setpanel()
870 lcd->intenable = 0; in au1200_setpanel()
871 lcd->intstatus = ~0; in au1200_setpanel()
872 lcd->backcolor = win->mode_backcolor; in au1200_setpanel()
875 lcd->colorkey = win->mode_colorkey; in au1200_setpanel()
876 lcd->colorkeymsk = win->mode_colorkeymsk; in au1200_setpanel()
879 lcd->hwc.cursorctrl = 0; in au1200_setpanel()
880 lcd->hwc.cursorpos = 0; in au1200_setpanel()
881 lcd->hwc.cursorcolor0 = 0; in au1200_setpanel()
882 lcd->hwc.cursorcolor1 = 0; in au1200_setpanel()
883 lcd->hwc.cursorcolor2 = 0; in au1200_setpanel()
884 lcd->hwc.cursorcolor3 = 0; in au1200_setpanel()
889 D(lcd->screen); in au1200_setpanel()
890 D(lcd->horztiming); in au1200_setpanel()
891 D(lcd->verttiming); in au1200_setpanel()
892 D(lcd->clkcontrol); in au1200_setpanel()
893 D(lcd->pwmdiv); in au1200_setpanel()
894 D(lcd->pwmhi); in au1200_setpanel()
895 D(lcd->outmask); in au1200_setpanel()
896 D(lcd->fifoctrl); in au1200_setpanel()
897 D(lcd->window[0].winctrl0); in au1200_setpanel()
898 D(lcd->window[0].winctrl1); in au1200_setpanel()
899 D(lcd->window[0].winctrl2); in au1200_setpanel()
900 D(lcd->window[0].winbuf0); in au1200_setpanel()
901 D(lcd->window[0].winbuf1); in au1200_setpanel()
902 D(lcd->window[0].winbufctrl); in au1200_setpanel()
903 D(lcd->window[1].winctrl0); in au1200_setpanel()
904 D(lcd->window[1].winctrl1); in au1200_setpanel()
905 D(lcd->window[1].winctrl2); in au1200_setpanel()
906 D(lcd->window[1].winbuf0); in au1200_setpanel()
907 D(lcd->window[1].winbuf1); in au1200_setpanel()
908 D(lcd->window[1].winbufctrl); in au1200_setpanel()
909 D(lcd->window[2].winctrl0); in au1200_setpanel()
910 D(lcd->window[2].winctrl1); in au1200_setpanel()
911 D(lcd->window[2].winctrl2); in au1200_setpanel()
912 D(lcd->window[2].winbuf0); in au1200_setpanel()
913 D(lcd->window[2].winbuf1); in au1200_setpanel()
914 D(lcd->window[2].winbufctrl); in au1200_setpanel()
915 D(lcd->window[3].winctrl0); in au1200_setpanel()
916 D(lcd->window[3].winctrl1); in au1200_setpanel()
917 D(lcd->window[3].winctrl2); in au1200_setpanel()
918 D(lcd->window[3].winbuf0); in au1200_setpanel()
919 D(lcd->window[3].winbuf1); in au1200_setpanel()
920 D(lcd->window[3].winbufctrl); in au1200_setpanel()
921 D(lcd->winenable); in au1200_setpanel()
922 D(lcd->intenable); in au1200_setpanel()
923 D(lcd->intstatus); in au1200_setpanel()
924 D(lcd->backcolor); in au1200_setpanel()
925 D(lcd->winenable); in au1200_setpanel()
926 D(lcd->colorkey); in au1200_setpanel()
927 D(lcd->colorkeymsk); in au1200_setpanel()
928 D(lcd->hwc.cursorctrl); in au1200_setpanel()
929 D(lcd->hwc.cursorpos); in au1200_setpanel()
930 D(lcd->hwc.cursorcolor0); in au1200_setpanel()
931 D(lcd->hwc.cursorcolor1); in au1200_setpanel()
932 D(lcd->hwc.cursorcolor2); in au1200_setpanel()
933 D(lcd->hwc.cursorcolor3); in au1200_setpanel()
941 lcd->window[plane].winctrl1 = ( 0 in au1200_setmode()
948 lcd->window[plane].winctrl2 = ( 0 in au1200_setmode()
955 lcd->winenable |= win->w[plane].mode_winenable; in au1200_setmode()
1045 /* Make sure that the mode respect all LCD controller and in au1200fb_fb_check_var()
1064 /* The max LCD clock is fixed to 48MHz (value of AUX_CLK). The pixel in au1200fb_fb_check_var()
1140 * Set color in LCD palette.
1145 volatile u32 *palette = lcd->palette; in au1200fb_fb_setcolreg()
1248 lcd->backcolor = pdata->backcolor; in set_global()
1256 divider = (lcd->pwmdiv & 0x3FFFF) + 1; in set_global()
1258 lcd->pwmhi &= 0xFFFF; in set_global()
1259 lcd->pwmhi |= (hi1 << 16); in set_global()
1263 lcd->colorkey = pdata->colorkey; in set_global()
1266 lcd->colorkeymsk = pdata->mask; in set_global()
1274 pdata->xsize = ((lcd->screen & LCD_SCREEN_SX) >> 19) + 1; in get_global()
1275 pdata->ysize = ((lcd->screen & LCD_SCREEN_SY) >> 8) + 1; in get_global()
1277 pdata->backcolor = lcd->backcolor; in get_global()
1278 pdata->colorkey = lcd->colorkey; in get_global()
1279 pdata->mask = lcd->colorkeymsk; in get_global()
1282 hi1 = (lcd->pwmhi >> 16) + 1; in get_global()
1283 divider = (lcd->pwmdiv & 0x3FFFF) + 1; in get_global()
1295 val = lcd->window[plane].winctrl0 & ~(LCD_WINCTRL0_OX | in set_window()
1299 lcd->window[plane].winctrl0 = val; in set_window()
1302 val = lcd->window[plane].winctrl0 & ~(LCD_WINCTRL0_A); in set_window()
1304 lcd->window[plane].winctrl0 = val; in set_window()
1307 val = lcd->window[plane].winctrl0 & ~(LCD_WINCTRL0_AEN); in set_window()
1309 lcd->window[plane].winctrl0 = val; in set_window()
1314 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_PRI); in set_window()
1316 lcd->window[plane].winctrl1 = val; in set_window()
1319 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_PIPE); in set_window()
1321 lcd->window[plane].winctrl1 = val; in set_window()
1324 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_FRM); in set_window()
1326 lcd->window[plane].winctrl1 = val; in set_window()
1329 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_CCO); in set_window()
1331 lcd->window[plane].winctrl1 = val; in set_window()
1334 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_PO); in set_window()
1336 lcd->window[plane].winctrl1 = val; in set_window()
1339 val = lcd->window[plane].winctrl1 & ~(LCD_WINCTRL1_SZX | in set_window()
1343 lcd->window[plane].winctrl1 = val; in set_window()
1346 val = lcd->window[plane].winctrl2 & ~(LCD_WINCTRL2_BX); in set_window()
1348 lcd->window[plane].winctrl2 = val; in set_window()
1353 val = lcd->window[plane].winctrl2 & ~(LCD_WINCTRL2_CKMODE); in set_window()
1355 lcd->window[plane].winctrl2 = val; in set_window()
1358 val = lcd->window[plane].winctrl2 & ~(LCD_WINCTRL2_DBM); in set_window()
1360 lcd->window[plane].winctrl2 = val; in set_window()
1363 val = lcd->window[plane].winctrl2 & ~(LCD_WINCTRL2_RAM); in set_window()
1365 lcd->window[plane].winctrl2 = val; in set_window()
1371 val = lcd->window[plane].winctrl2 & ~(LCD_WINCTRL2_SCX | in set_window()
1375 lcd->window[plane].winctrl2 = val; in set_window()
1379 val = lcd->winenable; in set_window()
1382 lcd->winenable = val; in set_window()
1391 pdata->xpos = (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OX) >> 21; in get_window()
1392 pdata->ypos = (lcd->window[plane].winctrl0 & LCD_WINCTRL0_OY) >> 10; in get_window()
1393 pdata->alpha_color = (lcd->window[plane].winctrl0 & LCD_WINCTRL0_A) >> 2; in get_window()
1394 pdata->alpha_mode = (lcd->window[plane].winctrl0 & LCD_WINCTRL0_AEN) >> 1; in get_window()
1397 pdata->priority = (lcd->window[plane].winctrl1& LCD_WINCTRL1_PRI) >> 30; in get_window()
1398 pdata->channel = (lcd->window[plane].winctrl1 & LCD_WINCTRL1_PIPE) >> 29; in get_window()
1399 pdata->buffer_format = (lcd->window[plane].winctrl1 & LCD_WINCTRL1_FRM) >> 25; in get_window()
1400 pdata->color_order = (lcd->window[plane].winctrl1 & LCD_WINCTRL1_CCO) >> 24; in get_window()
1401 pdata->pixel_order = (lcd->window[plane].winctrl1 & LCD_WINCTRL1_PO) >> 22; in get_window()
1402 pdata->xsize = ((lcd->window[plane].winctrl1 & LCD_WINCTRL1_SZX) >> 11) + 1; in get_window()
1403 pdata->ysize = (lcd->window[plane].winctrl1 & LCD_WINCTRL1_SZY) + 1; in get_window()
1406 pdata->colorkey_mode = (lcd->window[plane].winctrl2 & LCD_WINCTRL2_CKMODE) >> 24; in get_window()
1407 pdata->double_buffer_mode = (lcd->window[plane].winctrl2 & LCD_WINCTRL2_DBM) >> 23; in get_window()
1408 pdata->ram_array_mode = (lcd->window[plane].winctrl2 & LCD_WINCTRL2_RAM) >> 21; in get_window()
1410 pdata->enable = (lcd->winenable >> plane) & 1; in get_window()
1507 lcd->intstatus = lcd->intstatus; in au1200fb_handle_irq()
1515 /* AU1200 LCD device probe helpers */
1527 /* fixme: we're setting up LCD controller windows, so these dont give a in au1200fb_init_fbinfo()
1643 /* AU1200 LCD controller device driver */
1733 IRQF_SHARED, "lcd", (void *)dev); in au1200fb_drv_probe()
1798 lcd->outmask = 0; in au1200fb_drv_suspend()
1836 .name = "au1200-lcd",