mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: display: skip one vsync event after enabling mdp and vsync clk
Both mdp and mdp_vsync clks are disabled for command mode panel when no new frames are being played. When they are re-enabled if new requests come in, the first vsync event which is signaled by read pointer interrupt arrives in a random time due to the sync between mdp and panel, so skip it to maintain correct vsync timing. Change-Id: I683b765e4a16d3d152b9270f5982234b94921f1e Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org> (cherry picked from commit a4567ac320abe5d74b3c7decdbddba4bd8c57463)
This commit is contained in:
parent
623763758a
commit
1844bc38ac
1 changed files with 8 additions and 0 deletions
|
@ -70,6 +70,7 @@ static struct vsycn_ctrl {
|
|||
struct vsync_update vlist[2];
|
||||
int vsync_enabled;
|
||||
int clk_enabled;
|
||||
int new_update;
|
||||
int clk_control;
|
||||
ktime_t vsync_time;
|
||||
struct work_struct clk_work;
|
||||
|
@ -421,6 +422,7 @@ void mdp4_dsi_cmd_vsync_ctrl(struct fb_info *info, int enable)
|
|||
mipi_dsi_clk_cfg(1);
|
||||
mdp_clk_ctrl(1);
|
||||
vctrl->clk_enabled = 1;
|
||||
vctrl->new_update = 1;
|
||||
clk_set_on = 1;
|
||||
}
|
||||
if (clk_set_on) {
|
||||
|
@ -517,6 +519,12 @@ static void primary_rdptr_isr(int cndx)
|
|||
spin_lock(&vctrl->spin_lock);
|
||||
vctrl->vsync_time = ktime_get();
|
||||
|
||||
if (vctrl->new_update) {
|
||||
vctrl->new_update = 0;
|
||||
spin_unlock(&vctrl->spin_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
complete_all(&vctrl->vsync_comp);
|
||||
vctrl->wait_vsync_cnt = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue