mirror-linux/include/uapi/drm
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
..
amdgpu_drm.h drm/amdgpu: add new INFO IOCTL query for input power 2024-01-15 18:35:36 -05:00
armada_drm.h
drm.h drm/syncobj: Add deadline support for syncobj waits 2023-12-02 01:17:45 +02:00
drm_fourcc.h drm/fourcc: fix spelling/typos 2023-12-13 16:19:00 +01:00
drm_mode.h drm: Introduce plane SIZE_HINTS property 2024-04-11 18:28:58 +03:00
drm_sarea.h
etnaviv_drm.h Revert "drm/etnaviv: Expose a few more chipspecs to userspace" 2024-04-25 16:56:20 +02:00
exynos_drm.h
habanalabs_accel.h accel/habanalabs/gaudi2: add signed dev info uAPI 2023-12-19 11:09:43 +02:00
i915_drm.h drm/i915: Support replaying GPU hangs with captured context image 2024-05-16 07:37:05 +00:00
ivpu_accel.h accel/ivpu: Add job status for jobs aborted by the driver 2024-02-06 13:37:34 +01:00
lima_drm.h
msm_drm.h drm/msm: Add param for the highest bank bit 2023-12-10 10:19:18 -08:00
nouveau_drm.h drm/nouveau: move more missing UAPI bits 2024-03-05 16:12:26 +01:00
omap_drm.h
panfrost_drm.h drm/panfrost: Remove type name from internal struct again 2022-11-07 15:35:43 +00:00
panthor_drm.h drm/panthor: Fix wrong kernel-doc format in the uAPI header 2024-03-26 11:57:39 +01:00
pvr_drm.h drm/imagination: Numerous documentation fixes. 2023-11-28 18:56:03 +01:00
qaic_accel.h accel/qaic: Deprecate ->size field from attach slice IOCTL structure 2023-12-15 10:50:31 -07:00
qxl_drm.h
radeon_drm.h
tegra_drm.h
v3d_drm.h drm/v3d: Create a CPU job extension for the copy performance query job 2023-12-01 09:47:36 -03:00
vc4_drm.h
vgem_drm.h
virtgpu_drm.h drm/uapi: add explicit virtgpu context debug name 2023-11-11 21:31:00 +03:00
vmwgfx_drm.h drm/vmwgfx: Add SPDX header to vmwgfx_drm.h 2024-01-30 14:18:19 -05:00
xe_drm.h drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE 2024-04-08 12:05:30 -07:00