diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2016-06-21 16:37:09 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-21 21:32:52 +0200 |
commit | 79190ea2658a93818791335aa99969ca779161c6 (patch) | |
tree | 9927884e69de84050b8209f1a7354f4a55e0a6ad /drivers/gpu/drm/drm_drv.c | |
parent | b7868c68a540b32ffa5354bf3256124edafe2f40 (diff) | |
download | lwn-79190ea2658a93818791335aa99969ca779161c6.tar.gz lwn-79190ea2658a93818791335aa99969ca779161c6.zip |
drm: Add callbacks for late registering
Like what has been done for connectors add callbacks on encoder,
crtc and plane to let driver do actions after drm device registration.
Correspondingly, add callbacks called before unregister drm device.
version 2:
add drm_modeset_register_all() and drm_modeset_unregister_all()
to centralize all calls
version 3:
in error case unwind registers in drm_modeset_register_all
fix uninitialed return value
inverse order of unregistration in drm_modeset_unregister_all
version 4:
move function definitions in drm_crtc_internal.h
remove not needed documentation
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466519829-4000-1-git-send-email-benjamin.gaignard@linaro.org
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index c7101c06b02e..8ff664f19ff4 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <drm/drmP.h> #include <drm/drm_core.h> +#include "drm_crtc_internal.h" #include "drm_legacy.h" #include "drm_internal.h" @@ -688,7 +689,7 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) } if (drm_core_check_feature(dev, DRIVER_MODESET)) - drm_connector_register_all(dev); + drm_modeset_register_all(dev); ret = 0; goto out_unlock; @@ -721,7 +722,7 @@ void drm_dev_unregister(struct drm_device *dev) drm_lastclose(dev); if (drm_core_check_feature(dev, DRIVER_MODESET)) - drm_connector_unregister_all(dev); + drm_modeset_unregister_all(dev); if (dev->driver->unload) dev->driver->unload(dev); |