]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/ast: Replace references to struct drm_format_info.cpp
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 14 Apr 2026 07:02:29 +0000 (09:02 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 20 Apr 2026 07:12:00 +0000 (09:12 +0200)
commit95ed102e9f5aaee27f9642b093674b14f6c548ca
tree22507c1350b8c2b45126d38d1f438ca3bc2a9cfc
parentadf469f2b79513185393758d241e94e7d40d6618
drm/ast: Replace references to struct drm_format_info.cpp

Replace all uses of struct drm_format_info.cpp with the corresponding
4CC constant. Color-mode selection uses switch statements that branch
by cpp in several places. While at it, also name the involved variables
according to register names and replace magic values with constants.

Replace the use of *ModeIndex constants in ast_set_vbios_color_reg()
with correct register constants. The former are array indices and do
not belong into registers.

In ast_set_color_reg(), vgacra0 is independent from the color format,
so move it out from the switch statements.

There is also a flag for gamma correction in vgacra8, which currently
ast_set_color_reg() handles as part of the primary plane. The gamma LUT
and its programming is located in the CRTC. A future update should
consolidate gamma correction in the primary plane and implement the
functionality with DRM's colorop helpers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patch.msgid.link/20260414070522.33943-4-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/ast/ast_reg.h