linux/include/uapi
Tvrtko Ursulin 0f1bb41bf3 drm/i915: Support replaying GPU hangs with captured context image
When debugging GPU hangs Mesa developers are finding it useful to replay
the captured error state against the simulator. But due various simulator
limitations which prevent replicating all hangs, one step further is being
able to replay against a real GPU.

This is almost doable today with the missing part being able to upload the
captured context image into the driver state prior to executing the
uploaded hanging batch and all the buffers.

To enable this last part we add a new context parameter called
I915_CONTEXT_PARAM_CONTEXT_IMAGE. It follows the existing SSEU
configuration pattern of being able to select which context to apply
against, paired with the actual image and its size.

Since this is adding a new concept of debug only uapi, we hide it behind
a new kconfig option and also require activation with a module parameter.
Together with a warning banner printed at driver load, all those combined
should be sufficient to guard against inadvertently enabling the feature.

In terms of implementation we allow the legacy context set param to be
used since that removes the need to record the per context data in the
proto context, while still allowing flexibility of specifying context
images for any context.

Mesa MR using the uapi can be seen at:
  https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27594

v2:
 * Fix whitespace alignment as per checkpatch.
 * Added warning on userspace misuse.
 * Rebase for extracting ce->default_state shadowing.

v3:
 * Rebase for I915_CONTEXT_PARAM_LOW_LATENCY.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Carlos Santa <carlos.santa@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Carlos Santa <carlos.santa@intel.com>
Signed-off-by: Tvrtko Ursulin <tursulin@igalia.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20240514145939.87427-2-tursulin@igalia.com
2024-05-16 07:37:05 +00:00
..
asm-generic uapi: introduce uapi-friendly macros for GENMASK 2024-02-08 08:41:03 -05:00
drm drm/i915: Support replaying GPU hangs with captured context image 2024-05-16 07:37:05 +00:00
linux vDPA: code clean for vhost_vdpa uapi 2024-04-22 17:07:13 -04:00
misc
mtd ubi: fastmap: Add control in 'UBI_IOCATT' ioctl to reserve PEBs for filling pools 2023-10-28 23:16:00 +02:00
rdma RDMA/hns: Support userspace configuring congestion control algorithm with QP granularity 2024-03-03 15:01:33 +02:00
regulator uapi: regulator: Fix typo 2024-01-04 13:22:24 +00:00
scsi scsi: mpi3mr: Avoid memcpy field-spanning write WARNING 2024-03-25 15:52:09 -04:00
sound ASoC: Updates for v6.9 2024-03-11 16:18:47 +01:00
video
xen xen/gntalloc: Replace UAPI 1-element array 2024-02-13 09:06:48 +01:00
Kbuild