diff options
| author | Kalyan Thota <kalyant@codeaurora.org> | 2015-12-29 15:34:32 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:14:30 -0700 |
| commit | 3d2a71a568ff1bf5efbde00d69e42395e9b2d3d6 (patch) | |
| tree | 5334d66763cafb350a73406dbabe5deca84af669 | |
| parent | f63539528dee1f20a13e9a4bfbfeedea40927b85 (diff) | |
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>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_intf_video.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c index 024d0a94eeed..1498081532a6 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_video.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_video.c @@ -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; } |
