Skip to content

Commit 70a6587

Browse files
committed
drm/dp_mst: Fix DSC decompression detection in Synaptics branch devices
Atm it's assumed that all Synaptics MST branch devices support DSC, which is not exposed via a DP-to-DP peer device, rather a control flag in the branch device's UFP DPCD applying to all the streams going through it. This isn't true for all adapters with this branch device though (for instance the Cakitte USBC->2xHDMI adapter reported in the Closes link below doesn't support DSC). Fix the above by advertising the DSC decompression support only if the capability flag for this in the UFP DPCD is actually set. Cc: Lyude Paul <lyude@redhat.com> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12047 Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240909144650.2931258-1-imre.deak@intel.com
1 parent 45c690a commit 70a6587

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6057,6 +6057,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
60576057
struct drm_dp_aux *immediate_upstream_aux;
60586058
struct drm_dp_mst_port *fec_port;
60596059
struct drm_dp_desc desc = {};
6060+
u8 upstream_dsc;
60606061
u8 endpoint_fec;
60616062
u8 endpoint_dsc;
60626063

@@ -6083,8 +6084,6 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
60836084

60846085
/* DP-to-DP peer device */
60856086
if (drm_dp_mst_is_virtual_dpcd(immediate_upstream_port)) {
6086-
u8 upstream_dsc;
6087-
60886087
if (drm_dp_dpcd_read(&port->aux,
60896088
DP_DSC_SUPPORT, &endpoint_dsc, 1) != 1)
60906089
return NULL;
@@ -6130,6 +6129,13 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61306129
if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD)) {
61316130
u8 dpcd_ext[DP_RECEIVER_CAP_SIZE];
61326131

6132+
if (drm_dp_dpcd_read(immediate_upstream_aux,
6133+
DP_DSC_SUPPORT, &upstream_dsc, 1) != 1)
6134+
return NULL;
6135+
6136+
if (!(upstream_dsc & DP_DSC_DECOMPRESSION_IS_SUPPORTED))
6137+
return NULL;
6138+
61336139
if (drm_dp_read_dpcd_caps(immediate_upstream_aux, dpcd_ext) < 0)
61346140
return NULL;
61356141

0 commit comments

Comments
 (0)