Skip to content

Introduce crtc->mode_valid() callback

Jose Abreu dri-devel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 17 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm: Introduce crtc->mode_valid() callbackdrivers/gpu/drm/drm_probe_helper.c include/drm/drm_modeset_helper_vtables.h+74 -21 reply
2/2drm: arcpgu: Use crtc->mode_valid() callbackdrivers/gpu/drm/arc/arcpgu_crtc.c+25 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] Introduce crtc->mode_valid() callback

This patchset introduces a new callback for crtc, called mode_valid() that is responsible to limit the number of probbed modes. Just like connector->mode_valid(), this new callback is called at mode probbing stage so that we can validate the mode.

This is specially useful because arcpgu crtc is responsible to set a clock value in the commit() stage but unfortunatelly this clock does not support all the needed ranges. This way we can restrict the number of modes that are handed to userspace, so that we dont hand a mode that will fail the commit() stage.

I guess this can also happen for other drivers so we introduce the callback in the core.

The behaviour remains the same for crtcs that don't have the callback. Also, for a given set of crtcs that can be bound to the connector, if at least one can display the mode then the mode will be probbed.

For more info about why this is needed in arcpgu, please refer here [1].

[1] https://patchwork.kernel.org/patch/9694177/

Jose Abreu (2):
drm: Introduce crtc->mode_valid() callback
drm: arcpgu: Use crtc->mode_valid() callback

Cc Carlos Palminha <[email protected]>
Cc Alexey Brodkin <[email protected]>
Cc Ville Syrjälä <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Andrzej Hajda <[email protected]>
 drivers/gpu/drm/arc/arcpgu_crtc.c        | 28 ++++++++++++++++--
 drivers/gpu/drm/drm_probe_helper.c       | 50 ++++++++++++++++++++++++++++++--
 include/drm/drm_modeset_helper_vtables.h | 26 +++++++++++++++++
 3 files changed, 99 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1