Skip to content

Commit a6d47b0

Browse files
aknautiyalgregkh
authored andcommitted
Revert "drm/i915/dp: Reject HBR3 when sink doesn't support TPS4"
commit 8c9006283e4b767003b2d11182d6e90f8b184c3d upstream. This reverts commit 584cf61. Commit 584cf61 ("drm/i915/dp: Reject HBR3 when sink doesn't support TPS4") introduced a blanket rejection of HBR3 link rate when the sink does not support TPS4. While this was intended to address instability observed on certain eDP panels [1], there seem to be edp panels that do not follow the specification. These eDP panels do not advertise TPS4 support, but require HBR3 to operate at their fixed native resolution [2]. As a result, the change causes blank screens on such panels. Apparently, Windows driver does not enforce this restriction, and the issue is not seen there. Therefore, revert the commit to restore functionality for such panels, and align behaviour with Windows driver. [1] https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5969 [2] https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14517 v2: Update the commit message with better justification. (Ville) Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14517 Acked-by: Jani Nikula <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Ankit Nautiyal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5dc95f8 commit a6d47b0

1 file changed

Lines changed: 7 additions & 42 deletions

File tree

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

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -173,28 +173,10 @@ int intel_dp_link_symbol_clock(int rate)
173173

174174
static int max_dprx_rate(struct intel_dp *intel_dp)
175175
{
176-
struct intel_display *display = to_intel_display(intel_dp);
177-
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
178-
int max_rate;
179-
180176
if (intel_dp_tunnel_bw_alloc_is_enabled(intel_dp))
181-
max_rate = drm_dp_tunnel_max_dprx_rate(intel_dp->tunnel);
182-
else
183-
max_rate = drm_dp_bw_code_to_link_rate(intel_dp->dpcd[DP_MAX_LINK_RATE]);
177+
return drm_dp_tunnel_max_dprx_rate(intel_dp->tunnel);
184178

185-
/*
186-
* Some broken eDP sinks illegally declare support for
187-
* HBR3 without TPS4, and are unable to produce a stable
188-
* output. Reject HBR3 when TPS4 is not available.
189-
*/
190-
if (max_rate >= 810000 && !drm_dp_tps4_supported(intel_dp->dpcd)) {
191-
drm_dbg_kms(display->drm,
192-
"[ENCODER:%d:%s] Rejecting HBR3 due to missing TPS4 support\n",
193-
encoder->base.base.id, encoder->base.name);
194-
max_rate = 540000;
195-
}
196-
197-
return max_rate;
179+
return drm_dp_bw_code_to_link_rate(intel_dp->dpcd[DP_MAX_LINK_RATE]);
198180
}
199181

200182
static int max_dprx_lane_count(struct intel_dp *intel_dp)
@@ -4279,9 +4261,6 @@ static void intel_edp_mso_init(struct intel_dp *intel_dp)
42794261
static void
42804262
intel_edp_set_sink_rates(struct intel_dp *intel_dp)
42814263
{
4282-
struct intel_display *display = to_intel_display(intel_dp);
4283-
struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
4284-
42854264
intel_dp->num_sink_rates = 0;
42864265

42874266
if (intel_dp->edp_dpcd[0] >= DP_EDP_14) {
@@ -4292,32 +4271,18 @@ intel_edp_set_sink_rates(struct intel_dp *intel_dp)
42924271
sink_rates, sizeof(sink_rates));
42934272

42944273
for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
4295-
int rate;
4274+
int val = le16_to_cpu(sink_rates[i]);
4275+
4276+
if (val == 0)
4277+
break;
42964278

42974279
/* Value read multiplied by 200kHz gives the per-lane
42984280
* link rate in kHz. The source rates are, however,
42994281
* stored in terms of LS_Clk kHz. The full conversion
43004282
* back to symbols is
43014283
* (val * 200kHz)*(8/10 ch. encoding)*(1/8 bit to Byte)
43024284
*/
4303-
rate = le16_to_cpu(sink_rates[i]) * 200 / 10;
4304-
4305-
if (rate == 0)
4306-
break;
4307-
4308-
/*
4309-
* Some broken eDP sinks illegally declare support for
4310-
* HBR3 without TPS4, and are unable to produce a stable
4311-
* output. Reject HBR3 when TPS4 is not available.
4312-
*/
4313-
if (rate >= 810000 && !drm_dp_tps4_supported(intel_dp->dpcd)) {
4314-
drm_dbg_kms(display->drm,
4315-
"[ENCODER:%d:%s] Rejecting HBR3 due to missing TPS4 support\n",
4316-
encoder->base.base.id, encoder->base.name);
4317-
break;
4318-
}
4319-
4320-
intel_dp->sink_rates[i] = rate;
4285+
intel_dp->sink_rates[i] = (val * 200) / 10;
43214286
}
43224287
intel_dp->num_sink_rates = i;
43234288
}

0 commit comments

Comments
 (0)