Skip to contentSkip to conversation

drm/bridge: cdns-dsi: Fix the _atomic_check()

PATCH In review Aradhya Bhatia 2 participants 2 messages Apr 10, 2025 – Apr 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: cdns-dsi: Fix the _atomic_check()

Use the "adjusted_mode" for the dsi configuration check, as that is the more appropriate display_mode for validation, and later bridge enable.

Also, fix the mode_valid_check parameter from false to true, as the dsi configuration check is taking place during the check-phase, and the crtc_* mode values are not expected to be populated yet.

Fixes a53d987756ea ("drm/bridge: cdns-dsi: Move DSI mode check to _atomic_check()")
---
 drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +2 -2
index b022dd6e6b6e..1c3fefce5fd2 100644
@@ -989,10 +989,10 @@ static int cdns_dsi_bridge_atomic_check(struct drm_bridge *bridge,
 	struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge);
 	struct cdns_dsi *dsi = input_to_dsi(input);
 	struct cdns_dsi_bridge_state *dsi_state = to_cdns_dsi_bridge_state(bridge_state);
-	const struct drm_display_mode *mode = &crtc_state->mode;
+	const struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
 	struct cdns_dsi_cfg *dsi_cfg = &dsi_state->dsi_cfg;
 
-	return cdns_dsi_check_conf(dsi, mode, dsi_cfg, false);
+	return cdns_dsi_check_conf(dsi, adjusted_mode, dsi_cfg, true);
 }
 
 static struct drm_bridge_state *

base-commit: 0ac7ad5e352dcf18a4d42a4671f7cda69847712b

Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Aradhya Bhatia

Use the "adjusted_mode" for the dsi configuration check, as that is the more appropriate display_mode for validation, and later bridge enable.

Also, fix the mode_valid_check parameter from false to true, as the dsi configuration check is taking place during the check-phase, and the crtc_* mode values are not expected to be populated yet.

Fixes a53d987756ea ("drm/bridge: cdns-dsi: Move DSI mode check to _atomic_check()")
---
  drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c +2 -2
index b022dd6e6b6e..1c3fefce5fd2 100644
@@ -989,10 +989,10 @@ static int cdns_dsi_bridge_atomic_check(struct drm_bridge *bridge,
  	struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge);
  	struct cdns_dsi *dsi = input_to_dsi(input);
  	struct cdns_dsi_bridge_state *dsi_state = to_cdns_dsi_bridge_state(bridge_state);
-	const struct drm_display_mode *mode = &crtc_state->mode;
+	const struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
  	struct cdns_dsi_cfg *dsi_cfg = &dsi_state->dsi_cfg;
 
-	return cdns_dsi_check_conf(dsi, mode, dsi_cfg, false);
+	return cdns_dsi_check_conf(dsi, adjusted_mode, dsi_cfg, true);
  }
 
  static struct drm_bridge_state *
Quoted 1 line

base-commit: 0ac7ad5e352dcf18a4d42a4671f7cda69847712b

I think this makes sense.

Tomi