drm/bridge: lt9611: fix programming of video modes
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 18 Jan 2023 08:16:49 +0000 (10:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:14 +0000 (09:33 +0100)
[ Upstream commit ad188aa47edaa033a270e1a3efae43836ff47569 ]

Program the upper part of the hfront_porch into the proper register.

Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230118081658.2198520-5-dmitry.baryshkov@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/lontium-lt9611.c

index deb503ca956af6a1bac507a3bdb2549eded8e4b9..f377052a45a4492deb9516fcf96da5f503e3b4e1 100644 (file)
@@ -187,7 +187,8 @@ static void lt9611_mipi_video_setup(struct lt9611 *lt9611,
 
        regmap_write(lt9611->regmap, 0x8319, (u8)(hfront_porch % 256));
 
-       regmap_write(lt9611->regmap, 0x831a, (u8)(hsync_porch / 256));
+       regmap_write(lt9611->regmap, 0x831a, (u8)(hsync_porch / 256) |
+                                               ((hfront_porch / 256) << 4));
        regmap_write(lt9611->regmap, 0x831b, (u8)(hsync_porch % 256));
 }