Merge "msm: mdss: save state of vsync handler"
This commit is contained in:
commit
653154b099
2 changed files with 12 additions and 1 deletions
|
@ -933,6 +933,7 @@ struct mdss_mdp_writeback_arg {
|
||||||
struct mdss_mdp_wfd;
|
struct mdss_mdp_wfd;
|
||||||
|
|
||||||
struct mdss_overlay_private {
|
struct mdss_overlay_private {
|
||||||
|
bool vsync_en;
|
||||||
ktime_t vsync_time;
|
ktime_t vsync_time;
|
||||||
ktime_t lineptr_time;
|
ktime_t lineptr_time;
|
||||||
struct kernfs_node *vsync_event_sd;
|
struct kernfs_node *vsync_event_sd;
|
||||||
|
|
|
@ -3307,12 +3307,14 @@ int mdss_mdp_overlay_vsync_ctrl(struct msm_fb_data_type *mfd, int en)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mdp5_data->vsync_en = en;
|
||||||
|
|
||||||
if (!ctl->panel_data->panel_info.cont_splash_enabled
|
if (!ctl->panel_data->panel_info.cont_splash_enabled
|
||||||
&& (!mdss_mdp_ctl_is_power_on(ctl) ||
|
&& (!mdss_mdp_ctl_is_power_on(ctl) ||
|
||||||
mdss_panel_is_power_on_ulp(ctl->power_state))) {
|
mdss_panel_is_power_on_ulp(ctl->power_state))) {
|
||||||
pr_debug("fb%d vsync pending first update en=%d, ctl power state:%d\n",
|
pr_debug("fb%d vsync pending first update en=%d, ctl power state:%d\n",
|
||||||
mfd->index, en, ctl->power_state);
|
mfd->index, en, ctl->power_state);
|
||||||
rc = -EPERM;
|
rc = 0;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5759,6 +5761,13 @@ static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
|
||||||
}
|
}
|
||||||
|
|
||||||
panel_on:
|
panel_on:
|
||||||
|
if (mdp5_data->vsync_en) {
|
||||||
|
pr_info("reenabling vsync for fb%d\n", mfd->index);
|
||||||
|
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
|
||||||
|
rc = ctl->ops.add_vsync_handler(ctl, &ctl->vsync_handler);
|
||||||
|
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_ERR_VALUE(rc)) {
|
if (IS_ERR_VALUE(rc)) {
|
||||||
pr_err("Failed to turn on fb%d\n", mfd->index);
|
pr_err("Failed to turn on fb%d\n", mfd->index);
|
||||||
mdss_mdp_overlay_off(mfd);
|
mdss_mdp_overlay_off(mfd);
|
||||||
|
@ -6600,6 +6609,7 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mfd->mdp_sync_pt_data.async_wait_fences = true;
|
mfd->mdp_sync_pt_data.async_wait_fences = true;
|
||||||
|
mdp5_data->vsync_en = false;
|
||||||
|
|
||||||
pm_runtime_set_suspended(&mfd->pdev->dev);
|
pm_runtime_set_suspended(&mfd->pdev->dev);
|
||||||
pm_runtime_enable(&mfd->pdev->dev);
|
pm_runtime_enable(&mfd->pdev->dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue