From: "Murthy, Arun R" <arun.r.murthy@intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"naveen1.kumar@intel.com" <naveen1.kumar@intel.com>,
"xaver.hugl@kde.org" <xaver.hugl@kde.org>,
"uma.shankar@intel.com" <uma.shankar@intel.com>,
"harry.wentland@amd.com" <harry.wentland@amd.com>
Subject: Re: [PATCH v2 1/4] drm: Define user readable error codes for atomic ioctl
Date: Wed, 30 Jul 2025 19:15:44 +0530 [thread overview]
Message-ID: <4c389dd3-e428-4b6f-beec-67bf5a91de97@intel.com> (raw)
In-Reply-To: <TY3PR01MB113461B465C7F642E7DE1A70C8624A@TY3PR01MB11346.jpnprd01.prod.outlook.com>
On 30-07-2025 16:52, Biju Das wrote:
> Hi Arun,
>
>> -----Original Message-----
>> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Arun R Murthy
>> Sent: 30 July 2025 11:17
>> Subject: [PATCH v2 1/4] drm: Define user readable error codes for atomic ioctl
>>
>> There can be multiple reasons for a failure in atomic_ioctl. Most often in these error conditions -
>> EINVAL is returned. User/Compositor would have to blindly take a call on failure of this ioctl so as
>> to use ALLOW_MODESET or any. It would be good if user/compositor gets a readable error code on failure
>> so they can take proper corrections in the next commit.
>> The struct drm_mode_atomic is being passed by the user/compositor which holds the properties for
>> modeset/flip. Reusing the same struct for returning the error code in case of failure can save by
>> creating a new uapi/interface for returning the error code.
>> The element 'reserved' in the struct drm_mode_atomic is used for returning the user readable error
>> code.Its a 64bit variable and should suffice 64 error codes that should be sufficient.
>>
>> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
>> ---
>> include/uapi/drm/drm_mode.h | 40 ++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 40 insertions(+)
>>
>> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index
>> a122bea2559387576150236e3a88f99c24ad3138..87e8f623bfaaab09135be104db04996f0be4dcb4 100644
>> --- a/include/uapi/drm/drm_mode.h
>> +++ b/include/uapi/drm/drm_mode.h
>> @@ -1157,6 +1157,46 @@ struct drm_mode_destroy_dumb {
>> DRM_MODE_ATOMIC_NONBLOCK |\
>> DRM_MODE_ATOMIC_ALLOW_MODESET)
>>
>> +/* atomic not set in the drm_file */
>> +#define DRM_MODE_ATOMIC_CAP_NOT_ENABLED BIT(0)
>> +/* atomic flag passed not in DRM_MODE_ATOMIC_FLAGS list */
>> +#define DRM_MODE_ATOMIC_INVALID_FLAG BIT(1)
>> +/* DRM_MODE_PAGE_FLIP_LEGACY not supported with atomic ioctl */
>> +#define DRM_MODE_ATOMIC_PAGE_FLIP_ASYNC BIT(2)
>> +/* flip event with atomic check only not supported */
>> +#define DRM_MODE_ATOMIC_FLIP_EVENT_WITH_CHECKONLY BIT(3)
>> +/* atomic property change requested need full crtc modeset */
>> +#define DRM_MODE_ATOMIC_CRTC_NEED_FULL_MODESET BIT(4)
>> +/* atomic property change requested has impact on all connected crtc */
>> +#define DRM_MODE_ATOMIC_NEED_FULL_MODESET BIT(5)
>> +/* async flip supported on only primary plane */
>> +#define DRM_MODE_ATOMIC_ASYNC_NOT_PRIMARY BIT(6)
>> +/* modifier not supported by async flip */
>> +#define DRM_MODE_ATOMIC_ASYNC_MODIFIER_NOT_SUPPORTED BIT(7)
>> +/* async flip with pipe joiner not allowed */
>> +#define DRM_MODE_ATOMIC_ASYNC_PIPEJOINER_NOTALLOWED BIT(8)
> For consistency, NOTALLOWED->NOT_ALLOWED ??
Sure, will get it correct!
Thanks and Regards,
Arun R Murthy
--------------------
next prev parent reply other threads:[~2025-07-30 13:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 10:16 [PATCH v2 0/4] User readable error codes on atomic_ioctl failure Arun R Murthy
2025-07-30 10:16 ` [PATCH v2 1/4] drm: Define user readable error codes for atomic ioctl Arun R Murthy
2025-07-30 11:22 ` Biju Das
2025-07-30 13:45 ` Murthy, Arun R [this message]
2025-07-31 11:32 ` Xaver Hugl
2025-08-01 4:48 ` Murthy, Arun R
2025-07-30 10:16 ` [PATCH v2 2/4] drm/atomic: Add error_code element in atomic_state Arun R Murthy
2025-07-30 10:16 ` [PATCH v2 3/4] drm/atomic: Return user readable error in atomic_ioctl Arun R Murthy
2025-07-30 13:14 ` Harry Wentland
2025-07-30 13:55 ` Murthy, Arun R
2025-07-30 14:19 ` Harry Wentland
2025-07-30 10:16 ` [PATCH v2 4/4] drm/i915/display: Error codes for async flip failures Arun R Murthy
2025-07-30 12:57 ` ✗ i915.CI.BAT: failure for User readable error codes on atomic_ioctl failure Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c389dd3-e428-4b6f-beec-67bf5a91de97@intel.com \
--to=arun.r.murthy@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=naveen1.kumar@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=uma.shankar@intel.com \
--cc=xaver.hugl@kde.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox