From: Daniel Vetter Date: Fri, 10 Nov 2017 11:53:12 +0100 Subject: drm/atomic-helper: always track connector commits, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commit: 1f2d9bdc9085a4477a997344b17c40ba2a28d4e4 Patch-mainline: v4.16-rc1 References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166 It's useful for syncing async connector work like link retraining. v2: Make it work (Manasi&Ville) Cc: Manasi Navare Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171110105313.16718-1-daniel.vetter@ffwll.ch Acked-by: Petr Tesarik --- drivers/gpu/drm/drm_atomic_helper.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1793,11 +1793,8 @@ int drm_atomic_helper_setup_commit(struc !try_wait_for_completion(&old_conn_state->commit->flip_done)) return -EBUSY; - /* commit tracked through new_crtc_state->commit, no need to do it explicitly */ - if (new_conn_state->crtc) - continue; - - commit = crtc_or_fake_commit(state, old_conn_state->crtc); + /* Always track connectors explicitly for e.g. link retraining. */ + commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: old_conn_state->crtc); if (!commit) return -ENOMEM; @@ -1811,10 +1808,7 @@ int drm_atomic_helper_setup_commit(struc !try_wait_for_completion(&old_plane_state->commit->flip_done)) return -EBUSY; - /* - * Unlike connectors, always track planes explicitly for - * async pageflip support. - */ + /* Always track planes explicitly for async pageflip support. */ commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: old_plane_state->crtc); if (!commit) return -ENOMEM;