s32 disp_hdmi_disable(struct disp_hdmi* hdmi) { struct disp_hdmi_private_data *hdmip = disp_hdmi_get_priv(hdmi); if((NULL == hdmi) || (NULL == hdmip)) { DE_WRN("hdmi set func null hdl!\n"); return DIS_FAIL; } if(hdmip->enabled == 0) { DE_WRN("hdmi%d is already closed\n", hdmi->channel_id); return DIS_FAIL; } disp_al_hdmi_disable(hdmi->channel_id); hdmi_clk_disable(hdmi); if(hdmip->hdmi_func.hdmi_close == NULL) return -1; hdmip->hdmi_func.hdmi_close(); #if defined(__LINUX_PLAT__) { unsigned long flags; spin_lock_irqsave(&hdmi_data_lock, flags); #endif hdmip->enabled = 0; #if defined(__LINUX_PLAT__) spin_unlock_irqrestore(&hdmi_data_lock, flags); } #endif return 0; }
static s32 disp_hdmi_disable(struct disp_device* hdmi) { struct disp_device_private_data *hdmip = disp_hdmi_get_priv(hdmi); unsigned long flags; struct disp_manager *mgr = NULL; if((NULL == hdmi) || (NULL == hdmip)) { DE_WRN("hdmi set func null hdl!\n"); return DIS_FAIL; } mgr = hdmi->manager; if(!mgr) { DE_WRN("hdmi%d's mgr is NULL\n", hdmi->disp); return DIS_FAIL; } if(hdmip->enabled == 0) { DE_WRN("hdmi%d is already closed\n", hdmi->disp); return DIS_FAIL; } disp_al_hdmi_disable(hdmi->disp); hdmi_clk_disable(hdmi); if(hdmip->hdmi_func.hdmi_close == NULL) return -1; hdmip->hdmi_func.hdmi_close(); if(mgr->disable) mgr->disable(mgr); disp_sys_irqlock((void*)&hdmi_data_lock, &flags); hdmip->enabled = 0; disp_sys_irqunlock((void*)&hdmi_data_lock, &flags); disp_sys_disable_irq(hdmip->irq_no); disp_sys_unregister_irq(hdmip->irq_no, disp_hdmi_event_proc,(void*)hdmi->disp); return 0; }
int target_hdmi_panel_clock(uint8_t enable, struct msm_panel_info *pinfo) { uint32_t ret; dprintf(SPEW, "%s: target_panel_clock\n", __func__); if (enable) { mdp_gdsc_ctrl(enable); mmss_bus_clock_enable(); mdp_clock_enable(); ret = restore_secure_cfg(SECURE_DEVICE_MDSS); if (ret) { dprintf(CRITICAL, "%s: Failed to restore MDP security configs", __func__); mdp_clock_disable(); mmss_bus_clock_disable(); mdp_gdsc_ctrl(0); return ret; } hdmi_phy_reset(); hdmi_pll_config(); hdmi_vco_enable(); hdmi_clk_enable(); } else if(!target_cont_splash_screen()) { /* Disable clocks if continuous splash off */ hdmi_clk_disable(); hdmi_vco_disable(); mdp_clock_disable(); mmss_bus_clock_disable(); mdp_gdsc_ctrl(enable); } return NO_ERROR; }