OSDN Git Service

drm/modes: parse_cmdline: Add support for named modes containing dashes
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 29 Sep 2022 16:31:07 +0000 (18:31 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 10 Oct 2022 11:59:04 +0000 (13:59 +0200)
commit8b6e28ea0a51a74af6a2684591a3471742f90647
treef3d3dc2e0b532c4eb567c62ae92387856c9a195a
parent90c258ba4a36f610302cdea6ff3b4e1a0811f50e
drm/modes: parse_cmdline: Add support for named modes containing dashes

It is fairly common for named video modes to contain dashes (e.g.
"tt-mid" on Atari, "dblntsc-ff" on Amiga).  Currently such mode names
are not recognized, as the dash is considered to be a separator between
mode name and bpp.

Fix this by skipping any dashes that are not followed immediately by a
digit when looking for the separator.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-13-60d38873f782@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/drm_modes.c