drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation
authorJiri Vanek <jirivanek1@gmail.com>
Wed, 15 Jun 2022 22:22:21 +0000 (00:22 +0200)
committerRobert Foss <robert.foss@linaro.org>
Mon, 20 Jun 2022 19:34:21 +0000 (21:34 +0200)
commit993a87917c2af59efb0ee1ce43c878ca8790ba1c
treef18eb6f7b5b2fcef040bd6d23a9084a1c42c2770
parent89fc846675537f9f6ef62271e9d60556c873d65e
drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation

Use the same PCLK divide option (divide DSI clock to generate pixel clock)
which is set to LVDS Configuration Register (LVCFG) also for a VSync delay
calculation. Without this change an auxiliary variable could underflow
during the calculation for some dual-link LVDS panels and then calculated
VSync delay is wrong. This leads to a shifted picture on a panel.

Tested-by: Jiri Vanek <jirivanek1@gmail.com>
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com>
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-3-jirivanek1@gmail.com
drivers/gpu/drm/bridge/tc358775.c