diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-06-17 09:25:17 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-17 14:42:40 +0200 |
commit | e28cd4d0a223e1bcea616326e2281900e7e7e9a2 (patch) | |
tree | 036b8b165befae00673acc42a853ca4c01335422 /drivers/gpu/drm/drm_drv.c | |
parent | acd8f414c957406c8272cbc380dd50fea945dcf1 (diff) | |
download | lwn-e28cd4d0a223e1bcea616326e2281900e7e7e9a2.tar.gz lwn-e28cd4d0a223e1bcea616326e2281900e7e7e9a2.zip |
drm: Automatically register/unregister all connectors
As the drm_connector is now safe for multiple calls to
register/unregister, automatically perform a registration on all known
connectors drm drv_register (and unregister from drm_drv_unregister).
Drivers can still call drm_connector_register() and
drm_connector_unregister() individually, or defer as required.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466151923-1572-2-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 40fb4352432c..2067ff089380 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -650,11 +650,7 @@ EXPORT_SYMBOL(drm_dev_unref); * * Register the DRM device @dev with the system, advertise device to user-space * and start normal device operation. @dev must be allocated via drm_dev_alloc() - * previously. Right after drm_dev_register() the driver should call - * drm_connector_register_all() to register all connectors in sysfs. This is - * a separate call for backward compatibility with drivers still using - * the deprecated ->load() callback, where connectors are registered from within - * the ->load() callback. + * previously. * * Never call this twice on any device! * @@ -691,6 +687,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) goto err_minors; } + drm_connector_register_all(dev); + ret = 0; goto out_unlock; @@ -721,6 +719,8 @@ void drm_dev_unregister(struct drm_device *dev) drm_lastclose(dev); + drm_connector_unregister_all(dev); + if (dev->driver->unload) dev->driver->unload(dev); |