Skip to content

Commit f9a77c8

Browse files
vsyrjalagregkh
authored andcommitted
drm/i915/dp: Fix 2.7 Gbps DP_LINK_BW value on g4x
commit 9e0c433 upstream. On g4x we currently use the 96MHz non-SSC refclk, which can't actually generate an exact 2.7 Gbps link rate. In practice we end up with 2.688 Gbps which seems to be close enough to actually work, but link training is currently failing due to miscalculating the DP_LINK_BW value (we calcualte it directly from port_clock which reflects the actual PLL outpout frequency). Ideas how to fix this: - nudge port_clock back up to 270000 during PLL computation/readout - track port_clock and the nominal link rate separately so they might differ a bit - switch to the 100MHz refclk, but that one should be SSC so perhaps not something we want While we ponder about a better solution apply some band aid to the immediate issue of miscalculated DP_LINK_BW value. With this I can again use 2.7 Gbps link rate on g4x. Cc: [email protected] Fixes: 665a7b0 ("drm/i915: Feed the DPLL output freq back into crtc_state") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Imre Deak <[email protected]> (cherry picked from commit a8b8746) Signed-off-by: Rodrigo Vivi <[email protected]> [ changed display->platform.g4x to IS_G4X(i915) ] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0d750f7 commit f9a77c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,12 @@ int intel_dp_rate_select(struct intel_dp *intel_dp, int rate)
11391139
void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,
11401140
u8 *link_bw, u8 *rate_select)
11411141
{
1142+
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
1143+
1144+
/* FIXME g4x can't generate an exact 2.7GHz with the 96MHz non-SSC refclk */
1145+
if (IS_G4X(i915) && port_clock == 268800)
1146+
port_clock = 270000;
1147+
11421148
/* eDP 1.4 rate select method. */
11431149
if (intel_dp->use_rate_select) {
11441150
*link_bw = 0;

0 commit comments

Comments
 (0)