mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
fbdev fixes for 3.5
- 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iQIcBAABAgAGBQJP/f14AAoJECSVL5KnPj1PxNoP/2vTGFkR6RTF/os1cLg6vY/s mRJkKk+tcEA4lWG26rEgyJDCNhN0gRkETkq5mB5cJqR8BcDdZBzrBUEyhVZW6qlC sBNUz0A/6HobW5lir1TMxoSCdyYWUAW8b1ywzJcmHl753Cmc8DrnVlAg/H8T6AHs uHd4sNutLbPCw9oziphImjY5U7RHGPR3SKSb7RCaLiLHk0/JYTw55+K8EwUUSDcV OdcFBPrBUqoRixE/1UtcXd6Ko3MuhgXIhS+yOzjydm5Y0QNfz84t2+/WXG1dZoRa Gv8KHntnP0tKaYQ1rHHCXPv2mZqKEWx91WAZWjIyeaKvI6nAfh9YvTkc4plhBKzR 6hvK1ucRlWnOUwVV0qqaLKR/BMAmuVoF+VjizgDlmT5omUNZk3gufAUkSAAuTu09 arhXh6WqTJBMGtbxEl7IPOwhBRty9gxsCmOGtDnuGUkIArEDzc0hCAEnU3QyXur1 //SsR/DPxcZnSol4MzPPNrn0upLiZ5ZtsLAt9lVbxdji6VzsK7Ktq1m2Sry8k4Ig xbn2zZaFxIBAMM8wA59X21ap09C2oecxPeXexm1oGFxedbtE/KGQErHaOTdzZheg XuYaxWFVkDsinPlzXXkh5wx+5QZaRshK7piyRilKI3lsOqgIIpEN3B7xhacOtMLZ EjB0RjujdBbKqhAz8nQM =petk -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
918227bb1b
@ -32,6 +32,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/suspend.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
|
||||
@ -201,6 +202,28 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
|
||||
#endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */
|
||||
|
||||
/* PLATFORM DEVICE */
|
||||
static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d)
|
||||
{
|
||||
DSSDBG("pm notif %lu\n", v);
|
||||
|
||||
switch (v) {
|
||||
case PM_SUSPEND_PREPARE:
|
||||
DSSDBG("suspending displays\n");
|
||||
return dss_suspend_all_devices();
|
||||
|
||||
case PM_POST_SUSPEND:
|
||||
DSSDBG("resuming displays\n");
|
||||
return dss_resume_all_devices();
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static struct notifier_block omap_dss_pm_notif_block = {
|
||||
.notifier_call = omap_dss_pm_notif,
|
||||
};
|
||||
|
||||
static int __init omap_dss_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
|
||||
@ -224,6 +247,8 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
||||
else if (pdata->default_device)
|
||||
core.default_display_name = pdata->default_device->name;
|
||||
|
||||
register_pm_notifier(&omap_dss_pm_notif_block);
|
||||
|
||||
return 0;
|
||||
|
||||
err_debugfs:
|
||||
@ -233,6 +258,8 @@ err_debugfs:
|
||||
|
||||
static int omap_dss_remove(struct platform_device *pdev)
|
||||
{
|
||||
unregister_pm_notifier(&omap_dss_pm_notif_block);
|
||||
|
||||
dss_uninitialize_debugfs();
|
||||
|
||||
dss_uninit_overlays(pdev);
|
||||
@ -247,25 +274,9 @@ static void omap_dss_shutdown(struct platform_device *pdev)
|
||||
dss_disable_all_devices();
|
||||
}
|
||||
|
||||
static int omap_dss_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
{
|
||||
DSSDBG("suspend %d\n", state.event);
|
||||
|
||||
return dss_suspend_all_devices();
|
||||
}
|
||||
|
||||
static int omap_dss_resume(struct platform_device *pdev)
|
||||
{
|
||||
DSSDBG("resume\n");
|
||||
|
||||
return dss_resume_all_devices();
|
||||
}
|
||||
|
||||
static struct platform_driver omap_dss_driver = {
|
||||
.remove = omap_dss_remove,
|
||||
.shutdown = omap_dss_shutdown,
|
||||
.suspend = omap_dss_suspend,
|
||||
.resume = omap_dss_resume,
|
||||
.driver = {
|
||||
.name = "omapdss",
|
||||
.owner = THIS_MODULE,
|
||||
|
@ -384,7 +384,7 @@ void dispc_runtime_put(void)
|
||||
DSSDBG("dispc_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&dispc.pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
WARN_ON(r < 0 && r != -ENOSYS);
|
||||
}
|
||||
|
||||
static inline bool dispc_mgr_is_lcd(enum omap_channel channel)
|
||||
|
@ -1075,7 +1075,7 @@ void dsi_runtime_put(struct platform_device *dsidev)
|
||||
DSSDBG("dsi_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&dsi->pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
WARN_ON(r < 0 && r != -ENOSYS);
|
||||
}
|
||||
|
||||
/* source clock for DSI PLL. this could also be PCLKFREE */
|
||||
|
@ -731,7 +731,7 @@ static void dss_runtime_put(void)
|
||||
DSSDBG("dss_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&dss.pdev->dev);
|
||||
WARN_ON(r < 0 && r != -EBUSY);
|
||||
WARN_ON(r < 0 && r != -ENOSYS && r != -EBUSY);
|
||||
}
|
||||
|
||||
/* DEBUGFS */
|
||||
|
@ -138,7 +138,7 @@ static void hdmi_runtime_put(void)
|
||||
DSSDBG("hdmi_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&hdmi.pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
WARN_ON(r < 0 && r != -ENOSYS);
|
||||
}
|
||||
|
||||
static int __init hdmi_init_display(struct omap_dss_device *dssdev)
|
||||
|
@ -141,7 +141,7 @@ static void rfbi_runtime_put(void)
|
||||
DSSDBG("rfbi_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&rfbi.pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
WARN_ON(r < 0 && r != -ENOSYS);
|
||||
}
|
||||
|
||||
void rfbi_bus_lock(void)
|
||||
|
@ -402,7 +402,7 @@ static void venc_runtime_put(void)
|
||||
DSSDBG("venc_runtime_put\n");
|
||||
|
||||
r = pm_runtime_put_sync(&venc.pdev->dev);
|
||||
WARN_ON(r < 0);
|
||||
WARN_ON(r < 0 && r != -ENOSYS);
|
||||
}
|
||||
|
||||
static const struct venc_config *venc_timings_to_config(
|
||||
|
Loading…
Reference in New Issue
Block a user