msm: mdss: add support for Early Clock Gating
Add support to gate the mdp clocks as soon as the frame transfer is done for command mode panels. Change-Id: I8325f26806ff3163edd87b9e3c01cd045f2aec77 Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org> [cip@codeaurora.org: Resolved merge conflicts, use debugfs_create_u32 for enable_gate] Signed-off-by: Clarence Ip <cip@codeaurora.org>
This commit is contained in:
parent
efad0d8b06
commit
c657b3d1c2
9 changed files with 641 additions and 156 deletions
|
@ -336,6 +336,7 @@ struct mdss_data_type {
|
|||
u32 *clock_levels;
|
||||
u32 nclk_lvl;
|
||||
|
||||
u32 enable_gate;
|
||||
u32 enable_bw_release;
|
||||
u32 enable_rotator_bw_release;
|
||||
u32 serialize_wait4pp;
|
||||
|
|
|
@ -2878,6 +2878,8 @@ int mdss_fb_atomic_commit(struct fb_info *info,
|
|||
__ioctl_transition_dyn_mode_state(mfd,
|
||||
MSMFB_ATOMIC_COMMIT, 1);
|
||||
ret = mfd->mdp.atomic_validate(mfd, file, commit_v1);
|
||||
if (!ret)
|
||||
mfd->validate_pending = true;
|
||||
}
|
||||
goto end;
|
||||
} else {
|
||||
|
|
|
@ -258,6 +258,8 @@ struct msm_fb_data_type {
|
|||
int idle_time;
|
||||
struct delayed_work idle_notify_work;
|
||||
|
||||
bool validate_pending;
|
||||
|
||||
int op_enable;
|
||||
u32 fb_imgType;
|
||||
int panel_reconfig;
|
||||
|
|
|
@ -872,8 +872,9 @@ void mdss_mdp_clk_ctrl(int enable)
|
|||
if (changed)
|
||||
MDSS_XLOG(mdp_clk_cnt, enable, current->pid);
|
||||
|
||||
pr_debug("%s: clk_cnt=%d changed=%d enable=%d\n",
|
||||
__func__, mdp_clk_cnt, changed, enable);
|
||||
pr_debug("%pS: clk_cnt=%d changed=%d enable=%d\n",
|
||||
__builtin_return_address(0), mdp_clk_cnt,
|
||||
changed, enable);
|
||||
|
||||
if (changed) {
|
||||
if (enable) {
|
||||
|
@ -1106,6 +1107,8 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata)
|
|||
mdata->hflip_buffer_reused = true;
|
||||
/* prevent disable of prefill calculations */
|
||||
mdata->min_prefill_lines = 0xffff;
|
||||
/* clock gating feature is disabled by default */
|
||||
mdata->enable_gate = true;
|
||||
|
||||
mdss_mdp_hw_rev_debug_caps_init(mdata);
|
||||
|
||||
|
|
|
@ -606,6 +606,7 @@ struct mdss_overlay_private {
|
|||
struct list_head pipes_cleanup;
|
||||
struct list_head rot_proc_list;
|
||||
bool mixer_swap;
|
||||
u32 resources_state;
|
||||
|
||||
/* list of buffers that can be reused */
|
||||
struct list_head bufs_chunks;
|
||||
|
|
|
@ -1533,10 +1533,11 @@ void mdss_mdp_ctl_perf_set_transaction_status(struct mdss_mdp_ctl *ctl,
|
|||
set_status(&ctl->perf_transaction_status, new_status,
|
||||
(u32)component);
|
||||
|
||||
pr_debug("component:%d previous_transaction:%d transaction_status:%d\n",
|
||||
component, previous_transaction, ctl->perf_transaction_status);
|
||||
pr_debug("new_status:%d prev_status:%d\n",
|
||||
new_status, previous_status);
|
||||
pr_debug("ctl:%d component:%d previous:%d status:%d\n",
|
||||
ctl->num, component, previous_transaction,
|
||||
ctl->perf_transaction_status);
|
||||
pr_debug("ctl:%d new_status:%d prev_status:%d\n",
|
||||
ctl->num, new_status, previous_status);
|
||||
|
||||
spin_unlock_irqrestore(&ctl->spin_lock, flags);
|
||||
}
|
||||
|
@ -1580,6 +1581,8 @@ u32 mdss_mdp_ctl_perf_get_transaction_status(struct mdss_mdp_ctl *ctl)
|
|||
spin_lock_irqsave(&ctl->spin_lock, flags);
|
||||
transaction_status = ctl->perf_transaction_status;
|
||||
spin_unlock_irqrestore(&ctl->spin_lock, flags);
|
||||
pr_debug("ctl:%d status:%d\n", ctl->num,
|
||||
transaction_status);
|
||||
|
||||
return transaction_status;
|
||||
}
|
||||
|
|
|
@ -505,6 +505,8 @@ int mdss_mdp_debugfs_init(struct mdss_data_type *mdata)
|
|||
&mdss_debugfs_stats_fops);
|
||||
debugfs_create_u32("serialize_wait4pp", 0644, mdd->root,
|
||||
(u32 *)&mdata->serialize_wait4pp);
|
||||
debugfs_create_u32("enable_gate", 0644, mdd->root,
|
||||
(u32 *)&mdata->enable_gate);
|
||||
|
||||
debugfs_create_u32("color0", 0644, mdd->bordercolor,
|
||||
(u32 *)&mdata->bcolor0);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1936,6 +1936,13 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
|
|||
ATRACE_END("display_commit");
|
||||
}
|
||||
|
||||
/*
|
||||
* release the validate 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;
|
||||
|
||||
if ((!need_cleanup) && (!mdp5_data->kickoff_released))
|
||||
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_CTX_DONE);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue