BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CERN//INDICO//EN
BEGIN:VEVENT
SUMMARY:Error Handling on Atomic Commit Failure
DTSTART;VALUE=DATE-TIME:20260929T140500Z
DTEND;VALUE=DATE-TIME:20260929T142500Z
DTSTAMP;VALUE=DATE-TIME:20260904T200456Z
UID:indico-contribution-541@indico.freedesktop.org
DESCRIPTION:Speakers: Ramya Krishna Yella (Intel)\n**Problem Statement**\n
 Today\, when an atomic commit fails\, userspace typically receives only a 
 generic error such as -EINVAL\, with no indication of the underlying cause
 . As a result\, compositors cannot determine why the commit failed or appl
 y appropriate corrective actions. A common example is a bandwidth-related 
 failure\, where the requested bpc exceeds the available link bandwidth. Si
 nce the failure reason is not propagated to userspace\, the compositor mus
 t rely on kernel logs to diagnose the issue and infer that the bpc should 
 be reduced before retrying the atomic commit.\n\n**Solution**\nThe goal is
  to provide compositors with sufficient information to understand why an a
 tomic commit failed and enable targeted fallback mechanisms. In the bandwi
 dth example above\, the kernel reports the reason for the failure\, allowi
 ng the compositor to identify the bandwidth limitation\, reduce the bpc ac
 cordingly\, and retry the atomic commit with a more suitable configuration
 .\n\nThe proposed DRM/KMS UAPI for atomic commit failure reporting repurpo
 ses the **reserved** u64 field in **struct drm_mode_atomic**\, passed as p
 art of the **atomic_commit ioctl**\, to return detailed failure informatio
 n to userspace. As part of the compositor implementation\, this informatio
 n is decoded to identify the specific reason for an atomic commit failure.
  Based on the reported failure\, the compositor will implement targeted fa
 llback logic and intelligently retry the atomic commit with a more suitabl
 e configuration wherever possible.\n\n**Atomic Commit Failure Codes Report
 ed by Kernel**\nThe current implementation defines the following common at
 omic commit failure codes\, with the flexibility to extend the list as new
  failure scenarios are identified.\n•	**DRM_MODE_ATOMIC_UNSPECIFIED_ERRO
 R** – Generic error when no specific failure reason is available. \n•	
 **DRM_MODE_ATOMIC_INVALID_API_USAGE** – The atomic commit failed due to 
 invalid use of the DRM atomic API (e.g.\, missing atomic capability\, inva
 lid flags\, or incompatible options). \n•	**DRM_MODE_ATOMIC_NEED_FULL_MO
 DESET** – The requested update requires a full modeset. \n•	**DRM_MODE
 _ATOMIC_ASYNC_PROP_CHANGED** – A property was modified during an asynchr
 onous page flip. \n•	**DRM_MODE_ATOMIC_SCANOUT_BW** – The requested di
 splay configuration exceeds the available scanout bandwidth (e.g.\, resolu
 tion\, refresh rate\, or color depth). \n•	**DRM_MODE_ATOMIC_CONNECTOR_B
 W** – The requested configuration exceeds the available bandwidth of the
  display connector or link. \n•	**DRM_MODE_ATOMIC_PIPE_BW** – The disp
 lay pipeline cannot support the requested configuration due to pipe or sca
 ler limitations. \n•	**DRM_MODE_ATOMIC_MEMORY_DOMAIN** – The requested
  configuration exceeds memory or bandwidth constraints not covered by the 
 other bandwidth-related errors. \n•	**DRM_MODE_ATOMIC_SPEC_VIOLATION** 
 – The requested configuration violates a hardware-specific capability or
  specification limitation.\n\n**References**\n2025 Display Next Hackfest	[
 https://hackmd.io/f3bDn3kyRUalLn4LbMfCVQ#Commit-Failure-Feedback][1]\nKern
 el	[https://patchwork.freedesktop.org/series/152275/][2]\nMutter	[https://
 gitlab.gnome.org/GNOME/mutter/-/merge_requests/5022][3]\nIGT	[https://patc
 hwork.freedesktop.org/series/153330/][4]\nLibdrm	[https://gitlab.freedeskt
 op.org/mesa/libdrm/-/merge_requests/450][5]\nKWIN	[https://invent.kde.org/
 plasma/kwin/-/merge_requests/8991][6]\n\n\n  [1]: https://hackmd.io/f3bDn3
 kyRUalLn4LbMfCVQ#Commit-Failure-Feedback\n  [2]: https://patchwork.freedes
 ktop.org/series/152275/\n  [3]: https://gitlab.gnome.org/GNOME/mutter/-/me
 rge_requests/5022\n  [4]: https://patchwork.freedesktop.org/series/153330/
 \n  [5]: https://gitlab.freedesktop.org/mesa/libdrm/-/merge_requests/450\n
   [6]: https://invent.kde.org/plasma/kwin/-/merge_requests/8991\n\nhttps:/
 /indico.freedesktop.org/event/12/contributions/541/
LOCATION:
URL:https://indico.freedesktop.org/event/12/contributions/541/
END:VEVENT
END:VCALENDAR
