OSDN Git Service

drm/ast: Store primary-plane format in struct ast_crtc_state
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 Dec 2019 11:15:57 +0000 (12:15 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 10 Dec 2019 13:28:43 +0000 (14:28 +0100)
commit3339fdf5742f7182d7a17fb48e2d7463f6a79580
tree57464d78d495179866a9bbb5b627a61067a37c2e
parente7d70cd4948e543739e9859d2b4ab30448067d32
drm/ast: Store primary-plane format in struct ast_crtc_state

Reading the primary plane's framebuffer from the CRTC's atomic_flush()
function is fragile as the plane state or framebuffer can be NULL.
Instead, we let the plane's atomic_check() store the framebuffer format
in the CRTC state. The CRTC always receives the framebuffer format that
is currently programmed, or NULL if no mode has been set yet.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-8-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_mode.c