summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2024-12-12 01:03:20 +0200
committerImre Deak <imre.deak@intel.com>2024-12-17 15:45:56 +0200
commitdae4f9b43c9e54bdf5a156f48333a7e2832da1a1 (patch)
treee9da352af04af901006f54805a516612b1d0cc7a
parent2f17099ab9098e4541c7a2564b3dd7af9923c54b (diff)
drm/connector: Add deprecation notes for drm_connector_register/unregister
Drivers should register/unregister only dynamic (MST) connectors manually using drm_connector_dynamic_register()/unregister(). Static connectors are registered/unregistered by the DRM core automatically. Some drivers still call drm_connector_register()/ unregister() for static connectors, both of which should be a nop for them and hence are scheduled to be removed. Update the function documentation for these functions accordingly. v2: s/deprication/deprecation in subject line. (Jani) Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-4-imre.deak@intel.com
-rw-r--r--drivers/gpu/drm/drm_connector.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 464b2f5831ef..3c6c0d7b9285 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -768,14 +768,17 @@ EXPORT_SYMBOL(drm_connector_cleanup);
* drm_connector_register - register a connector
* @connector: the connector to register
*
- * 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().
+ * Register userspace interfaces for a connector. Drivers shouldn't call this
+ * function. Static connectors will be registered automatically by DRM core
+ * from drm_dev_register(), dynamic connectors (MST) should be registered by
+ * drivers calling drm_connector_dynamic_register().
*
* When the connector is no longer available, callers must call
* drm_connector_unregister().
*
+ * Note: Existing uses of this function in drivers should be a nop already and
+ * are scheduled to be removed.
+ *
* Returns:
* Zero on success, error code on failure.
*/
@@ -864,9 +867,14 @@ EXPORT_SYMBOL(drm_connector_dynamic_register);
* drm_connector_unregister - unregister a connector
* @connector: the connector to unregister
*
- * Unregister userspace interfaces for a connector. Only call this for
- * connectors which have been registered explicitly by calling
- * drm_connector_register().
+ * Unregister userspace interfaces for a connector. Drivers should call this
+ * for dynamic connectors (MST) only, which were registered explicitly by
+ * calling drm_connector_dynamic_register(). All other - static - connectors
+ * will be unregistered automatically by DRM core and drivers shouldn't call
+ * this function for those.
+ *
+ * Note: Existing uses of this function in drivers for static connectors
+ * should be a nop already and are scheduled to be removed.
*/
void drm_connector_unregister(struct drm_connector *connector)
{