linux-stable/include/drm/display
Lyude Paul a5c2c0d164 drm/display/dp_mst: Add nonblocking helpers for DP MST
As Daniel Vetter pointed out, if we only use the atomic modesetting locks
with MST it's technically possible for a driver with non-blocking modesets
to race when it comes to MST displays - as we make the mistake of not doing
our own CRTC commit tracking in the topology_state object.

This could potentially cause problems if something like this happens:

* User starts non-blocking commit to disable CRTC-1 on MST topology 1
* User starts non-blocking commit to enable CRTC-2 on MST topology 1

There's no guarantee here that the commit for disabling CRTC-2 will only
occur after CRTC-1 has finished, since neither commit shares a CRTC - only
the private modesetting object for MST. Keep in mind this likely isn't a
problem for blocking modesets, only non-blocking.

So, begin fixing this by keeping track of which CRTCs on a topology have
changed by keeping track of which CRTCs we release or allocate timeslots
on. As well, add some helpers for:

* Setting up the drm_crtc_commit structs in the ->commit_setup hook
* Waiting for any CRTC dependencies from the previous topology state

v2:
* Use drm_dp_mst_atomic_setup_commit() directly - Jani

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-9-lyude@redhat.com
2022-08-23 16:53:37 -04:00
..
drm_dp.h
drm_dp_aux_bus.h drm/dp: Add callbacks to make using DP AUX bus properly easier 2022-06-02 15:14:16 -07:00
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux 2022-06-21 09:03:49 -07:00
drm_dp_mst_helper.h drm/display/dp_mst: Add nonblocking helpers for DP MST 2022-08-23 16:53:37 -04:00
drm_dsc.h
drm_dsc_helper.h
drm_hdcp.h
drm_hdcp_helper.h
drm_hdmi_helper.h
drm_scdc.h
drm_scdc_helper.h