]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/ast: Add empty initializer for VBIOS modes
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 31 Jan 2025 09:21:09 +0000 (10:21 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 3 Feb 2025 13:01:11 +0000 (14:01 +0100)
commit192cc9f2b74a8e3b7d7cc7f4d041698d7ba63efa
tree9e8bf7e6d404320c0129504d893de70498af68cd
parentc81202906b5cd56db403e95db3d29c9dfc8c74c1
drm/ast: Add empty initializer for VBIOS modes

VBIOS mode tables are terminated by an entry with a refresh rate of
0xff. The code is hard to read and fragile to use. Therefore create
an empty entry with AST_VBIOS_MODE_INVALID to terminate each mode list.

Stop at the invalid entry when searching for modes in the tables.
Instead of testing for refresh == 0xff, test with a helper function if
the mode's size and refresh have meaningful values.

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