diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-11-18 16:51:25 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2019-12-16 12:13:17 +0100 |
commit | cfb0881b8f621b656a9e23b31944a5db94cf5842 (patch) | |
tree | 0673581e295719b7bddbb7d20aa07e45b4d84974 /drivers/gpu/drm/drm_modes.c | |
parent | c2ed3e941901810ad3d55ce1935fa22c5007fee4 (diff) | |
download | lwn-cfb0881b8f621b656a9e23b31944a5db94cf5842.tar.gz lwn-cfb0881b8f621b656a9e23b31944a5db94cf5842.zip |
drm/modes: parse_cmdline: Accept extras directly after mode combined with options
Before this commit it was impossible to combine an extra mode argument
specified directly after the resolution with an option, e.g.
video=HDMI-1:720x480e,rotate=180 would not work, either the "e" to force
enable would need to be dropped or the ",rotate=180", otherwise the
mode_option would not be accepted.
This commit fixes this by setting parse_extras to true in this case, so
that drm_mode_parse_cmdline_res_mode() parses the extra arguments directly
after the resolution.
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-4-hdegoede@redhat.com
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index a8aa7955fd45..f49401124727 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1794,6 +1794,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option, mode_end = refresh_off; } else if (options_ptr) { mode_end = options_off; + parse_extras = true; } else { mode_end = strlen(name); parse_extras = true; |