]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add DRM_MODE_TYPE_USERDEF flag to probed modes matching a video= argument
authorHans de Goede <hdegoede@redhat.com>
Fri, 21 Feb 2020 17:33:13 +0000 (18:33 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 17 May 2020 20:54:16 +0000 (21:54 +0100)
commitad137998489fdd485a2912dee2792202de407802
treec3b5a4a88ec0a7e79647fe8e5187dbc04800065d
parentbe7e32789c4ead62883aec31ae073d22a9dbb3f3
drm: Add DRM_MODE_TYPE_USERDEF flag to probed modes matching a video= argument

drm_helper_probe_add_cmdline_mode() prefers using a probed mode matching
a video= argument over calculating our own timings for the user specified
mode using CVT or GTF.

But userspace code which is auto-configuring the mode may want to know that
the user has specified that mode on the kernel commandline so that it can
pick that mode over the mode which is marked as DRM_MODE_TYPE_PREFERRED.

This commit sets the DRM_MODE_TYPE_USERDEF flag on the matching mode, just
as we would do on the user-specified mode when no matching probed mode is
found.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200221173313.510235-2-hdegoede@redhat.com
drivers/gpu/drm/drm_probe_helper.c
include/drm/drm_modes.h