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>
This commit is contained in:
Dhaval Patel 2015-12-21 16:27:52 -08:00 committed by David Keitel
parent 7c1a00bcd3
commit 933552698c
4 changed files with 13 additions and 8 deletions

View file

@ -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 {

View file

@ -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;

View file

@ -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__);

View file

@ -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);