drm: Add callbacks for late registering
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Tue, 21 Jun 2016 14:37:09 +0000 (16:37 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 21 Jun 2016 19:32:52 +0000 (21:32 +0200)
commit79190ea2658a93818791335aa99969ca779161c6
tree9927884e69de84050b8209f1a7354f4a55e0a6ad
parentb7868c68a540b32ffa5354bf3256124edafe2f40
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
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_crtc_internal.h
drivers/gpu/drm/drm_drv.c
include/drm/drm_crtc.h