Skip to content

Commit dd073a3

Browse files
committed
drm/probe-helper: Ensure cmdline mode matches interlace mode
drm_helper_probe_add_cmdline_mode was looking for a match for the width, height, and refresh rate within the EDID modes, but didn't check the interlacing flag. That meant that with video=1920x1080@50i would match any 1920x1080@50 mode that was found. The converse would be possible too if an interlaced mode with matching resolution & refresh rate was found first. Check the interlacing flag as well. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 686f570 commit dd073a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/drm_probe_helper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ static int drm_helper_probe_add_cmdline_mode(struct drm_connector *connector)
163163
continue;
164164
}
165165

166+
if (cmdline_mode->interlace ==
167+
!(mode->flags & DRM_MODE_FLAG_INTERLACE))
168+
continue;
169+
166170
/* Mark the matching mode as being preferred by the user */
167171
mode->type |= DRM_MODE_TYPE_USERDEF;
168172
return 0;

0 commit comments

Comments
 (0)