msm: mdss: switch mdp context between active-only and active+sleep
This change modifies MDP vote to go to Active-Only in an early stage when bandwidth is not needed and updates the vote to Active+Sleep when bandwidth must be guaranteed. Change-Id: I6ccb7a225f97416128518c990d881fa139ec1963 Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
This commit is contained in:
parent
7d1d28c420
commit
75bb23a67b
3 changed files with 19 additions and 1 deletions
|
@ -316,6 +316,7 @@ struct mdss_data_type {
|
|||
u32 nrt_axi_port_cnt;
|
||||
u32 bus_channels;
|
||||
u32 curr_bw_uc_idx;
|
||||
u32 ao_bw_uc_idx; /* active only idx */
|
||||
struct msm_bus_scale_pdata *bus_scale_table;
|
||||
u32 max_bw_low;
|
||||
u32 max_bw_high;
|
||||
|
|
|
@ -397,6 +397,7 @@ static int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt,
|
|||
}
|
||||
}
|
||||
mdss_res->curr_bw_uc_idx = new_uc_idx;
|
||||
mdss_res->ao_bw_uc_idx = new_uc_idx;
|
||||
|
||||
if ((mdss_res->bus_ref_cnt == 0) && mdss_res->curr_bw_uc_idx) {
|
||||
rc = 0;
|
||||
|
@ -833,9 +834,11 @@ void mdss_bus_bandwidth_ctrl(int enable)
|
|||
|
||||
if (changed) {
|
||||
if (!enable) {
|
||||
if (!mdata->handoff_pending)
|
||||
if (!mdata->handoff_pending) {
|
||||
msm_bus_scale_client_update_request(
|
||||
mdata->bus_hdl, 0);
|
||||
mdata->ao_bw_uc_idx = 0;
|
||||
}
|
||||
pm_runtime_mark_last_busy(&mdata->pdev->dev);
|
||||
pm_runtime_put_autosuspend(&mdata->pdev->dev);
|
||||
} else {
|
||||
|
@ -880,8 +883,13 @@ void mdss_mdp_clk_ctrl(int enable)
|
|||
if (changed) {
|
||||
if (enable) {
|
||||
pm_runtime_get_sync(&mdata->pdev->dev);
|
||||
|
||||
mdss_update_reg_bus_vote(mdata->reg_bus_clt,
|
||||
VOTE_INDEX_19_MHZ);
|
||||
|
||||
/* Active+Sleep */
|
||||
msm_bus_scale_client_update_context(mdata->bus_hdl,
|
||||
false, mdata->curr_bw_uc_idx);
|
||||
}
|
||||
|
||||
mdata->clk_ena = enable;
|
||||
|
@ -893,8 +901,14 @@ void mdss_mdp_clk_ctrl(int enable)
|
|||
mdss_mdp_clk_update(MDSS_CLK_MDP_VSYNC, enable);
|
||||
|
||||
if (!enable) {
|
||||
|
||||
/* Active-Only */
|
||||
msm_bus_scale_client_update_context(mdata->bus_hdl,
|
||||
true, mdata->ao_bw_uc_idx);
|
||||
|
||||
mdss_update_reg_bus_vote(mdata->reg_bus_clt,
|
||||
VOTE_INDEX_DISABLE);
|
||||
|
||||
pm_runtime_mark_last_busy(&mdata->pdev->dev);
|
||||
pm_runtime_put_autosuspend(&mdata->pdev->dev);
|
||||
}
|
||||
|
|
|
@ -485,6 +485,9 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event)
|
|||
* cancel as well.
|
||||
*/
|
||||
|
||||
/* update the active only vote */
|
||||
mdata->ao_bw_uc_idx = mdata->curr_bw_uc_idx;
|
||||
|
||||
/* Cancel GATE Work Item */
|
||||
if (cancel_work_sync(&ctx->gate_clk_work)) {
|
||||
pr_debug("%s gate work canceled\n", __func__);
|
||||
|
|
Loading…
Add table
Reference in a new issue