summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_probe_helper.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-02-21 18:33:13 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2020-05-17 21:54:16 +0100
commitebdc02dd4c4b7ef16abfb44acad36010fa31ee0f (patch)
treec3b5a4a88ec0a7e79647fe8e5187dbc04800065d /drivers/gpu/drm/drm_probe_helper.c
parenta519f6d03f4c497d02c7915fc33eb2b194ee048d (diff)
downloadlinux-ebdc02dd4c4b7ef16abfb44acad36010fa31ee0f.tar.bz2
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
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 576b4b7dcd89..466dfbba8256 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -159,6 +159,8 @@ static int drm_helper_probe_add_cmdline_mode(struct drm_connector *connector)
continue;
}
+ /* Mark the matching mode as being preferred by the user */
+ mode->type |= DRM_MODE_TYPE_USERDEF;
return 0;
}