Skip to content

Commit 018903e

Browse files
ideakjnikula
authored andcommitted
drm/i915/dp_mst: Fix race between connector registration and setup
After drm_connector_init() is called the connector is visible to the rest of the kernel via the drm_mode_config::connector_list. Make sure that the DSC AUX device and capabilities are setup by that time. Another race condition is adding the connector to the connector list before drm_connector_helper_add() sets the connector helper functions. That's an unrelated issue, for which the fix is for a follow-up. One solution would be adding the connector to the connector list only during its registration in drm_connector_register(). Cc: Stanislav Lisovskiy <[email protected]> Cc: Ville Syrjälä <[email protected]> Fixes: 808b43f ("drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX") Reviewed-by: Stanislav Lisovskiy <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 560ea72) Signed-off-by: Jani Nikula <[email protected]>
1 parent 98b1cc8 commit 018903e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,14 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
11611161
intel_connector->port = port;
11621162
drm_dp_mst_get_port_malloc(port);
11631163

1164+
/*
1165+
* TODO: set the AUX for the actual MST port decompressing the stream.
1166+
* At the moment the driver only supports enabling this globally in the
1167+
* first downstream MST branch, via intel_dp's (root port) AUX.
1168+
*/
1169+
intel_connector->dp.dsc_decompression_aux = &intel_dp->aux;
1170+
intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, intel_connector);
1171+
11641172
connector = &intel_connector->base;
11651173
ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs,
11661174
DRM_MODE_CONNECTOR_DisplayPort);
@@ -1172,14 +1180,6 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
11721180

11731181
drm_connector_helper_add(connector, &intel_dp_mst_connector_helper_funcs);
11741182

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

0 commit comments

Comments
 (0)