Skip to content

drm/client: Fix display-mode selection

Thomas Zimmermann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm: Always warn if user-defined modes are not supporteddrivers/gpu/drm/drm_modes.c+4 -01 reply
2/3drm/client: Look for command-line modes firstdrivers/gpu/drm/drm_client_modeset.c+11 -01 reply
3/3drm/client: Don't add new command-line modedrivers/gpu/drm/drm_client_modeset.c+5 -121 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJavier Martinez CanillasMaxime Ripard
SeriesR-b
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] drm/client: Fix display-mode selection

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(-)
Signature · 1 line
2.36.0