summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-06-08 12:49:29 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-09 08:43:25 +0200
commitd14d2a8453d650bea32a1c5271af1458cd283a0f (patch)
treea6223cbb25dcb9b6d50de1248d96e7f5df9b8519 /include/drm/drmP.h
parentMerge tag 'omapdrm-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tomb... (diff)
downloadlinux-d14d2a8453d650bea32a1c5271af1458cd283a0f.tar.xz
linux-d14d2a8453d650bea32a1c5271af1458cd283a0f.zip
drm: Remove dev_pm_ops from drm_class
The PM core introduced the ability to keep devices runtime suspended during the entire system suspend/resume process with commit aae4518b3124 ("PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily"). Before this so-called "direct-complete" procedure was introduced, devices were always runtime resumed only to be immediately put to sleep again using their ->suspend hook. Direct-complete is enabled by returning a positive value from the ->prepare hook. The PCI core usually does this automatically. Direct-complete is only available for a device if all children use it as well. Currently we cannot support direct-complete for DRM drivers because the DRM core automatically registers multiple DRM minors which belong to device class drm_class, and drm_class uses a struct dev_pm_ops which lacks the ->prepare callback. While this could be solved by adding the missing ->prepare callback, closer inspection shows that there are no DRM drivers left which declare the legacy ->suspend and ->resume callbacks in their drm_driver struct. The last ones to remove them were i915 with commit 1751fcf9f92e ("drm/i915: Fix module initialisation, v2.") and exynos with commit e7fefb1d5af5 ("drm/exynos: remove legacy ->suspend()/resume()"). Consequently the struct dev_pm_ops of drm_class is now dead code. Remove it. If no dev_pm_ops is declared for a device, the PM core automatically enables direct-complete for it, thereby making that mechanism available to the parent DRM PCI devices. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/da848fcd5ca72a35d9a722e644719977a47bb7ba.1465382836.git.lukas@wunner.de
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 9e5eefd6f733..a4f9babce249 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -417,8 +417,6 @@ struct drm_driver {
void (*postclose) (struct drm_device *, struct drm_file *);
void (*lastclose) (struct drm_device *);
int (*unload) (struct drm_device *);
- int (*suspend) (struct drm_device *, pm_message_t state);
- int (*resume) (struct drm_device *);
int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
int (*dma_quiescent) (struct drm_device *);
int (*context_dtor) (struct drm_device *dev, int context);