drm/mgag200: Store primary plane's color format in CRTC state
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 28 Jul 2022 12:40:54 +0000 (14:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 29 Jul 2022 14:01:46 +0000 (16:01 +0200)
commited2ef21f1089ef9b3b943b4e365600e615ce827d
treeee257f9b63775663066ca18289da47f148e6ff64
parent2d70b9a1482e09f8465452c4655ffe20c605d526
drm/mgag200: Store primary plane's color format in CRTC state

Store the primary plane's color format in the CRTC state and use
it for programming the CRTC's gamma LUTs.

Gamma tables (i.e., color management) are provided by the CRTC, but
depend in the primary plane's color format. Store the format in the
CRTC state and use it. This has not been an issue with simple-KMS
helpers, which mix-up plane and CRTC state to some extent. For using
regular atomic helpers, it's necessary to distinguish between the two.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-6-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_mode.c