Skip to content

Commit 1328cb7

Browse files
committed
drm/msm/dsi: correct programming sequence for SM8350 / SM8450
According to the display-drivers, 5nm DSI PLL (v4.2, v4.3) have different boundaries for pll_clock_inverters programming. Follow the vendor code and use correct values. Fixes: 2f9ae4e ("drm/msm/dsi: add support for DSI-PHY on SM8350 and SM8450") Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/606947/ Link: https://lore.kernel.org/r/[email protected]
1 parent c7c4122 commit 1328cb7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_7nm *pll, struct dsi_pll_config
135135
config->pll_clock_inverters = 0x00;
136136
else
137137
config->pll_clock_inverters = 0x40;
138-
} else {
138+
} else if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) {
139139
if (pll_freq <= 1000000000ULL)
140140
config->pll_clock_inverters = 0xa0;
141141
else if (pll_freq <= 2500000000ULL)
@@ -144,6 +144,16 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_7nm *pll, struct dsi_pll_config
144144
config->pll_clock_inverters = 0x00;
145145
else
146146
config->pll_clock_inverters = 0x40;
147+
} else {
148+
/* 4.2, 4.3 */
149+
if (pll_freq <= 1000000000ULL)
150+
config->pll_clock_inverters = 0xa0;
151+
else if (pll_freq <= 2500000000ULL)
152+
config->pll_clock_inverters = 0x20;
153+
else if (pll_freq <= 3500000000ULL)
154+
config->pll_clock_inverters = 0x00;
155+
else
156+
config->pll_clock_inverters = 0x40;
147157
}
148158

149159
config->decimal_div_start = dec;

0 commit comments

Comments
 (0)