drm/ast: Disable planes while switching display modes
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Sep 2020 07:22:34 +0000 (09:22 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 16 Sep 2020 11:08:01 +0000 (13:08 +0200)
commit39edb28780e8bf623565fbd2fd0ea091f315ceb3
tree77ff9cb20ef5b06e3007e5e3c615a59fc489bfcf
parent5638c82cdabd95c8e82672760a9799c2f2848ba9
drm/ast: Disable planes while switching display modes

The ast HW cursor requires the primary plane and CRTC to display at
a valid mode and format. This is not the case while switching
display modes, which can lead to the screen turing permanently dark.

As a workaround, the ast driver now disables active planes while the
mode or format switch takes place. It also synchronizes with the vertical
refresh to give CRTC and planes some time to catch up on each other.
The active planes planes (primary or cursor) will be re-enabled by
each plane's atomic_update() function.

v3:
* move the logic into the CRTC's atomic_disable function
v2:
* move the logic into the commit-tail function

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-3-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_mode.c