All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Murthy, Arun R" <arun.r.murthy@intel.com>
To: Xaver Hugl <xaver.hugl@kde.org>, Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>, <harry.wentland@amd.com>,
	<uma.shankar@intel.com>, <louis.chauvet@bootlin.com>,
	<naveen1.kumar@intel.com>, <ramya.krishna.yella@intel.com>,
	<dri-devel@lists.freedesktop.org>,
	<intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>,
	Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH v11 1/7] drm: Define user readable error codes for atomic ioctl
Date: Wed, 7 Oct 2026 12:33:30 +0530	[thread overview]
Message-ID: <aa2fdbd7-4f8b-4313-aafc-22f9c6beb392@intel.com> (raw)
In-Reply-To: <CAFZQkGxYm_zBe69ecsOwhL7ftXVSPkTz5EUR_iXsAgLBVPd9NA@mail.gmail.com>

On 05-10-2026 19:30, Xaver Hugl wrote:
>> That's not a policy decision. User space is free to do what ever it
>> wants.  What I have in mind is a hint from the kernel what to do next.
> There's a lot of different ways a commit could be fixed, and telling
> the compositor things like "turn off this plane" wouldn't give the
> compositor any actionable choices except giving up or exactly
> following the hint.
>
> If you meant much higher level things like
> - reduce scanout bandwidth
> - reduce connector bandwidth on this connector
> - do a modeset
>
> that's exactly what the proposed API does.
>
> I don't think there's a middle ground between the two, KMS is too
> complex for that.
>
>>>>> + * @DRM_MODE_ATOMIC_INVALID_API_USAGE: invallid API usage(DRM_ATOMIC not
>>>>> + *                                  enabled, invalid falg, page_flip event
>>>>> + *                                  with test-only, etc)
>>>> I've seen this being used in the i915 patch for a async flip.  Could
>>>> mean anything there (format, driver specifics).
>>> Its purpose is to catch anything that the compositor is supposed to
>>> know it can't do - using unsupported formats, invalid combinations of
>>> properties (crtc active=1 without a connector), that sort of thing. It
>>> should never be anything driver specific though.
>> I don't see how this could be useful except for the prototype that come
>> with this series.  It's so broad in meaning that it's almost meaningless.
> It's useful because it tells the compositor that the failure is caused
> by an implementation error in the compositor, instead of some driver
> or hardware limitation. It doesn't need to be meaningful outside of
> that, a developer later debugging what went wrong can use the error
> string to figure it out.
>
>> And error codes don't have to be driver specific to be meaningful. I
>> already brought up DRM's mode-status code as example. They are not
>> specific to any mode, display or hardware. Yet they clearly state what
>> went wrong with the mode.
> I think that only works because the mode isn't specific to any display
> or hardware. Atomic commit failures are often specific to some
> combination of driver, GPU and display.
>
>> You could to this with detailed and precise error codes plus the object
>> on which it failed.
> They can never be detailed enough to exactly pinpoint specific edge
> cases, unless you give literally every single return path in every
> driver an individual error code. I don't think that is feasible (and
> then that error code would be uAPI).
>
Yes at cases of error where driver feels that a change in the 
drm_mode_object/property can overcome the failure will be reported.
>> Filename + line is even worse.  None of this is even close to stable.
>> I'll nak this as much as possible.
> That's the point? It's supposed to be not stable, so it doesn't become uAPI.
Even I feel that expose kernel file name and line number is unnecessary 
for the user log. We anyway have this in dmesg and will be debugged upon.
>> I also don't buy the argument about diving through kernel sources. Not
>> doing that should be the goal here because it is what we currently do.
> I don't think that's something you can ever fully get around. Just the
> very hardware specific error cases alone make it impossible.

To differentiate the hardware specific error we have SPEC_VIOLATION 
error code for which compositor may not be able to take corrective 
measurement. Compositor upon getting this should look for alternative 
such as software/gpu composition.  Logging this will have debugging in 
the kernel.

Thanks and Regards,
Arun R Murthy
--------------------

> - Xaver

  reply	other threads:[~2026-10-07  7:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  9:03 [PATCH v11 0/7] User readable error codes on atomic_ioctl failure Arun R Murthy
2026-03-31  9:03 ` [PATCH v11 1/7] drm: Define user readable error codes for atomic ioctl Arun R Murthy
2026-06-25 23:09   ` Xaver Hugl
2026-07-20  7:03     ` Murthy, Arun R
2026-10-05  9:08   ` Thomas Zimmermann
2026-10-05 11:39     ` Xaver Hugl
2026-10-05 12:22       ` Thomas Zimmermann
2026-10-05 14:00         ` Xaver Hugl
2026-10-07  7:03           ` Murthy, Arun R [this message]
2026-10-07  8:41           ` Thomas Zimmermann
2026-10-05 12:07     ` Jani Nikula
2026-03-31  9:03 ` [PATCH v11 2/7] drm/atomic: Add error_code element in atomic_state Arun R Murthy
2026-04-02  6:17   ` kernel test robot
2026-03-31  9:03 ` [PATCH v11 3/7] drm/atomic: Call complete_signaling only if prepare_signaling is done Arun R Murthy
2026-03-31  9:03 ` [PATCH v11 4/7] drm/atomic: Allocate atomic_state at the beginning of atomic_ioctl Arun R Murthy
2026-03-31  9:03 ` [PATCH v11 5/7] drm/atomic: Return user readable error in atomic_ioctl Arun R Murthy
2026-03-31  9:03 ` [PATCH v11 6/7] drm/i915/display: Error codes for async flip failures Arun R Murthy
2026-03-31  9:03 ` [PATCH v11 7/7] drm: Introduce DRM_CAP_ATOMIC_ERROR_REPORTING Arun R Murthy
2026-03-31  9:12 ` ✗ CI.checkpatch: warning for User readable error codes on atomic_ioctl failure (rev10) Patchwork
2026-03-31  9:13 ` ✓ CI.KUnit: success " Patchwork
2026-03-31  9:51 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-03-31  9:59 ` ✓ i915.CI.BAT: success " Patchwork
2026-03-31 13:57 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-31 20:51 ` ✗ i915.CI.Full: " Patchwork
2026-04-20  8:32 ` [PATCH v11 0/7] User readable error codes on atomic_ioctl failure Kumar, Naveen1
2026-04-21  8:53   ` Michel Dänzer
2026-04-24 11:37     ` Kumar, Naveen1
2026-04-24 14:00       ` Michel Dänzer
2026-10-07  8:51 ` Thomas Zimmermann

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=aa2fdbd7-4f8b-4313-aafc-22f9c6beb392@intel.com \
    --to=arun.r.murthy@intel.com \
    --cc=airlied@gmail.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=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=naveen1.kumar@intel.com \
    --cc=ramya.krishna.yella@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=suraj.kandpal@intel.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.