]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm: Always warn if user-defined modes are not supported
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 11 May 2022 18:31:23 +0000 (20:31 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 16 May 2022 11:42:49 +0000 (13:42 +0200)
Print a warning if a user-specifed display mode is not supported by
the display pipeline. Users specified the display mode on the kernel
command line with the use of the video= parameter. Setting an
unsupported mode will leave the console blank, so we should at least
let the user know why.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511183125.14294-2-tzimmermann@suse.de
drivers/gpu/drm/drm_modes.c

index 14b746f7ba975954c3f1c168801405df15252d25..40b7b245e98c523383eb053387565b737bc2cb14 100644 (file)
@@ -1328,6 +1328,10 @@ void drm_mode_prune_invalid(struct drm_device *dev,
        list_for_each_entry_safe(mode, t, mode_list, head) {
                if (mode->status != MODE_OK) {
                        list_del(&mode->head);
+                       if (mode->type & DRM_MODE_TYPE_USERDEF) {
+                               drm_warn(dev, "User-defined mode not supported: "
+                                        DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
+                       }
                        if (verbose) {
                                drm_mode_debug_printmodeline(mode);
                                DRM_DEBUG_KMS("Not using %s mode: %s\n",