msm: mdss: turn on the mdss clocks when enabling vsync

Switch on the mdss clocks while enabling vsync irq.
Since mdss clocks are refcounted and irq is asynchronus
there can be case as clocks are off and irq is triggered.

This change will add a refcount while enabling irq so that
clocks are on when irq is triggered.

Change-Id: I90728f6d94b9d846b2c805a68ee49a6ef2a8ffc3
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
This commit is contained in:
Kalyan Thota 2015-12-29 15:34:32 +05:30 committed by David Keitel
parent f63539528d
commit 3d2a71a568

View file

@ -396,8 +396,10 @@ static int mdss_mdp_video_add_vsync_handler(struct mdss_mdp_ctl *ctl,
irq_en = true;
}
spin_unlock_irqrestore(&ctx->vsync_lock, flags);
if (irq_en)
if (irq_en) {
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
video_vsync_irq_enable(ctl, false);
}
exit:
return ret;
}
@ -424,8 +426,10 @@ static int mdss_mdp_video_remove_vsync_handler(struct mdss_mdp_ctl *ctl,
irq_dis = true;
}
spin_unlock_irqrestore(&ctx->vsync_lock, flags);
if (irq_dis)
if (irq_dis) {
video_vsync_irq_disable(ctl);
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
}
return 0;
}