From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@linux.ie, javierm@redhat.com,
mripard@kernel.org, maarten.lankhorst@linux.intel.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/3] drm: Always warn if user-defined modes are not supported
Date: Wed, 11 May 2022 20:31:23 +0200 [thread overview]
Message-ID: <20220511183125.14294-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20220511183125.14294-1-tzimmermann@suse.de>
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>
---
drivers/gpu/drm/drm_modes.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 14b746f7ba97..40b7b245e98c 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -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",
--
2.36.0
next prev parent reply other threads:[~2022-05-11 18:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 18:31 [PATCH 0/3] drm/client: Fix display-mode selection Thomas Zimmermann
2022-05-11 18:31 ` Thomas Zimmermann [this message]
2022-05-12 7:13 ` [PATCH 1/3] drm: Always warn if user-defined modes are not supported Javier Martinez Canillas
2022-05-11 18:31 ` [PATCH 2/3] drm/client: Look for command-line modes first Thomas Zimmermann
2022-05-12 7:15 ` Javier Martinez Canillas
2022-05-11 18:31 ` [PATCH 3/3] drm/client: Don't add new command-line mode Thomas Zimmermann
2022-05-12 7:20 ` Javier Martinez Canillas
2022-05-12 8:55 ` [PATCH 0/3] drm/client: Fix display-mode selection Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220511183125.14294-2-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox