summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-12-27 16:08:48 +0800
committerAndy Green <andy.green@linaro.org>2011-12-27 16:08:48 +0800
commitf2d9f990fa9833c5f108efaee834a06876389161 (patch)
treed2da699725e9c73543465ec649990111d05dbe89
parentcbe65d4b30856deddf338eb097b0d808ff042252 (diff)
omap dss test dss rpm disabled before blowing warning
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--drivers/video/omap2/dss/dispc.c3
-rw-r--r--drivers/video/omap2/dss/dss.c5
-rw-r--r--drivers/video/omap2/dss/hdmi.c3
-rw-r--r--include/video/omapdss.h2
4 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 403e2f160cc..13cc491895f 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3450,6 +3450,9 @@ static int dispc_runtime_resume(struct device *dev)
{
int r;
+ if (!dss_runtime_pm_enabled())
+ return -EBUSY;
+
r = dss_runtime_get();
if (r < 0) {
pr_err("dispc_runtime_resume: unable to get dss\n");
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index bc2b596f41d..a9648b6416d 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -706,6 +706,11 @@ static void dss_put_clocks(void)
clk_put(dss.dss_clk);
}
+int dss_runtime_pm_enabled(void)
+{
+ return pm_runtime_enabled(&dss.pdev->dev);
+}
+
int dss_runtime_get(void)
{
int r;
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index db48857a4ce..37fd7c00de0 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -852,6 +852,9 @@ static int hdmi_runtime_resume(struct device *dev)
clk_enable(hdmi.sys_clk);
+ if (!dss_runtime_pm_enabled())
+ return -EBUSY;
+
r = dss_runtime_get();
if (r < 0)
goto err_get_dss;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ca80544c31e..0a0e506efaa 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -717,4 +717,6 @@ int omap_rfbi_update(struct omap_dss_device *dssdev,
int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size,
int data_lines);
+int dss_runtime_pm_enabled(void);
+
#endif