drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check
authorLiu Ying <victor.liu@nxp.com>
Mon, 21 Aug 2023 03:40:06 +0000 (11:40 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 16 Oct 2023 09:38:45 +0000 (11:38 +0200)
commit743bf594a3b1903a93f21f2060e3cdc5514e066c
tree5a4a75e32da43cf2f2df22f815b17ab8c3b36692
parentd22e9a6df2db6a5b0ab7ff9123831e05c3e77899
drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check

According to Synopsys DW MIPI DSI host databook, HSTX and LPRX timeout
contention detections are measured in TO_CLK_DIVISION cycles.  However,
the current driver programs magic values to TO_CLK_DIVISION, HSTX_TO_CNT
and LPRX_TO_CNT register fields, which makes timeout error event wrongly
happen for some video modes, at least for the typical 1920x1080p@60 video
mode read from a HDMI monitor driven by ADV7535 DSI to HDMI bridge.
While at it, the current driver doesn't enable interrupt to handle or
complain about the error status, so true error just happens silently
except for display distortions by visual check.

Disable the timeout check by setting those timeout register fields to
zero for now until someone comes along with better computations for the
timeout values.  Although the databook doesn't mention what happens when
they are set to zero, it turns out the false error doesn't happen for
the 1920x1080p@60 video mode at least.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821034008.3876938-8-victor.liu@nxp.com
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c