Now that a proper error code will be returned to the user on any failure
in atomic_ioctl() via struct drm_mode_atomic, add a new element
error_code in the struct drm_atomic_state so as to hold the error code
during the atomic_check() and atomic_commit() phases.

Signed-off-by: Arun R Murthy <arun.r.mur...@intel.com>
---
 include/drm/drm_atomic.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 
38636a593c9d98cadda85ccd67326cb152f0dd27..55799d848408e23ae5ece2dd694d119489a87ede
 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -524,6 +524,13 @@ struct drm_atomic_state {
         * commit without blocking.
         */
        struct work_struct commit_work;
+
+       /* @error_code
+        *
+        * flag to convey user readable error to the user.
+        * Error codes defined in DRM_MODE_ATOMIC_ERR_FLAGS
+        */
+       u64 error_code;
 };
 
 void __drm_crtc_commit_free(struct kref *kref);

-- 
2.25.1

Reply via email to