drm/ast: Move mode-setting code into mode_set_nofb CRTC helper
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 27 Jun 2024 15:27:48 +0000 (17:27 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 3 Jul 2024 07:38:13 +0000 (09:38 +0200)
commitfd63bf978b7b0f106c72b6392436f4223b16ab85
treea88fff20246dc8b6e9ce064c5c2f02b3f96a2837
parent7b8a74bc42016173ddb4872d113f132c8ca59fc1
drm/ast: Move mode-setting code into mode_set_nofb CRTC helper

Do all mode setting in ast_crtc_helper_mode_set_nofb(), which
always runs after disabling the CRTC and before programming the
planes. Removes implicit synchronization between the CRTC's
atomic disable, enable and the vertical retrace.

Display-mode updates require HW cursors to be disabled. The HW
cursor only picks up changes at vertical retrace periods. So the
CRTC's atomic_disable helper waited for the retrace to delay any
following mode-setting operations, which then happened in
atomic_enable. See [1] for a description of the problem.

With the CRTC helper callback mode_set_nofb, we can now synchronize
and reprogram in the same place. As it always runs before the plane
update, the plane code can be reordered with the CRTC's later
atomic_enable et al.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/series/79914/
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240627153638.8765-4-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c