diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-04 08:22:41 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-04 08:22:41 -0700 |
| commit | 3336c17fe42833d798810f28b2ca3324be91e79b (patch) | |
| tree | 263fde3064dae0e701882b84ef39e192555c3166 /drivers/video/fbdev | |
| parent | 1ecb9eaec78fbaa3187574c347165bb70e54fef3 (diff) | |
| parent | 81b99c32a1c17e4f36d6e0b3e79516c7b203606a (diff) | |
Merge "msm: mdss: Enable dynamic FPS support for msmcobalt"
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.c | 19 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_intf_video.c | 18 |
2 files changed, 14 insertions, 23 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 06e5502910b2..4285a14e7f35 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -1747,6 +1747,9 @@ static void __mdss_dsi_update_video_mode_total(struct mdss_panel_data *pdata, return; } + if (ctrl_pdata->timing_db_mode) + MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x1e8, 0x1); + vsync_period = mdss_panel_get_vtotal(&pdata->panel_info); hsync_period = @@ -1756,23 +1759,13 @@ static void __mdss_dsi_update_video_mode_total(struct mdss_panel_data *pdata, new_dsi_v_total = ((vsync_period - 1) << 16) | (hsync_period - 1); - MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, - (current_dsi_v_total | 0x8000000)); - if (new_dsi_v_total & 0x8000000) { - MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, - new_dsi_v_total); - } else { - MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, - (new_dsi_v_total | 0x8000000)); - MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, - (new_dsi_v_total & 0x7ffffff)); - } + MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, new_dsi_v_total); if (ctrl_pdata->timing_db_mode) MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x1e4, 0x1); - pr_debug("%s new_fps:%d vsync:%d hsync:%d frame_rate:%d\n", - __func__, new_fps, vsync_period, hsync_period, + pr_debug("%s new_fps:%d new_vtotal:0x%X cur_vtotal:0x%X frame_rate:%d\n", + __func__, new_fps, new_dsi_v_total, current_dsi_v_total, ctrl_pdata->panel_data.panel_info.mipi.frame_rate); ctrl_pdata->panel_data.panel_info.current_fps = new_fps; diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c index ee14fd0d0660..72fc20d97f44 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c @@ -1255,16 +1255,7 @@ static int mdss_mdp_video_vfp_fps_update(struct mdss_mdp_video_ctx *ctx, new_vsync_period_f0 = (vsync_period * hsync_period); mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0, - current_vsync_period_f0 | 0x800000); - if (new_vsync_period_f0 & 0x800000) { - mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0, new_vsync_period_f0); - } else { - mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0, - new_vsync_period_f0 | 0x800000); - mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0, - new_vsync_period_f0 & 0x7fffff); - } pr_debug("if:%d vtotal:%d htotal:%d f0:0x%x nw_f0:0x%x\n", ctx->intf_num, vsync_period, hsync_period, @@ -1474,6 +1465,11 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl, int new_fps) } /* + * Make sure controller setting committed + */ + wmb(); + + /* * MDP INTF registers support DB on targets * starting from MDP v1.5. */ @@ -1749,7 +1745,9 @@ static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx, h_total = mdss_panel_get_htotal(pinfo, true); fetch_start = (v_total - pinfo->prg_fet) * h_total + 1; - fetch_enable = BIT(31); + + fetch_enable = mdp_video_read(ctx, MDSS_MDP_REG_INTF_CONFIG); + fetch_enable |= BIT(31); if (pinfo->dynamic_fps && (pinfo->dfps_update == DFPS_IMMEDIATE_CLK_UPDATE_MODE)) |
