diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-11 19:17:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-11 19:17:14 -0400 |
commit | 918227bb1b59444a2c467711fd50cc22bb4a897b (patch) | |
tree | 3a7845dbb59f15b29508617fd646ad59448c7c1b /drivers/video | |
parent | 00c3e276c54ca7e102f1b771715da76b4e86a098 (diff) | |
parent | 373b43652150c9342168c846a1efbd81438ea241 (diff) |
Merge tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6
Pull fbdev fixes from Florian Tobias Schandinat:
"Two fixes for OMAPDSS by Tomi Valkeinen:
- one to avoid warnings when runtime PM is not enabled
- one workaround to dependancy issues during suspend/resume"
* tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6:
OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
OMAPDSS: Use PM notifiers for system suspend
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/core.c | 43 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 2 |
7 files changed, 33 insertions, 22 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 5066eee10ccf..58bd9c27369d 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/device.h> | 33 | #include <linux/device.h> |
34 | #include <linux/regulator/consumer.h> | 34 | #include <linux/regulator/consumer.h> |
35 | #include <linux/suspend.h> | ||
35 | 36 | ||
36 | #include <video/omapdss.h> | 37 | #include <video/omapdss.h> |
37 | 38 | ||
@@ -201,6 +202,28 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) | |||
201 | #endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ | 202 | #endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */ |
202 | 203 | ||
203 | /* PLATFORM DEVICE */ | 204 | /* PLATFORM DEVICE */ |
205 | static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d) | ||
206 | { | ||
207 | DSSDBG("pm notif %lu\n", v); | ||
208 | |||
209 | switch (v) { | ||
210 | case PM_SUSPEND_PREPARE: | ||
211 | DSSDBG("suspending displays\n"); | ||
212 | return dss_suspend_all_devices(); | ||
213 | |||
214 | case PM_POST_SUSPEND: | ||
215 | DSSDBG("resuming displays\n"); | ||
216 | return dss_resume_all_devices(); | ||
217 | |||
218 | default: | ||
219 | return 0; | ||
220 | } | ||
221 | } | ||
222 | |||
223 | static struct notifier_block omap_dss_pm_notif_block = { | ||
224 | .notifier_call = omap_dss_pm_notif, | ||
225 | }; | ||
226 | |||
204 | static int __init omap_dss_probe(struct platform_device *pdev) | 227 | static int __init omap_dss_probe(struct platform_device *pdev) |
205 | { | 228 | { |
206 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | 229 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; |
@@ -224,6 +247,8 @@ static int __init omap_dss_probe(struct platform_device *pdev) | |||
224 | else if (pdata->default_device) | 247 | else if (pdata->default_device) |
225 | core.default_display_name = pdata->default_device->name; | 248 | core.default_display_name = pdata->default_device->name; |
226 | 249 | ||
250 | register_pm_notifier(&omap_dss_pm_notif_block); | ||
251 | |||
227 | return 0; | 252 | return 0; |
228 | 253 | ||
229 | err_debugfs: | 254 | err_debugfs: |
@@ -233,6 +258,8 @@ err_debugfs: | |||
233 | 258 | ||
234 | static int omap_dss_remove(struct platform_device *pdev) | 259 | static int omap_dss_remove(struct platform_device *pdev) |
235 | { | 260 | { |
261 | unregister_pm_notifier(&omap_dss_pm_notif_block); | ||
262 | |||
236 | dss_uninitialize_debugfs(); | 263 | dss_uninitialize_debugfs(); |
237 | 264 | ||
238 | dss_uninit_overlays(pdev); | 265 | dss_uninit_overlays(pdev); |
@@ -247,25 +274,9 @@ static void omap_dss_shutdown(struct platform_device *pdev) | |||
247 | dss_disable_all_devices(); | 274 | dss_disable_all_devices(); |
248 | } | 275 | } |
249 | 276 | ||
250 | static int omap_dss_suspend(struct platform_device *pdev, pm_message_t state) | ||
251 | { | ||
252 | DSSDBG("suspend %d\n", state.event); | ||
253 | |||
254 | return dss_suspend_all_devices(); | ||
255 | } | ||
256 | |||
257 | static int omap_dss_resume(struct platform_device *pdev) | ||
258 | { | ||
259 | DSSDBG("resume\n"); | ||
260 | |||
261 | return dss_resume_all_devices(); | ||
262 | } | ||
263 | |||
264 | static struct platform_driver omap_dss_driver = { | 277 | static struct platform_driver omap_dss_driver = { |
265 | .remove = omap_dss_remove, | 278 | .remove = omap_dss_remove, |
266 | .shutdown = omap_dss_shutdown, | 279 | .shutdown = omap_dss_shutdown, |
267 | .suspend = omap_dss_suspend, | ||
268 | .resume = omap_dss_resume, | ||
269 | .driver = { | 280 | .driver = { |
270 | .name = "omapdss", | 281 | .name = "omapdss", |
271 | .owner = THIS_MODULE, | 282 | .owner = THIS_MODULE, |
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 4749ac356469..397d4eee11bb 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -384,7 +384,7 @@ void dispc_runtime_put(void) | |||
384 | DSSDBG("dispc_runtime_put\n"); | 384 | DSSDBG("dispc_runtime_put\n"); |
385 | 385 | ||
386 | r = pm_runtime_put_sync(&dispc.pdev->dev); | 386 | r = pm_runtime_put_sync(&dispc.pdev->dev); |
387 | WARN_ON(r < 0); | 387 | WARN_ON(r < 0 && r != -ENOSYS); |
388 | } | 388 | } |
389 | 389 | ||
390 | static inline bool dispc_mgr_is_lcd(enum omap_channel channel) | 390 | static inline bool dispc_mgr_is_lcd(enum omap_channel channel) |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index ca8382d346e9..14ce8cc079e3 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -1075,7 +1075,7 @@ void dsi_runtime_put(struct platform_device *dsidev) | |||
1075 | DSSDBG("dsi_runtime_put\n"); | 1075 | DSSDBG("dsi_runtime_put\n"); |
1076 | 1076 | ||
1077 | r = pm_runtime_put_sync(&dsi->pdev->dev); | 1077 | r = pm_runtime_put_sync(&dsi->pdev->dev); |
1078 | WARN_ON(r < 0); | 1078 | WARN_ON(r < 0 && r != -ENOSYS); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | /* source clock for DSI PLL. this could also be PCLKFREE */ | 1081 | /* source clock for DSI PLL. this could also be PCLKFREE */ |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 770632359a17..d2b57197b292 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -731,7 +731,7 @@ static void dss_runtime_put(void) | |||
731 | DSSDBG("dss_runtime_put\n"); | 731 | DSSDBG("dss_runtime_put\n"); |
732 | 732 | ||
733 | r = pm_runtime_put_sync(&dss.pdev->dev); | 733 | r = pm_runtime_put_sync(&dss.pdev->dev); |
734 | WARN_ON(r < 0 && r != -EBUSY); | 734 | WARN_ON(r < 0 && r != -ENOSYS && r != -EBUSY); |
735 | } | 735 | } |
736 | 736 | ||
737 | /* DEBUGFS */ | 737 | /* DEBUGFS */ |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 8195c7166d20..26a2430a7028 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -138,7 +138,7 @@ static void hdmi_runtime_put(void) | |||
138 | DSSDBG("hdmi_runtime_put\n"); | 138 | DSSDBG("hdmi_runtime_put\n"); |
139 | 139 | ||
140 | r = pm_runtime_put_sync(&hdmi.pdev->dev); | 140 | r = pm_runtime_put_sync(&hdmi.pdev->dev); |
141 | WARN_ON(r < 0); | 141 | WARN_ON(r < 0 && r != -ENOSYS); |
142 | } | 142 | } |
143 | 143 | ||
144 | static int __init hdmi_init_display(struct omap_dss_device *dssdev) | 144 | static int __init hdmi_init_display(struct omap_dss_device *dssdev) |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 3d8c206e90e5..7985fa12b9b4 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -141,7 +141,7 @@ static void rfbi_runtime_put(void) | |||
141 | DSSDBG("rfbi_runtime_put\n"); | 141 | DSSDBG("rfbi_runtime_put\n"); |
142 | 142 | ||
143 | r = pm_runtime_put_sync(&rfbi.pdev->dev); | 143 | r = pm_runtime_put_sync(&rfbi.pdev->dev); |
144 | WARN_ON(r < 0); | 144 | WARN_ON(r < 0 && r != -ENOSYS); |
145 | } | 145 | } |
146 | 146 | ||
147 | void rfbi_bus_lock(void) | 147 | void rfbi_bus_lock(void) |
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 2b8973931ff4..3907c8b6ecbc 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -402,7 +402,7 @@ static void venc_runtime_put(void) | |||
402 | DSSDBG("venc_runtime_put\n"); | 402 | DSSDBG("venc_runtime_put\n"); |
403 | 403 | ||
404 | r = pm_runtime_put_sync(&venc.pdev->dev); | 404 | r = pm_runtime_put_sync(&venc.pdev->dev); |
405 | WARN_ON(r < 0); | 405 | WARN_ON(r < 0 && r != -ENOSYS); |
406 | } | 406 | } |
407 | 407 | ||
408 | static const struct venc_config *venc_timings_to_config( | 408 | static const struct venc_config *venc_timings_to_config( |