[RFC PATCH 4/6] drm/xe/uapi: Add DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE
Matthew Brost
matthew.brost at intel.com
Thu Jan 23 17:37:00 UTC 2025
On Thu, Jan 23, 2025 at 05:36:07AM -0500, Rodrigo Vivi wrote:
> On Wed, Jan 22, 2025 at 05:15:11PM -0800, Matthew Brost wrote:
> > Add DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE which accepts a user pointer
> > to populate the exec queue state so that a GPU hang can be replayed via
> > a Mesa tool.
> >
> > Cc: José Roberto de Souza <jose.souza at intel.com>
> > Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> > ---
> > include/uapi/drm/xe_drm.h | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > index e2160330ad01..0fe8c2e8b022 100644
> > --- a/include/uapi/drm/xe_drm.h
> > +++ b/include/uapi/drm/xe_drm.h
> > @@ -204,8 +204,12 @@ struct drm_xe_ext_set_property {
> > /** @pad: MBZ */
> > __u32 pad;
> >
> > - /** @value: property value */
> > - __u64 value;
> > + union {
> > + /** @value: property value */
> > + __u64 value;
> > + /** @ptr: pointer to user value */
> > + __u64 ptr;
> > + };
> >
> > /** @reserved: Reserved */
> > __u64 reserved[2];
> > @@ -1137,6 +1141,7 @@ struct drm_xe_exec_queue_create {
> > #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY 0
> > #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 0
> > #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1
> > +#define DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE 2
>
> Will mesa need a property to read and know that this is supported by the
> running kernel?
>
I had the same question after sending the series. I reasoned the Mesa
tool is not a part of core Mesa implementation and really an internal
thing we (Intel) use to help debug customer bugs. We should know what
kernel we are trying to recreate the hang on and if we use an
unsupported one it kinda our own fault and tool will just fail on exec
queue creation. So I don't think we need advertise if this is supported
via a query.
Up to Mesa team though. If they insist ofc we can add a query.
Matt
> >
> > /** @extensions: Pointer to the first extension struct, if any */
> > __u64 extensions;
> > --
> > 2.34.1
> >
More information about the Intel-xe
mailing list