disp: msm: dsi: add support for dsi dynamic clock switch
This change adds support for dynamic switching of dsi clocks to avoid RF interference issues. Also with dynamic dsi clock switch feature coming into picture, now populate the supported refresh rate as list instead of providing a range. Modify the logic to enumerate all the modes in dsi driver, taking dynamic bit clocks, resolutions and refresh rates into account. Change-Id: I5b6e62bc935cf2234bdd96fcb3c7537b4e735fff Signed-off-by: Sandeep Panda <spanda@codeaurora.org> Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org> Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
This commit is contained in:
@@ -2887,7 +2887,12 @@ int dsi_ctrl_update_host_config(struct dsi_ctrl *ctrl,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(flags & (DSI_MODE_FLAG_SEAMLESS | DSI_MODE_FLAG_VRR))) {
|
||||
if (!(flags & (DSI_MODE_FLAG_SEAMLESS | DSI_MODE_FLAG_VRR |
|
||||
DSI_MODE_FLAG_DYN_CLK))) {
|
||||
/*
|
||||
* for dynamic clk switch case link frequence would
|
||||
* be updated dsi_display_dynamic_clk_switch().
|
||||
*/
|
||||
rc = dsi_ctrl_update_link_freqs(ctrl, config, clk_handle,
|
||||
mode);
|
||||
if (rc) {
|
||||
@@ -3603,6 +3608,27 @@ void dsi_ctrl_irq_update(struct dsi_ctrl *dsi_ctrl, bool enable)
|
||||
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* dsi_ctrl_wait4dynamic_refresh_done() - Poll for dynamci refresh
|
||||
* done interrupt.
|
||||
* @dsi_ctrl: DSI controller handle.
|
||||
*/
|
||||
int dsi_ctrl_wait4dynamic_refresh_done(struct dsi_ctrl *ctrl)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (!ctrl)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&ctrl->ctrl_lock);
|
||||
|
||||
if (ctrl->hw.ops.wait4dynamic_refresh_done)
|
||||
rc = ctrl->hw.ops.wait4dynamic_refresh_done(&ctrl->hw);
|
||||
|
||||
mutex_unlock(&ctrl->ctrl_lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* dsi_ctrl_drv_register() - register platform driver for dsi controller
|
||||
*/
|
||||
|
Reference in New Issue
Block a user