Skip to content

Commit 6ccfbb5

Browse files
ideakopsiff
authored andcommitted
drm/dp_mst: Fix DSC decompression detection in Synaptics branch devices
mainline inclusion from mainline-v6.12-rc2 category: bugfix 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 (cherry picked from commit 70a6587 https://anongit.freedesktop.org/git/drm-misc.git drm-misc-fixes) Signed-off-by: Ap, Kamal <kamal.ap@intel.corp-partner.google.com> Reviewed-by: Shyam Sundar Radjacoumar <ssradjacoumar@google.com> Reviewed-by: Sean Paul <sean@poorly.run> Reviewed-by: Drew Davenport <ddavenport@chromium.org> (cherry picked from commit 1b9ebf7a6d8daa6bbd30449a28cc60dd11d12d02) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 340614f commit 6ccfbb5

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎drivers/gpu/drm/display/drm_dp_mst_topology.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6109,6 +6109,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61096109
struct drm_dp_aux *immediate_upstream_aux;
61106110
struct drm_dp_mst_port *fec_port;
61116111
struct drm_dp_desc desc = {};
6112+
u8 upstream_dsc;
61126113
u8 endpoint_fec;
61136114
u8 endpoint_dsc;
61146115

@@ -6135,8 +6136,6 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61356136

61366137
/* DP-to-DP peer device */
61376138
if (drm_dp_mst_is_virtual_dpcd(immediate_upstream_port)) {
6138-
u8 upstream_dsc;
6139-
61406139
if (drm_dp_dpcd_read(&port->aux,
61416140
DP_DSC_SUPPORT, &endpoint_dsc, 1) != 1)
61426141
return NULL;
@@ -6182,6 +6181,13 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61826181
if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD)) {
61836182
u8 dpcd_ext[DP_RECEIVER_CAP_SIZE];
61846183

6184+
if (drm_dp_dpcd_read(immediate_upstream_aux,
6185+
DP_DSC_SUPPORT, &upstream_dsc, 1) != 1)
6186+
return NULL;
6187+
6188+
if (!(upstream_dsc & DP_DSC_DECOMPRESSION_IS_SUPPORTED))
6189+
return NULL;
6190+
61856191
if (drm_dp_read_dpcd_caps(immediate_upstream_aux, dpcd_ext) < 0)
61866192
return NULL;
61876193

0 commit comments

Comments
 (0)