diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-18 12:04:24 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-18 12:04:24 -0700 |
commit | 2c2b895deb04da6e2ae37eba27fd721273ca6c0f (patch) | |
tree | 0d0190dd51f5c6b3c83232589af455e189253888 /drivers | |
parent | 289e21221f7ac75f84fcb227b14846d35ffe9450 (diff) | |
parent | 4b225b46c34b53c900be28f49c0390d8c74d67ab (diff) |
Merge "msm: mdss: shutoff axi memory and periphery when axi clk is off"
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index a9571a4b8d15..e1aa004e14e6 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -1454,6 +1454,35 @@ end: } /** + * 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 * @@ -2735,6 +2764,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); |