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
Showing
- drivers/gpu/drm/ast/Makefile 1 addition, 0 deletionsdrivers/gpu/drm/ast/Makefile
- drivers/gpu/drm/ast/ast_dp.c 1 addition, 0 deletionsdrivers/gpu/drm/ast/ast_dp.c
- drivers/gpu/drm/ast/ast_drv.h 2 additions, 16 deletionsdrivers/gpu/drm/ast/ast_drv.h
- drivers/gpu/drm/ast/ast_mode.c 7 additions, 70 deletionsdrivers/gpu/drm/ast/ast_mode.c
- drivers/gpu/drm/ast/ast_tables.h 0 additions, 177 deletionsdrivers/gpu/drm/ast/ast_tables.h
- drivers/gpu/drm/ast/ast_vbios.c 241 additions, 0 deletionsdrivers/gpu/drm/ast/ast_vbios.c
- drivers/gpu/drm/ast/ast_vbios.h 108 additions, 0 deletionsdrivers/gpu/drm/ast/ast_vbios.h
Loading
Please register or sign in to comment