s32 disp_lcd_event_proc(void *parg) #endif { u32 screen_id = (u32)parg; static u32 cntr=0; if(tcon_irq_query(screen_id,LCD_IRQ_TCON0_VBLK) || tcon_irq_query(screen_id,LCD_IRQ_TCON1_VBLK) || dsi_irq_query(screen_id,DSI_IRQ_VIDEO_VBLK)) { sync_event_proc(screen_id); } if(tcon_irq_query(screen_id,LCD_IRQ_TCON0_CNTR)) { sync_event_proc(screen_id); if(disp_al_lcd_tri_busy(screen_id)) { if(cntr>=1) { cntr = 0; } else { cntr++; } } else { cntr = 0; } if(cntr==0) { /* todo? cpu_isr */ disp_al_lcd_tri_start(screen_id); } } return OSAL_IRQ_RETURN; }
s32 bsp_disp_is_in_vb(void) { u32 num_screens, screen_id; s32 ret = 1; num_screens = bsp_disp_feat_get_num_screens(); for(screen_id=0; screen_id<num_screens; screen_id++) { if(bsp_disp_get_output_type(screen_id) == DISP_OUTPUT_TYPE_LCD) { struct disp_lcd* lcd; static disp_panel_para info; lcd = disp_get_lcd(screen_id); if(!lcd) { DE_WRN("get lcd%d fail\n", screen_id); } memset(&info, 0, sizeof(disp_panel_para)); if(lcd && lcd->get_panel_info) lcd->get_panel_info(lcd, &info); if(info.lcd_if == LCD_IF_EDP) { ret = disp_al_edp_int(EDP_IRQ_VBLK); } else { ret = tcon_irq_query(screen_id,LCD_IRQ_TCON0_VBLK) | dsi_irq_query(screen_id,DSI_IRQ_VIDEO_VBLK); } } else if(bsp_disp_get_output_type(screen_id) == DISP_OUTPUT_TYPE_HDMI) { /* FIXME: add hdmi */ } } return ret; }
/* query lcd irq, clear it when the irq queried exist */ int disp_al_lcd_query_irq(u32 screen_id, __lcd_irq_id_t irq_id, disp_panel_para * panel) { int ret = 0; ret = tcon_irq_query(screen_id, irq_id); return ret; }
int disp_al_device_query_irq(u32 screen_id) { int ret = 0; int irq_id = 0; irq_id = (al_priv.output_type[screen_id] == (u32)DISP_OUTPUT_TYPE_LCD)?\ LCD_IRQ_TCON0_VBLK:LCD_IRQ_TCON1_VBLK; ret = tcon_irq_query(screen_id, irq_id); return ret; }
/* query lcd irq, clear it when the irq queried exist */ int disp_al_lcd_query_irq(u32 screen_id, __lcd_irq_id_t irq_id, disp_panel_para * panel) { int ret = 0; if(LCD_IF_DSI == panel->lcd_if) { #if defined(SUPPORT_DSI) ret = dsi_irq_query(screen_id, (__dsi_irq_id_t)irq_id); #endif } else ret = tcon_irq_query(screen_id, irq_id); return ret; }