mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
drm/bridge: lt9611: fix polarity programming
[ Upstream commit0b157efa38
] Fix programming of hsync and vsync polarities Fixes:23278bf54a
("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-4-dmitry.baryshkov@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d15f67aed9
commit
01c42582fa
1 changed files with 12 additions and 5 deletions
|
@ -207,7 +207,6 @@ static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mod
|
|||
|
||||
/* stage 2 */
|
||||
{ 0x834a, 0x40 },
|
||||
{ 0x831d, 0x10 },
|
||||
|
||||
/* MK limit */
|
||||
{ 0x832d, 0x38 },
|
||||
|
@ -222,11 +221,19 @@ static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mod
|
|||
{ 0x8325, 0x00 },
|
||||
{ 0x832a, 0x01 },
|
||||
{ 0x834a, 0x10 },
|
||||
{ 0x831d, 0x10 },
|
||||
{ 0x8326, 0x37 },
|
||||
};
|
||||
u8 pol = 0x10;
|
||||
|
||||
regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg));
|
||||
if (mode->flags & DRM_MODE_FLAG_NHSYNC)
|
||||
pol |= 0x2;
|
||||
if (mode->flags & DRM_MODE_FLAG_NVSYNC)
|
||||
pol |= 0x1;
|
||||
regmap_write(lt9611->regmap, 0x831d, pol);
|
||||
|
||||
if (mode->hdisplay == 3840)
|
||||
regmap_multi_reg_write(lt9611->regmap, reg_cfg2, ARRAY_SIZE(reg_cfg2));
|
||||
else
|
||||
regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg));
|
||||
|
||||
switch (mode->hdisplay) {
|
||||
case 640:
|
||||
|
@ -236,7 +243,7 @@ static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mod
|
|||
regmap_write(lt9611->regmap, 0x8326, 0x37);
|
||||
break;
|
||||
case 3840:
|
||||
regmap_multi_reg_write(lt9611->regmap, reg_cfg2, ARRAY_SIZE(reg_cfg2));
|
||||
regmap_write(lt9611->regmap, 0x8326, 0x37);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue