drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing
authorHans de Goede <hdegoede@redhat.com>
Mon, 18 Nov 2019 15:51:28 +0000 (16:51 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 16 Dec 2019 11:13:18 +0000 (12:13 +0100)
commit6a2d163756545aa3180d7851d5f8322b865e72be
tree7bf6ccfcb5aa5eb3491a60a58530392f8a09c8de
parent99e2716e053734b70434502867be24d20a3e2d84
drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing

drm_connector_get_cmdline_mode() calls
drm_mode_parse_command_line_for_connector() with &connector->cmdline_mode
as mode argument, so anything which we store in the mode arguments gets
kept even if we return false.

Avoid storing a possibly false-postive bpp/refresh_specified setting
in connector->cmdline_mode by moving the setting of these to after
successful parsing of the bpp/refresh parts of the video= argument.

Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-7-hdegoede@redhat.com
drivers/gpu/drm/drm_modes.c