]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/bridge: cdns-dsi: Remove broken fifo emptying check
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 23 Jul 2025 10:05:12 +0000 (13:05 +0300)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 13 Aug 2025 07:20:37 +0000 (10:20 +0300)
The driver checks if "DPI(HFP) > DSI(HSS+HSA+HSE+HBP)", and rejects the
mode if not.

However, testing shows that this doesn't hold at all. I can set the hfp
to very small values, with no errors. The feedback from the HW team also
was that the check is not right, although it's not clear if there's a
way to validate the FIFO emptying.

The check rejects quite a lot of modes, apparently for no good reason,
so drop the check.

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-6-e61cc06074c2@ideasonboard.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c

index eae9469ef4313c881b99cc0d6b66667a63b4d281..000c5a2367fe065607e40be8a8195fd4afd29224 100644 (file)
@@ -553,7 +553,6 @@ static int cdns_dsi_check_conf(struct cdns_dsi *dsi,
 {
        struct cdns_dsi_output *output = &dsi->output;
        struct phy_configure_opts_mipi_dphy *phy_cfg = &output->phy_opts.mipi_dphy;
-       unsigned long dsi_hss_hsa_hse_hbp;
        unsigned int nlanes = output->dev->lanes;
        int ret;
 
@@ -575,20 +574,6 @@ static int cdns_dsi_check_conf(struct cdns_dsi *dsi,
        if (ret)
                return ret;
 
-       dsi_hss_hsa_hse_hbp = dsi_cfg->hbp + DSI_HBP_FRAME_OVERHEAD;
-       if (output->dev->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
-               dsi_hss_hsa_hse_hbp += dsi_cfg->hsa + DSI_HSA_FRAME_OVERHEAD;
-
-       /*
-        * Make sure DPI(HFP) > DSI(HSS+HSA+HSE+HBP) to guarantee that the FIFO
-        * is empty before we start a receiving a new line on the DPI
-        * interface.
-        */
-       if ((u64)phy_cfg->hs_clk_rate *
-           (mode->hsync_start - mode->hdisplay) * nlanes <
-           (u64)dsi_hss_hsa_hse_hbp * mode->clock  * 1000)
-               return -EINVAL;
-
        return 0;
 }