mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
drm/connector: Warn if a connector is registered/added incorrectly
All the drivers should be converted now to use drm_connector_dynamic_init() for MST connectors, hence drm_connector_dynamic_register()->drm_connector_add() can WARN now if this was not the case (for instance if a driver inited an MST connector with one of the drm_connector_init*() functions incorrectly). 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-9-imre.deak@intel.com
This commit is contained in:
parent
5a83c9293c
commit
04e10d00bf
|
|
@ -331,11 +331,7 @@ static void drm_connector_add(struct drm_connector *connector)
|
|||
struct drm_device *dev = connector->dev;
|
||||
struct drm_mode_config *config = &dev->mode_config;
|
||||
|
||||
/*
|
||||
* TODO: Change this to a WARN, once all drivers are converted to
|
||||
* call drm_connector_dynamic_init() for MST connectors.
|
||||
*/
|
||||
if (!list_empty(&connector->head))
|
||||
if (drm_WARN_ON(dev, !list_empty(&connector->head)))
|
||||
return;
|
||||
|
||||
spin_lock_irq(&config->connector_list_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user