#endif /* CONFIG_OMAP2_DSS_DEBUGFS */
 
 /* 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:
-       case PM_HIBERNATION_PREPARE:
-       case PM_RESTORE_PREPARE:
-               DSSDBG("suspending displays\n");
-               return dss_suspend_all_devices();
-
-       case PM_POST_SUSPEND:
-       case PM_POST_HIBERNATION:
-       case PM_POST_RESTORE:
-               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)
 {
        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:
 
 static int omap_dss_remove(struct platform_device *pdev)
 {
-       unregister_pm_notifier(&omap_dss_pm_notif_block);
-
        dss_uninitialize_debugfs();
 
        return 0;
 
 }
 EXPORT_SYMBOL(omapdss_default_get_timings);
 
-int dss_suspend_all_devices(void)
-{
-       struct omap_dss_device *dssdev = NULL;
-
-       for_each_dss_dev(dssdev) {
-               if (!dssdev->driver)
-                       continue;
-
-               if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
-                       dssdev->driver->disable(dssdev);
-                       dssdev->activate_after_resume = true;
-               } else {
-                       dssdev->activate_after_resume = false;
-               }
-       }
-
-       return 0;
-}
-
-int dss_resume_all_devices(void)
-{
-       struct omap_dss_device *dssdev = NULL;
-
-       for_each_dss_dev(dssdev) {
-               if (!dssdev->driver)
-                       continue;
-
-               if (dssdev->activate_after_resume) {
-                       dssdev->driver->enable(dssdev);
-                       dssdev->activate_after_resume = false;
-               }
-       }
-
-       return 0;
-}
-
 void dss_disable_all_devices(void)
 {
        struct omap_dss_device *dssdev = NULL;
 
 int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *));
 
 /* display */
-int dss_suspend_all_devices(void);
-int dss_resume_all_devices(void);
 void dss_disable_all_devices(void);
 
 int display_init_sysfs(struct platform_device *pdev);
 
 }
 
 #ifdef CONFIG_PM_SLEEP
+static int omap_drm_suspend_all_displays(void)
+{
+       struct omap_dss_device *dssdev = NULL;
+
+       for_each_dss_dev(dssdev) {
+               if (!dssdev->driver)
+                       continue;
+
+               if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
+                       dssdev->driver->disable(dssdev);
+                       dssdev->activate_after_resume = true;
+               } else {
+                       dssdev->activate_after_resume = false;
+               }
+       }
+
+       return 0;
+}
+
+static int omap_drm_resume_all_displays(void)
+{
+       struct omap_dss_device *dssdev = NULL;
+
+       for_each_dss_dev(dssdev) {
+               if (!dssdev->driver)
+                       continue;
+
+               if (dssdev->activate_after_resume) {
+                       dssdev->driver->enable(dssdev);
+                       dssdev->activate_after_resume = false;
+               }
+       }
+
+       return 0;
+}
+
 static int omap_drm_suspend(struct device *dev)
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
 
        drm_kms_helper_poll_disable(drm_dev);
 
+       drm_modeset_lock_all(drm_dev);
+       omap_drm_suspend_all_displays();
+       drm_modeset_unlock_all(drm_dev);
+
        return 0;
 }
 
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
 
+       drm_modeset_lock_all(drm_dev);
+       omap_drm_resume_all_displays();
+       drm_modeset_unlock_all(drm_dev);
+
        drm_kms_helper_poll_enable(drm_dev);
 
        return omap_gem_resume(dev);