diff options
| author | Dhaval Patel <pdhaval@codeaurora.org> | 2015-12-21 16:27:52 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:17:35 -0700 |
| commit | 933552698c0283aad92cd1627b4e5b3076949262 (patch) | |
| tree | 2e6092b2aeb61f78f7c1558c6abfe50e5bd8c8b5 /drivers/video/fbdev | |
| parent | 7c1a00bcd300dc6c9284eae3b5445cd0fa97e985 (diff) | |
msm: mdss: avoid clock off from delayed off
Avoid clock off from delayed off when kickoff
is pending. This sequence is leading to mdp
clocks off and on which adds extra delay in
kickoff cycle.
Change-Id: Ia30ec3ac3c2e7602a32c9eb789cd85d4736b6c60
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 4 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.h | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c | 11 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_overlay.c | 4 |
4 files changed, 13 insertions, 8 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 5fc21ef47a5b..39271d8d2a6c 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -2,7 +2,7 @@ * Core MDSS framebuffer driver. * * Copyright (C) 2007 Google Incorporated - * Copyright (c) 2008-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -3156,7 +3156,7 @@ int mdss_fb_atomic_commit(struct fb_info *info, MSMFB_ATOMIC_COMMIT, 1); ret = mfd->mdp.atomic_validate(mfd, file, commit_v1); if (!ret) - mfd->validate_pending = true; + mfd->atomic_commit_pending = true; } goto end; } else { diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h index b93fb55400aa..13b4c95a3cb2 100644 --- a/drivers/video/fbdev/msm/mdss_fb.h +++ b/drivers/video/fbdev/msm/mdss_fb.h @@ -273,7 +273,7 @@ struct msm_fb_data_type { u32 idle_state; struct delayed_work idle_notify_work; - bool validate_pending; + bool atomic_commit_pending; int op_enable; u32 fb_imgType; diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index 05a497951407..78cba24534cd 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -689,12 +689,12 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) * 1. no kickoff has been scheduled * 2. no stop command has been started * 3. no autorefresh is enabled - * 4. no validate is pending + * 4. no commit is pending */ if ((PERF_STATUS_DONE == status) && !ctx->intf_stopped && (ctx->autorefresh_state == MDP_AUTOREFRESH_OFF) && - !ctl->mfd->validate_pending) { + !ctl->mfd->atomic_commit_pending) { pr_debug("schedule release after:%d ms\n", jiffies_to_msecs (CMD_MODE_IDLE_TIMEOUT)); @@ -865,7 +865,7 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) * Driver will not allow off work under one condition: * 1. Kickoff is pending. */ - if (schedule_off && !ctl->mfd->validate_pending) { + if (schedule_off && !ctl->mfd->atomic_commit_pending) { /* * Schedule off work after cmd mode idle timeout is * reached. This is to prevent the case where early wake @@ -1137,6 +1137,11 @@ static void clk_ctrl_delayed_off_work(struct work_struct *work) return; } + if (ctl->mfd->atomic_commit_pending) { + pr_debug("leave clocks on for queued kickoff\n"); + return; + } + mdp5_data = mfd_to_mdp5_data(ctl->mfd); ATRACE_BEGIN(__func__); diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index e34972865d1c..b84897c747ae 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -1994,11 +1994,11 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, } /* - * release the validate flag; we are releasing this flag + * release the commit pending flag; we are releasing this flag * after the commit, since now the transaction status * in the cmd mode controllers is busy. */ - mfd->validate_pending = false; + mfd->atomic_commit_pending = false; if (!mdp5_data->kickoff_released) mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_CTX_DONE); |
