Skip to content

Commit 6bf65f3

Browse files
surajk8gregkh
authored andcommitted
drm/i915/cx0_phy: Fix C10 pll programming sequence
[ Upstream commit 385a95c ] According to spec VDR_CUSTOM_WIDTH register gets programmed after pll specific VDR registers and TX Lane programming registers are done. Moreover we only program into C10_VDR_CONTROL1 to update config and setup master lane once all VDR registers are written into. Bspec: 67636 Fixes: 51390cc ("drm/i915/mtl: Add Support for C10 PHY message bus and pll programming") Signed-off-by: Suraj Kandpal <[email protected]> Reviewed-by: Ankit Nautiyal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit f9d4185) Signed-off-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 9f6f54e commit 6bf65f3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/gpu/drm/i915/display/intel_cx0_phy.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,14 +2084,6 @@ static void intel_c10_pll_program(struct drm_i915_private *i915,
20842084
0, C10_VDR_CTRL_MSGBUS_ACCESS,
20852085
MB_WRITE_COMMITTED);
20862086

2087-
/* Custom width needs to be programmed to 0 for both the phy lanes */
2088-
intel_cx0_rmw(encoder, INTEL_CX0_BOTH_LANES, PHY_C10_VDR_CUSTOM_WIDTH,
2089-
C10_VDR_CUSTOM_WIDTH_MASK, C10_VDR_CUSTOM_WIDTH_8_10,
2090-
MB_WRITE_COMMITTED);
2091-
intel_cx0_rmw(encoder, INTEL_CX0_BOTH_LANES, PHY_C10_VDR_CONTROL(1),
2092-
0, C10_VDR_CTRL_UPDATE_CFG,
2093-
MB_WRITE_COMMITTED);
2094-
20952087
/* Program the pll values only for the master lane */
20962088
for (i = 0; i < ARRAY_SIZE(pll_state->pll); i++)
20972089
intel_cx0_write(encoder, INTEL_CX0_LANE0, PHY_C10_VDR_PLL(i),
@@ -2101,6 +2093,10 @@ static void intel_c10_pll_program(struct drm_i915_private *i915,
21012093
intel_cx0_write(encoder, INTEL_CX0_LANE0, PHY_C10_VDR_CMN(0), pll_state->cmn, MB_WRITE_COMMITTED);
21022094
intel_cx0_write(encoder, INTEL_CX0_LANE0, PHY_C10_VDR_TX(0), pll_state->tx, MB_WRITE_COMMITTED);
21032095

2096+
/* Custom width needs to be programmed to 0 for both the phy lanes */
2097+
intel_cx0_rmw(encoder, INTEL_CX0_BOTH_LANES, PHY_C10_VDR_CUSTOM_WIDTH,
2098+
C10_VDR_CUSTOM_WIDTH_MASK, C10_VDR_CUSTOM_WIDTH_8_10,
2099+
MB_WRITE_COMMITTED);
21042100
intel_cx0_rmw(encoder, INTEL_CX0_LANE0, PHY_C10_VDR_CONTROL(1),
21052101
0, C10_VDR_CTRL_MASTER_LANE | C10_VDR_CTRL_UPDATE_CFG,
21062102
MB_WRITE_COMMITTED);

0 commit comments

Comments
 (0)