Skip to content

Commit bcd6808

Browse files
committed
drm/bridge: cdns-dsi: Drop checks that shouldn't be in .mode_valid()
The docs say about mode_valid(): "it is not allowed to look at anything else but the passed-in mode, and validate it against configuration-invariant hardware constraints" We're doing a lot more than just looking at the mode. The main issue here is that we're doing checks based on the pixel clock, before we know what the pixel clock from the crtc actually is. So, drop the cdns_dsi_check_conf() call from .mode_valid(). Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Tested-by: Parth Pancholi <parth.pancholi@toradex.com> Tested-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Link: https://lore.kernel.org/r/20250723-cdns-dsi-impro-v5-7-e61cc06074c2@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
1 parent 644696a commit bcd6808

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,7 @@ cdns_dsi_bridge_mode_valid(struct drm_bridge *bridge,
603603
struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge);
604604
struct cdns_dsi *dsi = input_to_dsi(input);
605605
struct cdns_dsi_output *output = &dsi->output;
606-
struct cdns_dsi_cfg dsi_cfg;
607-
int bpp, ret;
606+
int bpp;
608607

609608
/*
610609
* VFP_DSI should be less than VFP_DPI and VFP_DSI should be at
@@ -622,10 +621,6 @@ cdns_dsi_bridge_mode_valid(struct drm_bridge *bridge,
622621
if ((mode->hdisplay * bpp) % 32)
623622
return MODE_H_ILLEGAL;
624623

625-
ret = cdns_dsi_check_conf(dsi, mode, &dsi_cfg);
626-
if (ret)
627-
return MODE_BAD;
628-
629624
return MODE_OK;
630625
}
631626

0 commit comments

Comments
 (0)