]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/ast: astdp: Rework display-mode setting
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 31 Jan 2025 09:21:13 +0000 (10:21 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 3 Feb 2025 13:01:14 +0000 (14:01 +0100)
commitd86f6beed067309eeea8bf7c91d967f310db98df
treec50fa50ab25fe4dad56d89c2385fe2ec8d0de044
parentc337d4c1de88bda6da88477a390c2f7ba87466b6
drm/ast: astdp: Rework display-mode setting

ASTDP requires a mode index, depending on the resolution. Move the
look-up code from ast_dp_set_mode() into a separate helper. Inline
the rest of the function into its only caller. Rename the variable
names and register constants to match the programming manual.

As before, the mode-index lookup still happens during the update's
atomic commit. Right now, there's no way of doing it during the atomic
check. The lookup requires the VBIOS mode, which is not available at
the atomic check's invocation. At least warn now if the mode index
could not be found.

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