drm/doc: Improve docs around connector (un)registration
Current code is quite a mess unfortunately, so also add a todo.rst entry to maybe fix it up eventually. Cc: Michel Dänzer <michel@daenzer.net> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190917120936.7501-2-daniel.vetter@ffwll.ch
This commit is contained in:
parent
aefdaa15e5
commit
69b22f51e6
@ -284,6 +284,18 @@ drm_fb_helper tasks
|
||||
removed: drm_fb_helper_single_add_all_connectors(),
|
||||
drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
|
||||
|
||||
connector register/unregister fixes
|
||||
-----------------------------------
|
||||
|
||||
- For most connectors it's a no-op to call drm_connector_register/unregister
|
||||
directly from driver code, drm_dev_register/unregister take care of this
|
||||
already. We can remove all of them.
|
||||
|
||||
- For dp drivers it's a bit more a mess, since we need the connector to be
|
||||
registered when calling drm_dp_aux_register. Fix this by instead calling
|
||||
drm_dp_aux_init, and moving the actual registering into a late_register
|
||||
callback as recommended in the kerneldoc.
|
||||
|
||||
Core refactorings
|
||||
=================
|
||||
|
||||
|
@ -467,7 +467,10 @@ EXPORT_SYMBOL(drm_connector_cleanup);
|
||||
* drm_connector_register - register a connector
|
||||
* @connector: the connector to register
|
||||
*
|
||||
* Register userspace interfaces for a connector
|
||||
* Register userspace interfaces for a connector. Only call this for connectors
|
||||
* which can be hotplugged after drm_dev_register() has been called already,
|
||||
* e.g. DP MST connectors. All other connectors will be registered automatically
|
||||
* when calling drm_dev_register().
|
||||
*
|
||||
* Returns:
|
||||
* Zero on success, error code on failure.
|
||||
@ -513,7 +516,10 @@ EXPORT_SYMBOL(drm_connector_register);
|
||||
* drm_connector_unregister - unregister a connector
|
||||
* @connector: the connector to unregister
|
||||
*
|
||||
* Unregister userspace interfaces for a connector
|
||||
* Unregister userspace interfaces for a connector. Only call this for
|
||||
* connectors which have registered explicitly by calling drm_dev_register(),
|
||||
* since connectors are unregistered automatically when drm_dev_unregister() is
|
||||
* called.
|
||||
*/
|
||||
void drm_connector_unregister(struct drm_connector *connector)
|
||||
{
|
||||
|
@ -1109,6 +1109,14 @@ EXPORT_SYMBOL(drm_dp_aux_init);
|
||||
* @aux: DisplayPort AUX channel
|
||||
*
|
||||
* Automatically calls drm_dp_aux_init() if this hasn't been done yet.
|
||||
* This should only be called when the underlying &struct drm_connector is
|
||||
* initialiazed already. Therefore the best place to call this is from
|
||||
* &drm_connector_funcs.late_register. Not that drivers which don't follow this
|
||||
* will Oops when CONFIG_DRM_DP_AUX_CHARDEV is enabled.
|
||||
*
|
||||
* Drivers which need to use the aux channel before that point (e.g. at driver
|
||||
* load time, before drm_dev_register() has been called) need to call
|
||||
* drm_dp_aux_init().
|
||||
*
|
||||
* Returns 0 on success or a negative error code on failure.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user