drm/ast: astdp: Inline mode-index calculation
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 4 Feb 2025 13:26:38 +0000 (14:26 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 11 Feb 2025 07:28:30 +0000 (08:28 +0100)
commit8c3b7d278ffc4d30b0809d1b7066a94963a0d2ca
treeba02705f1db30bb38a3edebf8b191b09502eb568
parent3214403cf99e20d8ee7df9cd639e6a152b0659fc
drm/ast: astdp: Inline mode-index calculation

Programming the astdp transmitter chip requires a magic value for
individual modes. Inline the helper for calculating the value into
its only caller (i.e., the encoder's atomic_mode_set).

With further refactoring, the atomic check will be able to detect
invalid modes before attempting to program them.

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