summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAravind Venkateswaran <aravindh@codeaurora.org>2014-08-25 12:41:47 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:33:31 -0700
commitf8e6cabbfc1585fc9f865b5cf345c5ca43e65fca (patch)
treead5c278ed6fe7ff71a911ed40efadee641e623a3
parentef439517fe345b96e4b2d0baf3c2cefed16cf68c (diff)
msm: mdss: enable runtime autosuspend for mdp device
With MDSS idle power collapse feature enabled, it is possible that the runtime suspend callback for MDP device to be called when there are no display updates. This results in MDSS GDSC to be turned off in idle screen usecases, and would subsequently be turned back on upon the next update. However, toggling GDSC can be an expensive operation and should only be done when it is expected to be off for a substantial time. To achieve this, enable the runtime autosuspend status for the mdp device. Change-Id: I6e4127efe7b01d7e164b0763d34995c82c2e8be9 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c
index a2e43cd8e4fe..0c942531f6db 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp.c
@@ -58,6 +58,7 @@
#include "mdss_mdp_trace.h"
#define AXI_HALT_TIMEOUT_US 0x4000
+#define AUTOSUSPEND_TIMEOUT_MS 200
struct mdss_data_type *mdss_res;
@@ -728,7 +729,8 @@ void mdss_bus_bandwidth_ctrl(int enable)
if (!enable) {
msm_bus_scale_client_update_request(
mdata->bus_hdl, 0);
- pm_runtime_put(&mdata->pdev->dev);
+ pm_runtime_mark_last_busy(&mdata->pdev->dev);
+ pm_runtime_put_autosuspend(&mdata->pdev->dev);
} else {
pm_runtime_get_sync(&mdata->pdev->dev);
msm_bus_scale_client_update_request(
@@ -777,8 +779,10 @@ void mdss_mdp_clk_ctrl(int enable)
if (mdata->vsync_ena)
mdss_mdp_clk_update(MDSS_CLK_MDP_VSYNC, enable);
- if (!enable)
- pm_runtime_put(&mdata->pdev->dev);
+ if (!enable) {
+ pm_runtime_mark_last_busy(&mdata->pdev->dev);
+ pm_runtime_put_autosuspend(&mdata->pdev->dev);
+ }
}
mutex_unlock(&mdp_clk_lock);
@@ -1464,6 +1468,9 @@ static int mdss_mdp_probe(struct platform_device *pdev)
goto probe_done;
}
+ pm_runtime_set_autosuspend_delay(&pdev->dev, AUTOSUSPEND_TIMEOUT_MS);
+ if (mdata->idle_pc_enabled)
+ pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_enable(&pdev->dev);
if (!pm_runtime_enabled(&pdev->dev))