Skip to content

Commit 808b43f

Browse files
committed
drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX
Similarly to eDP and SST-DP connectors read out the DSC capabilities for MST connectors as well. Atm these will match the root port's DSC caps and only used after a follow-up change enables the decompression for each stream separately (vs. the current way of enabling it only globally in the first branch device downstream of the root port). Reviewed-by: Stanislav Lisovskiy <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7389829 commit 808b43f

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3483,8 +3483,8 @@ static void intel_dp_read_dsc_dpcd(struct drm_dp_aux *aux,
34833483
dsc_dpcd);
34843484
}
34853485

3486-
static void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
3487-
struct intel_connector *connector)
3486+
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
3487+
struct intel_connector *connector)
34883488
{
34893489
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
34903490

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,
162162
bool dsc,
163163
struct link_config_limits *limits);
164164

165+
void intel_dp_get_dsc_sink_cap(u8 dpcd_rev, struct intel_dp *intel_dp,
166+
struct intel_connector *connector);
167+
165168
#endif /* __INTEL_DP_H__ */

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,21 @@ static int intel_dp_mst_add_properties(struct intel_dp *intel_dp,
11261126
return drm_connector_set_path_property(connector, pathprop);
11271127
}
11281128

1129+
static void
1130+
intel_dp_mst_read_decompression_port_dsc_caps(struct intel_dp *intel_dp,
1131+
struct intel_connector *connector)
1132+
{
1133+
u8 dpcd_caps[DP_RECEIVER_CAP_SIZE];
1134+
1135+
if (!connector->dp.dsc_decompression_aux)
1136+
return;
1137+
1138+
if (drm_dp_read_dpcd_caps(connector->dp.dsc_decompression_aux, dpcd_caps) < 0)
1139+
return;
1140+
1141+
intel_dp_get_dsc_sink_cap(dpcd_caps[DP_DPCD_REV], intel_dp, connector);
1142+
}
1143+
11291144
static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
11301145
struct drm_dp_mst_port *port,
11311146
const char *pathprop)
@@ -1159,6 +1174,14 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
11591174

11601175
drm_connector_helper_add(connector, &intel_dp_mst_connector_helper_funcs);
11611176

1177+
/*
1178+
* TODO: set the AUX for the actual MST port decompressing the stream.
1179+
* At the moment the driver only supports enabling this globally in the
1180+
* first downstream MST branch, via intel_dp's (root port) AUX.
1181+
*/
1182+
intel_connector->dp.dsc_decompression_aux = &intel_dp->aux;
1183+
intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, intel_connector);
1184+
11621185
for_each_pipe(dev_priv, pipe) {
11631186
struct drm_encoder *enc =
11641187
&intel_dp->mst_encoders[pipe]->base.base;

0 commit comments

Comments
 (0)