drm/modes: Move named modes parsing to a separate function
authorMaxime Ripard <maxime@cerno.tech>
Mon, 14 Nov 2022 13:00:28 +0000 (14:00 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 15 Nov 2022 09:09:05 +0000 (10:09 +0100)
commita631bf30eb914affc0a574f44576833477346ad6
tree2b0e0f3d04e629000576744871066cbf818bfbf0
parent8fc0380f6ba7e9414c96a695a8c03e2ac31d1b0f
drm/modes: Move named modes parsing to a separate function

The current construction of the named mode parsing doesn't allow to extend
it easily. Let's move it to a separate function so we can add more
parameters and modes.

In order for the tests to still pass, some extra checks are needed, so
it's not a 1:1 move.

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-9-24b168e5bcd5@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/drm_modes.c