Skip to content

Commit 427c703

Browse files
committed
drm/i915/dp_mst: Make HBLANK expansion quirk work for logical ports
The DPCD OUI of the logical port on a Dell UHBR monitor - on which the AUX device is used to enable DSC - is all 0. To detect if the HBLANK expansion quirk is required for this monitor use the OUI of the port's parent instead. Since in the above case the DPCD of both the logical port and the parent port reports being a sink device (vs. branch device) type, read the proper sink/branch OUI based on the DPCD device type. This is required by a follow-up patch enabling the quirk for the above Dell monitor. Reviewed-by: Ankit Nautiyal <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 93cb409 commit 427c703

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,21 +1577,31 @@ intel_dp_mst_read_decompression_port_dsc_caps(struct intel_dp *intel_dp,
15771577
static bool detect_dsc_hblank_expansion_quirk(const struct intel_connector *connector)
15781578
{
15791579
struct drm_i915_private *i915 = to_i915(connector->base.dev);
1580+
struct drm_dp_aux *aux = connector->dp.dsc_decompression_aux;
15801581
struct drm_dp_desc desc;
15811582
u8 dpcd[DP_RECEIVER_CAP_SIZE];
15821583

1583-
if (!connector->dp.dsc_decompression_aux)
1584+
if (!aux)
15841585
return false;
15851586

1586-
if (drm_dp_read_desc(connector->dp.dsc_decompression_aux,
1587-
&desc, true) < 0)
1587+
/*
1588+
* A logical port's OUI (at least for affected sinks) is all 0, so
1589+
* instead of that the parent port's OUI is used for identification.
1590+
*/
1591+
if (drm_dp_mst_port_is_logical(connector->port)) {
1592+
aux = drm_dp_mst_aux_for_parent(connector->port);
1593+
if (!aux)
1594+
aux = &connector->mst_port->aux;
1595+
}
1596+
1597+
if (drm_dp_read_dpcd_caps(aux, dpcd) < 0)
15881598
return false;
15891599

1590-
if (!drm_dp_has_quirk(&desc,
1591-
DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC))
1600+
if (drm_dp_read_desc(aux, &desc, drm_dp_is_branch(dpcd)) < 0)
15921601
return false;
15931602

1594-
if (drm_dp_read_dpcd_caps(connector->dp.dsc_decompression_aux, dpcd) < 0)
1603+
if (!drm_dp_has_quirk(&desc,
1604+
DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC))
15951605
return false;
15961606

15971607
if (!(dpcd[DP_RECEIVE_PORT_0_CAP_0] & DP_HBLANK_EXPANSION_CAPABLE))

0 commit comments

Comments
 (0)