Commit eecdd4bd authored by Marek Vasut's avatar Marek Vasut Committed by Raphael Gallais-Pou
Browse files

drm/bridge: stm_lvds: Do not fail atomic_check on disabled connector



If the connector is disabled, the new connector state has .crtc field
set to NULL and there is nothing more to validate after that point.
The .crtc field being NULL is not an error. Test for .crtc being NULL,
and if it is NULL, exit early with return 0.

This fixes a failure in suspend/resume path, where the connector is
already disabled, but .atomic_check is called, fails, returns -EINVAL
and blocks the suspend entry.

Fixes: aca1cbc1 ("drm/stm: lvds: add new STM32 LVDS Display Interface Transmitter driver")
Signed-off-by: default avatarMarek Vasut <marex@nabladev.com>
Acked-by: default avatarRaphaël Gallais-Pou <raphael.gallais-pou@foss.st.com>
Link: https://patch.msgid.link/20260409024928.344010-1-marex@nabladev.com


Signed-off-by: default avatarRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
parent 79ae8510
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -897,14 +897,14 @@ static int lvds_connector_atomic_check(struct drm_connector *connector,
	if (!conn_state)
		return -EINVAL;

	if (!conn_state->crtc)
		return 0;

	if (list_empty(&connector->modes)) {
		drm_dbg(connector->dev, "connector: empty modes list\n");
		return -EINVAL;
	}

	if (!conn_state->crtc)
		return -EINVAL;

	panel_mode = list_first_entry(&connector->modes,
				      struct drm_display_mode, head);