mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
drm/modes: Handle reflect_[xy] in the middle of the cmd line
The command line parser was looking for an "=" before the "," separator. If the command line had reflect_[xy] before another option which took a parameter, it would find the "=" from the second option and assume it was associated with the reflect option, generally leading to a parsing failure. Handle this case by looking for both "," and "=", and taking the first instance. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
8ebe56ccce
commit
4a46ff1b35
@@ -2172,12 +2172,15 @@ static int drm_mode_parse_cmdline_options(const char *str,
|
||||
|
||||
option = str;
|
||||
do {
|
||||
sep = strchr(option, ',');
|
||||
delim = strchr(option, '=');
|
||||
if (!delim) {
|
||||
delim = strchr(option, ',');
|
||||
|
||||
if (!delim)
|
||||
if (!sep)
|
||||
delim = option + strlen(option);
|
||||
else
|
||||
delim = sep;
|
||||
} else if (sep && sep < delim) {
|
||||
delim = sep;
|
||||
}
|
||||
|
||||
if (!strncmp(option, "rotate", delim - option)) {
|
||||
|
||||
Reference in New Issue
Block a user