msm: mdss: shutoff axi memory and periphery when axi clk is off
Because of CBCR update, mdss driver needs to control mdss axi clock state of memory core and periphery control when branch clock is off. Since mdss does not have retention requirement for axi, both memory core and periphery control can be turned off to conserve power when mdss axi clock is off. CRs-Fixed: 1044375 Change-Id: Ia609549304be97cdaeff0f30ff0ca8ad5e22af75 Signed-off-by: Alan Kwong <akwong@codeaurora.org>
This commit is contained in:
parent
c5984ec85c
commit
4b225b46c3
1 changed files with 35 additions and 0 deletions
|
@ -1453,6 +1453,35 @@ end:
|
|||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* mdss_mdp_retention_init() - initialize retention setting
|
||||
* @mdata: pointer to the global mdss data structure.
|
||||
*/
|
||||
static int mdss_mdp_retention_init(struct mdss_data_type *mdata)
|
||||
{
|
||||
struct clk *mdss_axi_clk = mdss_mdp_get_clk(MDSS_CLK_AXI);
|
||||
int rc;
|
||||
|
||||
if (!mdss_axi_clk) {
|
||||
pr_err("failed to get AXI clock\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rc = clk_set_flags(mdss_axi_clk, CLKFLAG_NORETAIN_MEM);
|
||||
if (rc) {
|
||||
pr_err("failed to set AXI no memory retention %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = clk_set_flags(mdss_axi_clk, CLKFLAG_NORETAIN_PERIPH);
|
||||
if (rc) {
|
||||
pr_err("failed to set AXI no periphery retention %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* mdss_bus_bandwidth_ctrl() -- place bus bandwidth request
|
||||
* @enable: value of enable or disable
|
||||
|
@ -2718,6 +2747,12 @@ static int mdss_mdp_probe(struct platform_device *pdev)
|
|||
goto probe_done;
|
||||
}
|
||||
|
||||
rc = mdss_mdp_retention_init(mdata);
|
||||
if (rc) {
|
||||
pr_err("unable to initialize mdss mdp retention\n");
|
||||
goto probe_done;
|
||||
}
|
||||
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTOSUSPEND_TIMEOUT_MS);
|
||||
if (mdata->idle_pc_enabled)
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
|
|
Loading…
Add table
Reference in a new issue