dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/client: Fix display-mode selection
@ 2022-05-11 18:31 Thomas Zimmermann
  2022-05-11 18:31 ` [PATCH 1/3] drm: Always warn if user-defined modes are not supported Thomas Zimmermann
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2022-05-11 18:31 UTC (permalink / raw)
  To: daniel, airlied, javierm, mripard, maarten.lankhorst
  Cc: Thomas Zimmermann, dri-devel

Pick user-defined display mode in DRM clients if the mode has been
validated by the driver. Otherwise pick a preferred display mode.

Booting the kernel with video=<mode> and giving an unsupported display
mode can easily turn the display unusable. This is best tested by
booting simpledrm with a display mode that does not use the firmware
framebuffer's resolution. While simpledrm filter's out the mode as
invalid, the DRM client still picks it and the console won't show up.

Several factors contribute to this problem.

 * The connector invalidates the user-defined display mode, but never
   tells the user about it.
 * The DRM client doesn't look for user-defined display modes, but for
   modes that are similar.
 * If no similar mode can be found, the client adds the invalid display
   mode back to the connector's mode list for use.

Each of the patches in this patchset addresses one of these problems.
Overall the DRM client has no business in display-mode detection and
should only pick one of the modes that has been detected and validated 
by the connector.

Thomas Zimmermann (3):
  drm: Always warn if user-defined modes are not supported
  drm/client: Look for command-line modes first
  drm/client: Don't add new command-line mode

 drivers/gpu/drm/drm_client_modeset.c | 28 ++++++++++++++++------------
 drivers/gpu/drm/drm_modes.c          |  4 ++++
 2 files changed, 20 insertions(+), 12 deletions(-)

-- 
2.36.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-12  8:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 18:31 [PATCH 0/3] drm/client: Fix display-mode selection Thomas Zimmermann
2022-05-11 18:31 ` [PATCH 1/3] drm: Always warn if user-defined modes are not supported Thomas Zimmermann
2022-05-12  7:13   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox