Skip to content

User readable error codes on atomic_ioctl failure

Arun R Murthy dri-devel intel-gfx intel-xe oe-kbuild-all 10 versions – In review

Get series with b4
b4 am [email protected] change-id 20250728-atomic-c9713fd357e4

Versions newest first

  1. v11 Latest7 patches 14 repliesIn review
  2. v107 patches 15 repliesSuperseded
  3. v97 patches 5 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v87 patches3 repliesSuperseded
v75 patches11 repliesSuperseded
v65 patches8 repliesSuperseded
v55 patches3 repliesSuperseded
v44 patches5 repliesSuperseded
v34 patches13 repliesSuperseded
v24 patches7 repliesSuperseded

Changes in v9 from the cover letter

- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v8: https://lore.kernel.org/r/[email protected]

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm: Define user readable error codes for atomic ioctlinclude/uapi/drm/drm_mode.h+56 -09 replies
2/7drm/atomic: Add error_code element in atomic_statedrivers/gpu/drm/drm_atomic.c include/drm/drm_atomic.h+41 -00 replies
3/7drm/atomic: Call complete_signaling only if prepare_signaling is donedrivers/gpu/drm/drm_atomic_uapi.c+3 -20 replies
4/7drm/atomic: Allocate atomic_state at the beginning of atomic_ioctldrivers/gpu/drm/drm_atomic_uapi.c+18 -120 replies
5/7drm/atomic: Return user readable error in atomic_ioctldrivers/gpu/drm/drm_atomic_uapi.c+44 -140 replies
6/7drm/i915/display: Error codes for async flip failuresdrivers/gpu/drm/i915/display/intel_display.c+14 -110 replies
7/7drm: Introduce DRM_CAP_ATOMIC_ERROR_REPORTINGdrivers/gpu/drm/drm_ioctl.c include/uapi/drm/drm.h+10 -00 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchSuraj KandpalNaveen Kumar
SeriesT-b
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

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

Read the v11 thread

Cover letter [PATCH v11 0/7] User readable error codes on atomic_ioctl failure

The series focuses on providing a user readable error value on a failure in drm_atomic_ioctl(). Usually -EINVAL is returned in most of the error cases and it is difficult for the user to decode the error and get to know the real cause for the error. If user gets to know the reason for the error then corrective measurements can be taken up.

User will have to check for the capability DRM_CAP_ATOMIC_ERROR_REPORTING before using this feature so as to ensure that the driver supports failure reporting.

TODO: driver specific error codes are to be added and will be done in the follow-up patches.

TODO: Once the series is merged the element 'reserved' used for sending the failure code in struct drm_mode_atomic is to changed to err_code.

The IGT related changes are pushed for review @
https://patchwork.freedesktop.org/series/153330/

[RFC] changes for libdrm pushed for review @
https://gitlab.freedesktop.org/mesa/libdrm/-/merge_requests/450

[DRAFT] KWin changes are pushed for review @
https://invent.kde.org/plasma/kwin/-/merge_requests/8991

To: Maarten Lankhorst <[email protected]>
To: [email protected]>
To: Maxime Ripard <[email protected]>
To: Thomas Zimmermann <[email protected]>
To: David Airlie <[email protected]>
To: Simona Vetter <[email protected]>
To: Jani Nikula <[email protected]>
To: Rodrigo Vivi <[email protected]>
To: Joonas Lahtinen <[email protected]>
To: Tvrtko Ursulin <[email protected]>
To: [email protected]
To: [email protected]
To: [email protected]
To: [email protected]
To: [email protected]
To: [email protected]

---
Changes in v9:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v8: https://lore.kernel.org/r/[email protected]

---
Arun R Murthy (7):
drm: Define user readable error codes for atomic ioctl drm/atomic: Add error_code element in atomic_state drm/atomic: Call complete_signaling only if prepare_signaling is done drm/atomic: Allocate atomic_state at the beginning of atomic_ioctl drm/atomic: Return user readable error in atomic_ioctl drm/i915/display: Error codes for async flip failures
drm: Introduce DRM_CAP_ATOMIC_ERROR_REPORTING

 drivers/gpu/drm/drm_atomic.c                 | 31 ++++++++++
 drivers/gpu/drm/drm_atomic_uapi.c            | 89 ++++++++++++++++++++--------
 drivers/gpu/drm/drm_ioctl.c                  |  3 +
 drivers/gpu/drm/i915/display/intel_display.c | 25 ++++----
 include/drm/drm_atomic.h                     | 10 ++++
 include/uapi/drm/drm.h                       |  7 +++
 include/uapi/drm/drm_mode.h                  | 56 +++++++++++++++++
 7 files changed, 184 insertions(+), 37 deletions(-)

---
base-commit: 65b94118bc585aefc7095c0e9554c3bb12d98a69
change-id: 20250728-atomic-c9713fd357e4

Best regards,

Signature · 1 line
Arun R Murthy <[email protected]>