There is no need to re-compute the dsi lane capability because it
only depends on dsi hw version.
Since dsi hw version is detected at probe(), move there also the
assignment of dsi lane capability.

Signed-off-by: Antonio Borneo <[email protected]>
---
To: David Airlie <[email protected]>
To: Daniel Vetter <[email protected]>
To: Andrzej Hajda <[email protected]>
To: Neil Armstrong <[email protected]>
To: Robert Foss <[email protected]>
To: Laurent Pinchart <[email protected]>
To: Jonas Karlman <[email protected]>
To: Jernej Skrabec <[email protected]>
To: Yannick Fertre <[email protected]>
To: Philippe Cornu <[email protected]>
To: Benjamin Gaignard <[email protected]>
To: Maxime Coquelin <[email protected]>
To: Alexandre Torgue <[email protected]>
To: Philipp Zabel <[email protected]>
To: [email protected]
To: [email protected]
To: [email protected]
Cc: [email protected]
---
 drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c 
b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
index 32cb41b2202f..480fdf256f01 100644
--- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
+++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
@@ -247,14 +247,6 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct 
drm_display_mode *mode,
        int ret, bpp;
        u32 val;
 
-       /* Update lane capabilities according to hw version */
-       dsi->lane_min_kbps = LANE_MIN_KBPS;
-       dsi->lane_max_kbps = LANE_MAX_KBPS;
-       if (dsi->hw_version == HWVER_131) {
-               dsi->lane_min_kbps *= 2;
-               dsi->lane_max_kbps *= 2;
-       }
-
        pll_in_khz = (unsigned int)(clk_get_rate(dsi->pllref_clk) / 1000);
 
        /* Compute requested pll out */
@@ -417,6 +409,14 @@ static int dw_mipi_dsi_stm_probe(struct platform_device 
*pdev)
                goto err_dsi_probe;
        }
 
+       /* set lane capabilities according to hw version */
+       dsi->lane_min_kbps = LANE_MIN_KBPS;
+       dsi->lane_max_kbps = LANE_MAX_KBPS;
+       if (dsi->hw_version == HWVER_131) {
+               dsi->lane_min_kbps *= 2;
+               dsi->lane_max_kbps *= 2;
+       }
+
        dw_mipi_dsi_stm_plat_data.base = dsi->base;
        dw_mipi_dsi_stm_plat_data.priv_data = dsi;
 

base-commit: 70704fbf67ddc07ffc81073a3af1f7b2171697eb
-- 
2.34.1

Reply via email to