diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dss.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dss.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index af04151c37ff..7c2107ee97ab 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/suspend.h> | 41 | #include <linux/suspend.h> |
42 | #include <linux/component.h> | 42 | #include <linux/component.h> |
43 | #include <linux/pinctrl/consumer.h> | 43 | #include <linux/pinctrl/consumer.h> |
44 | #include <video/omapdss.h> | ||
44 | 45 | ||
45 | #include "omapdss.h" | 46 | #include "omapdss.h" |
46 | #include "dss.h" | 47 | #include "dss.h" |
@@ -862,6 +863,9 @@ int dss_runtime_get(void) | |||
862 | { | 863 | { |
863 | int r; | 864 | int r; |
864 | 865 | ||
866 | if (omapdss_skipinit()) | ||
867 | return 0; | ||
868 | |||
865 | DSSDBG("dss_runtime_get\n"); | 869 | DSSDBG("dss_runtime_get\n"); |
866 | 870 | ||
867 | r = pm_runtime_get_sync(&dss.pdev->dev); | 871 | r = pm_runtime_get_sync(&dss.pdev->dev); |
@@ -873,6 +877,9 @@ void dss_runtime_put(void) | |||
873 | { | 877 | { |
874 | int r; | 878 | int r; |
875 | 879 | ||
880 | if (omapdss_skipinit()) | ||
881 | return; | ||
882 | |||
876 | DSSDBG("dss_runtime_put\n"); | 883 | DSSDBG("dss_runtime_put\n"); |
877 | 884 | ||
878 | r = pm_runtime_put_sync(&dss.pdev->dev); | 885 | r = pm_runtime_put_sync(&dss.pdev->dev); |
@@ -1221,11 +1228,13 @@ static int dss_bind(struct device *dev) | |||
1221 | if (r) | 1228 | if (r) |
1222 | goto err_init_ports; | 1229 | goto err_init_ports; |
1223 | 1230 | ||
1224 | pm_runtime_enable(&pdev->dev); | 1231 | if (!omapdss_skipinit()) { |
1232 | pm_runtime_enable(&pdev->dev); | ||
1225 | 1233 | ||
1226 | r = dss_runtime_get(); | 1234 | r = dss_runtime_get(); |
1227 | if (r) | 1235 | if (r) |
1228 | goto err_runtime_get; | 1236 | goto err_runtime_get; |
1237 | } | ||
1229 | 1238 | ||
1230 | dss.dss_clk_rate = clk_get_rate(dss.dss_clk); | 1239 | dss.dss_clk_rate = clk_get_rate(dss.dss_clk); |
1231 | 1240 | ||
@@ -1266,7 +1275,8 @@ static int dss_bind(struct device *dev) | |||
1266 | 1275 | ||
1267 | err_component: | 1276 | err_component: |
1268 | err_runtime_get: | 1277 | err_runtime_get: |
1269 | pm_runtime_disable(&pdev->dev); | 1278 | if (!omapdss_skipinit()) |
1279 | pm_runtime_disable(&pdev->dev); | ||
1270 | dss_uninit_ports(pdev); | 1280 | dss_uninit_ports(pdev); |
1271 | err_init_ports: | 1281 | err_init_ports: |
1272 | if (dss.video1_pll) | 1282 | if (dss.video1_pll) |
@@ -1296,7 +1306,8 @@ static void dss_unbind(struct device *dev) | |||
1296 | 1306 | ||
1297 | dss_uninit_ports(pdev); | 1307 | dss_uninit_ports(pdev); |
1298 | 1308 | ||
1299 | pm_runtime_disable(&pdev->dev); | 1309 | if (!omapdss_skipinit()) |
1310 | pm_runtime_disable(&pdev->dev); | ||
1300 | 1311 | ||
1301 | dss_put_clocks(); | 1312 | dss_put_clocks(); |
1302 | } | 1313 | } |