]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/ast: Add helpers for VBIOS mode lookup
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 31 Jan 2025 09:21:10 +0000 (10:21 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 3 Feb 2025 13:01:12 +0000 (14:01 +0100)
commit517e28d40c9fab2e96b7a88787007954efd6cf50
tree220ab9b5dfb60772682c5e74c2db0eb4a008261e
parent192cc9f2b74a8e3b7d7cc7f4d041698d7ba63efa
drm/ast: Add helpers for VBIOS mode lookup

Mode lines are independent from hardware Gen or TX chip, so hide all
VBIOS mode tables in ast_vbios.c.

Move the look-up code for VBIOS modes from ast_vbios_get_mode_info()
to ast_vbios_find_mode(). The new look-up function respects the
supported-mode flags in struct ast_device. For example, if a device
does not have struct ast_device.support_fullhd set, the helper does
not return a valid mode for 1920x1080. Taking the supported-mode flags
into account allows for making the VBIOS tables the single reference
for validating and setting display modes against hardware capabilities.

v2:
- replace mode switch with look-up table (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-11-tzimmermann@suse.de
drivers/gpu/drm/ast/Makefile
drivers/gpu/drm/ast/ast_dp.c
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/ast/ast_tables.h
drivers/gpu/drm/ast/ast_vbios.c [new file with mode: 0644]
drivers/gpu/drm/ast/ast_vbios.h [new file with mode: 0644]