static void init_lcd(void) { UINT32 i; LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_ALL, FALSE)); LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_ALL, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_EnableHwTrigger(FALSE)); LCD_CHECK_RET(LCD_SetBackgroundColor(0)); LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, DISP_GetScreenWidth(), DISP_GetScreenHeight())); LCD_CHECK_RET(LCD_FBSetFormat(lcdTmpBufFormat)); LCD_CHECK_RET(LCD_FBSetPitch(s_tmpBuffers[0].pitchInBytes)); LCD_CHECK_RET(LCD_FBSetStartCoord(0, 0)); for (i = 0; i < lcm_params->dpi.intermediat_buffer_num; ++ i) { LCD_CHECK_RET(LCD_FBSetAddress(LCD_FB_0 + i, s_tmpBuffers[i].pa)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0 + i, TRUE)); } LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_MEM)); /** "LCD Delay Enable" function should be used when there is only single buffer between LCD and DPI. Double buffer even triple buffer need not enable it. */ LCD_CHECK_RET(LCD_WaitDPIIndication(TRUE)); }
static void init_lcd(void) { /* Config LCD Controller */ LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_ALL, FALSE)); LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_ALL, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_EnableHwTrigger(FALSE)); LCD_CHECK_RET(LCD_SetBackgroundColor(0)); LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, lcm_params->width, lcm_params->height)); LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_LCM)); LCD_CHECK_RET(LCD_WaitDPIIndication(FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_1, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_2, FALSE)); }
static void init_lcd(void) { UINT32 i; // Config LCD Controller LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_ALL, FALSE)); LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_ALL, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_EnableHwTrigger(FALSE)); LCD_CHECK_RET(LCD_SetBackgroundColor(0)); if(lcm_params->dsi.mode == CMD_MODE) LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, lcm_params->width, lcm_params->height)); else LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, DISP_GetScreenWidth(), DISP_GetScreenHeight())); if(lcm_params->dsi.mode == CMD_MODE) { LCD_CHECK_RET(LCD_ConfigDSIIfFormat(lcm_params->dsi.data_format.color_order, lcm_params->dsi.data_format.trans_seq, lcm_params->dsi.data_format.padding, lcm_params->dsi.data_format.format, lcm_params->dsi.packet_size, TRUE)); LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_LCM)); LCD_CHECK_RET(LCD_WaitDPIIndication(FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_1, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_2, FALSE)); } else { LCD_CHECK_RET(LCD_FBSetFormat(get_lcd_tmp_buffer_format())); LCD_CHECK_RET(LCD_FBSetPitch(s_tmpBuffers[0].pitchInBytes)); LCD_CHECK_RET(LCD_FBSetStartCoord(0, 0)); for (i = 0; i < lcm_params->dsi.intermediat_buffer_num; ++ i) { LCD_CHECK_RET(LCD_FBSetAddress(LCD_FB_0 + i, s_tmpBuffers[i].pa)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0 + i, TRUE)); } LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_MEM)); LCD_CHECK_RET(LCD_WaitDPIIndication(TRUE)); } }
static void init_lcd(BOOL isLcdPoweredOn) { // Config LCD Controller LCD_CHECK_RET(LCD_Init(isLcdPoweredOn)); LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_ALL, FALSE)); LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_ALL, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_EnableHwTrigger(FALSE)); LCD_CHECK_RET(LCD_SetBackgroundColor(0)); LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, DISP_GetScreenWidth(), DISP_GetScreenHeight())); LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_LCM)); LCD_CHECK_RET(LCD_WaitDPIIndication(FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_1, FALSE)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_2, FALSE)); }
void TVDVT_init_lcd(void) { UINT32 i; LCD_CHECK_RET(LCD_LayerSetAddress(LCD_LAYER_0, src_buf_pa)); LCD_CHECK_RET(LCD_LayerSetFormat(LCD_LAYER_0, LCD_LAYER_FORMAT_RGB888)); LCD_CHECK_RET(LCD_LayerSetOffset(LCD_LAYER_0, 0, 0)); LCD_CHECK_RET(LCD_LayerSetSize(LCD_LAYER_0, SCREEN_WIDTH,SCREEN_HEIGHT)); LCD_CHECK_RET(LCD_LayerSetPitch(LCD_LAYER_0, SCREEN_WIDTH * 3)); LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_0, FALSE)); //LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_ALL, FALSE)); //LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_ALL, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_LayerSetTriggerMode(LCD_LAYER_0, LCD_SW_TRIGGER)); LCD_CHECK_RET(LCD_EnableHwTrigger(FALSE)); LCD_CHECK_RET(LCD_SetBackgroundColor(0)); LCD_CHECK_RET(LCD_SetRoiWindow(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); LCD_CHECK_RET(LCD_FBSetFormat(LCD_FB_FORMAT_RGB888)); LCD_CHECK_RET(LCD_FBSetPitch(SCREEN_WIDTH * 3 )); LCD_CHECK_RET(LCD_FBSetStartCoord(0, 0)); /* for (i = 0; i < lcm_params.dpi.intermediat_buffer_num; ++ i) { LCD_CHECK_RET(LCD_FBSetAddress(LCD_FB_0 + i, s_tmpBuffers[i].pa)); LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0 + i, TRUE)); } */ LCD_CHECK_RET(LCD_FBSetAddress(LCD_FB_0, dst_buf_pa)); //buffer address. LCD_CHECK_RET(LCD_FBEnable(LCD_FB_0, TRUE)); //LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_MEM)); LCD_CHECK_RET(LCD_SetOutputMode(LCD_OUTPUT_TO_TVROT)); LCD_CHECK_RET(LCD_LayerEnable(LCD_LAYER_0, TRUE)); }