Skip to content

Commit 5d2ee12

Browse files
Aradhya BhatiaSasha Levin
authored andcommitted
drm/bridge: cdns-dsi: Fix the clock variable for mode_valid()
commit 132bdce upstream. The crtc_* mode parameters do not get generated (duplicated in this case) from the regular parameters before the mode validation phase begins. The rest of the code conditionally uses the crtc_* parameters only during the bridge enable phase, but sticks to the regular parameters for mode validation. In this singular instance, however, the driver tries to use the crtc_clock parameter even during the mode validation, causing the validation to fail. Allow the D-Phy config checks to use mode->clock instead of mode->crtc_clock during mode_valid checks, like everywhere else in the driver. Fixes: fced5a3 ("drm/bridge: cdns: Convert to phy framework") Cc: [email protected] Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 515140d commit 5d2ee12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,14 @@ static int cdns_dsi_check_conf(struct cdns_dsi *dsi,
609609
struct phy_configure_opts_mipi_dphy *phy_cfg = &output->phy_opts.mipi_dphy;
610610
unsigned long dsi_hss_hsa_hse_hbp;
611611
unsigned int nlanes = output->dev->lanes;
612+
int mode_clock = (mode_valid_check ? mode->clock : mode->crtc_clock);
612613
int ret;
613614

614615
ret = cdns_dsi_mode2cfg(dsi, mode, dsi_cfg, mode_valid_check);
615616
if (ret)
616617
return ret;
617618

618-
phy_mipi_dphy_get_default_config(mode->crtc_clock * 1000,
619+
phy_mipi_dphy_get_default_config(mode_clock * 1000,
619620
mipi_dsi_pixel_format_to_bpp(output->dev->format),
620621
nlanes, phy_cfg);
621622

0 commit comments

Comments
 (0)