drm/i915/dp_mst: Fix race between connector registration and setup
authorImre Deak <imre.deak@intel.com>
Sun, 29 Oct 2023 23:13:08 +0000 (01:13 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 20 Nov 2023 09:06:34 +0000 (11:06 +0200)
commit018903e1cec3421a6198589fabd30682eb277904
tree5ed28b4f20c307e59545b8bf9bdc3fe46bdc9b34
parent98b1cc82c4affc16f5598d4fa14b1858671b2263
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 <stanislav.lisovskiy@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 808b43fa7e56 ("drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX")
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-2-imre.deak@intel.com
(cherry picked from commit 560ea72c76eb6d0c59f77580414e64cc09f1093d)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dp_mst.c