Merge "msm: mdss: Fix dynamic refresh sequence"

This commit is contained in:
Linux Build Service Account 2017-01-09 23:59:38 -08:00 committed by Gerrit - the friendly Code Review server
commit 8787746ecb
3 changed files with 24 additions and 0 deletions

View file

@ -2090,6 +2090,13 @@ static int __mdss_dsi_dfps_update_clks(struct mdss_panel_data *pdata,
MIPI_OUTP((sctrl_pdata->ctrl_base) + DSI_DYNAMIC_REFRESH_CTRL,
0x00);
rc = mdss_dsi_phy_pll_reset_status(ctrl_pdata);
if (rc) {
pr_err("%s: pll cannot be locked reset core ready failed %d\n",
__func__, rc);
goto dfps_timeout;
}
__mdss_dsi_mask_dfps_errors(ctrl_pdata, false);
if (sctrl_pdata)
__mdss_dsi_mask_dfps_errors(sctrl_pdata, false);

View file

@ -694,6 +694,7 @@ void mdss_dsi_dfps_config_8996(struct mdss_dsi_ctrl_pdata *ctrl);
void mdss_dsi_set_burst_mode(struct mdss_dsi_ctrl_pdata *ctrl);
void mdss_dsi_set_reg(struct mdss_dsi_ctrl_pdata *ctrl, int off,
u32 mask, u32 val);
int mdss_dsi_phy_pll_reset_status(struct mdss_dsi_ctrl_pdata *ctrl);
static inline const char *__mdss_dsi_pm_name(enum dsi_pm_type module)
{

View file

@ -16,6 +16,8 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk/msm-clk.h>
#include <linux/iopoll.h>
#include <linux/kthread.h>
#include "mdss_dsi.h"
#include "mdss_dp.h"
@ -427,6 +429,20 @@ static void mdss_dsi_ctrl_phy_reset(struct mdss_dsi_ctrl_pdata *ctrl)
wmb(); /* maek sure reset cleared */
}
int mdss_dsi_phy_pll_reset_status(struct mdss_dsi_ctrl_pdata *ctrl)
{
int rc;
u32 val;
u32 const sleep_us = 10, timeout_us = 100;
pr_debug("%s: polling for RESETSM_READY_STATUS.CORE_READY\n",
__func__);
rc = readl_poll_timeout(ctrl->phy_io.base + 0x4cc, val,
(val & 0x1), sleep_us, timeout_us);
return rc;
}
static void mdss_dsi_phy_sw_reset_sub(struct mdss_dsi_ctrl_pdata *ctrl)
{
struct mdss_dsi_ctrl_pdata *sctrl = NULL;