__s32 BSP_disp_close(void) { __u32 sel = 0; for(sel = 0; sel<2; sel++) { Image_close(sel); if(gdisp.scaler[sel].status & SCALER_USED) { Scaler_close(sel); } if(gdisp.screen[sel].lcdc_status & LCDC_TCON0_USED) { TCON0_close(sel); LCDC_close(sel); } else if(gdisp.screen[sel].lcdc_status & LCDC_TCON1_USED) { TCON1_close(sel); LCDC_close(sel); } else if(gdisp.screen[sel].status & (TV_ON | VGA_ON)) { TVE_close(sel); } } gdisp.screen[sel].status &= (IMAGE_USED_MASK & LCD_OFF & TV_OFF & VGA_OFF & HDMI_OFF); gdisp.screen[sel].lcdc_status &= (LCDC_TCON0_USED_MASK & LCDC_TCON1_USED_MASK); return DIS_SUCCESS; }
__s32 BSP_disp_close(void) { __u32 sel = 0; if (!disp_initialised) return DIS_SUCCESS; for (sel = 0; sel < 2; sel++) { Image_close(sel); if (gdisp.scaler[sel].status & SCALER_USED) Scaler_close(sel); if (gdisp.screen[sel].lcdc_status & LCDC_TCON0_USED) { TCON0_close(sel); LCDC_close(sel); } else if (gdisp.screen[sel].lcdc_status & LCDC_TCON1_USED) { TCON1_close(sel); LCDC_close(sel); } else if (gdisp.screen[sel].status & (TV_ON | VGA_ON)) { TVE_close(sel); } } for (sel = 0; sel < 2; sel++) { gdisp.screen[sel].status &= ~(IMAGE_USED | LCD_ON | TV_ON | VGA_ON | HDMI_ON); gdisp.screen[sel].lcdc_status &= ~(LCDC_TCON0_USED & LCDC_TCON1_USED); } return DIS_SUCCESS; }
void TCON_close(__u32 sel) { if(gpanel_info[sel].tcon_index == 0) { TCON0_close(sel); gdisp.screen[sel].lcdc_status &= LCDC_TCON0_USED_MASK; } else { TCON1_close(sel); gdisp.screen[sel].lcdc_status &= LCDC_TCON1_USED_MASK; } }
void TCON_close(__u32 sel) { if (gpanel_info[sel].lcd_if == 3) LCD_LVDS_close(sel); if (gpanel_info[sel].tcon_index == 0) { TCON0_close(sel); gdisp.screen[sel].lcdc_status &= ~LCDC_TCON0_USED; } else { TCON1_close(sel); gdisp.screen[sel].lcdc_status &= ~LCDC_TCON1_USED; } }
__s32 LCDC_init(__u32 sel) { TCON0_close(sel); TCON1_close(sel); LCDC_enable_int(sel, LCDC_VBI_LCD_EN); LCDC_enable_int(sel, LCDC_VBI_HD_EN); LCDC_enable_int(sel, LCDC_LTI_LCD_EN); LCDC_enable_int(sel, LCDC_LTI_HD_EN); TCON0_select_src(sel, LCDC_SRC_DE1); TCON1_select_src(sel, LCDC_SRC_DE1); LCDC_open(sel); return 0; }