drm/modes: Introduce a whitelist for the named modes
authorMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 27 Aug 2019 11:58:49 +0000 (13:58 +0200)
committerMaxime Ripard <mripard@kernel.org>
Fri, 30 Aug 2019 08:21:21 +0000 (10:21 +0200)
commit3764137906a5acece8b5546873a70b1e6263a1a6
tree87bfe0d9fb91eb740a11cd2a3180687e78719a35
parent728a257f652aee5dd03ecde90b11f414a255e08b
drm/modes: Introduce a whitelist for the named modes

The named modes support has introduced a number of glitches that were in
part due to the fact that the parser will take any string as a named mode.

Since we shouldn't have a lot of options there (and they should be pretty
standard), let's introduce a whitelist of the available named modes so that
the kernel can differentiate between a poorly formed command line and a
named mode.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Thomas Graichen <thomas.graichen@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190827115850.25731-3-mripard@kernel.org
drivers/gpu/drm/drm_modes.c