msm: mdss: return error if dynamic refresh interrupt is timeout
This error indicates that the new refresh rate was not dynamically changed. The error has to be handled. Change-Id: I0e1f0490d2207d7214cfd67dcb80a0db383e496e Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This commit is contained in:
parent
e43e3b4bca
commit
a59f26e8c2
3 changed files with 16 additions and 5 deletions
|
@ -1071,6 +1071,8 @@ static int __mdss_dsi_dfps_update_clks(struct mdss_panel_data *pdata,
|
|||
|
||||
if (mdss_dsi_is_ctrl_clk_slave(ctrl_pdata)) {
|
||||
pr_debug("%s DFPS already updated.\n", __func__);
|
||||
ctrl_pdata->panel_data.panel_info.mipi.frame_rate =
|
||||
new_fps;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -1099,7 +1101,7 @@ static int __mdss_dsi_dfps_update_clks(struct mdss_panel_data *pdata,
|
|||
return rc;
|
||||
}
|
||||
|
||||
mdss_dsi_en_wait4dynamic_done(ctrl_pdata);
|
||||
rc = mdss_dsi_en_wait4dynamic_done(ctrl_pdata);
|
||||
MIPI_OUTP((ctrl_pdata->ctrl_base) + DSI_DYNAMIC_REFRESH_CTRL,
|
||||
0x00);
|
||||
|
||||
|
@ -1112,7 +1114,10 @@ static int __mdss_dsi_dfps_update_clks(struct mdss_panel_data *pdata,
|
|||
ctrl_pdata->pll_pixel_clk);
|
||||
clk_disable_unprepare(ctrl_pdata->pll_byte_clk);
|
||||
clk_disable_unprepare(ctrl_pdata->pll_pixel_clk);
|
||||
ctrl_pdata->panel_data.panel_info.mipi.frame_rate = new_fps;
|
||||
|
||||
if (!rc)
|
||||
ctrl_pdata->panel_data.panel_info.mipi.frame_rate =
|
||||
new_fps;
|
||||
} else {
|
||||
ctrl_pdata->pclk_rate =
|
||||
pdata->panel_info.mipi.dsi_pclk_rate;
|
||||
|
|
|
@ -464,7 +464,7 @@ void mdss_dsi_ctrl_init(struct device *ctrl_dev,
|
|||
struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
void mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
int mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp);
|
||||
void mdss_dsi_cmdlist_kickoff(int intf);
|
||||
int mdss_dsi_bta_status_check(struct mdss_dsi_ctrl_pdata *ctrl);
|
||||
|
|
|
@ -1685,10 +1685,12 @@ static int mdss_dsi_cmd_dma_rx(struct mdss_dsi_ctrl_pdata *ctrl,
|
|||
return rx_byte;
|
||||
}
|
||||
|
||||
void mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl)
|
||||
int mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl)
|
||||
{
|
||||
unsigned long flag;
|
||||
u32 data;
|
||||
int rc = 0;
|
||||
|
||||
/* DSI_INTL_CTRL */
|
||||
data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
|
||||
data &= DSI_INTR_TOTAL_MASK;
|
||||
|
@ -1703,13 +1705,17 @@ void mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl)
|
|||
(BIT(8) | BIT(0)));
|
||||
|
||||
if (!wait_for_completion_timeout(&ctrl->dynamic_comp,
|
||||
msecs_to_jiffies(VSYNC_PERIOD * 4)))
|
||||
msecs_to_jiffies(VSYNC_PERIOD * 4))) {
|
||||
pr_err("Dynamic interrupt timedout\n");
|
||||
rc = -EINVAL;
|
||||
}
|
||||
|
||||
data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
|
||||
data &= DSI_INTR_TOTAL_MASK;
|
||||
data &= ~DSI_INTR_DYNAMIC_REFRESH_MASK;
|
||||
MIPI_OUTP((ctrl->ctrl_base) + 0x0110, data);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl)
|
||||
|
|
Loading…
Add table
Reference in a new issue