History

drm/i915/display: Re-add check for low voltage sku for max dp source rate

This reverts commit 73867c8709b5 ("drm/i915/display: Remove check for low voltage sku for max dp source rate"), which, on an i7-11850H iGPU with a Thinkpad X1 Extreme Gen 4, attached to a LG LP160UQ1-SPB1 embedded panel, causes wild flickering glitching technicolor pyrotechnics on resumption from suspend. The display shows strobing colors in an utter disaster explosion of pantone, as though bombs were dropped on the leprechauns at the base of the rainbow. Rebooting the machine fixes the issue, presumably because the display is initialized by firmware rather than by i915. Otherwise, the GPU appears to work fine. Bisection traced it back to this commit, which makes sense given the issues. Note: This re-opens, and puts back to the drawing board, https://gitlab.freedesktop.org/drm/intel/-/issues/5272 which was fixed by the regressing commit.

Jason A. Donenfeld committed 4 years ago

Commit c7b28f51 parent 38282961 file · +29 −3Browse files

Unified · Split

drivers/gpu/drm/i915/display/intel_dp.c+29−3
@@ -388,13 +388,23 @@ static int dg2_max_source_rate(struct intel_dp *intel_dp) · 387 unmodified lines
388388 return intel_dp_is_edp(intel_dp) ? 810000 : 1350000;
389389 }
390390
391+static bool is_low_voltage_sku(struct drm_i915_private *i915, enum phy phy)
392+{
393+ u32 voltage;
394+
395+ voltage = intel_de_read(i915, ICL_PORT_COMP_DW3(phy)) & VOLTAGE_INFO_MASK;
396+
397+ return voltage == VOLTAGE_INFO_0_85V;
398+}
399+
391400 static int icl_max_source_rate(struct intel_dp *intel_dp)
392401 {
393402 struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
394403 struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
395404 enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port);
396405
397− if (intel_phy_is_combo(dev_priv, phy) && !intel_dp_is_edp(intel_dp))
406+ if (intel_phy_is_combo(dev_priv, phy) &&
407+ (is_low_voltage_sku(dev_priv, phy) || !intel_dp_is_edp(intel_dp)))
398408 return 540000;
399409
400410 return 810000;
@@ -402,7 +412,23 @@ static int icl_max_source_rate(struct intel_dp *intel_dp) · 1 unmodified line
402412
403413 static int ehl_max_source_rate(struct intel_dp *intel_dp)
404414 {
405− if (intel_dp_is_edp(intel_dp))
415+ struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
416+ struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
417+ enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port);
418+
419+ if (intel_dp_is_edp(intel_dp) || is_low_voltage_sku(dev_priv, phy))
420+ return 540000;
421+
422+ return 810000;
423+}
424+
425+static int dg1_max_source_rate(struct intel_dp *intel_dp)
426+{
427+ struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
428+ struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
429+ enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
430+
431+ if (intel_phy_is_combo(i915, phy) && is_low_voltage_sku(i915, phy))
406432 return 540000;
407433
408434 return 810000;
@@ -445,7 +471,7 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp) · 36 unmodified lines
445471 max_rate = dg2_max_source_rate(intel_dp);
446472 else if (IS_ALDERLAKE_P(dev_priv) || IS_ALDERLAKE_S(dev_priv) ||
447473 IS_DG1(dev_priv) || IS_ROCKETLAKE(dev_priv))
448− max_rate = 810000;
474+ max_rate = dg1_max_source_rate(intel_dp);
449475 else if (IS_JSL_EHL(dev_priv))
450476 max_rate = ehl_max_source_rate(intel_dp);
451477 else