]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe: Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE
authorMatthew Brost <matthew.brost@intel.com>
Wed, 26 Nov 2025 18:59:52 +0000 (10:59 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Mon, 1 Dec 2025 18:03:19 +0000 (10:03 -0800)
commit1026c1a73a9686ff35ac100039f94f0725622447
treecfe8085ee4b06b9c83cc76aa5640a5312d615621
parent7032361d8cb13ab48b2b79167967c3a29c075ce2
drm/xe: Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE

Implement DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE which sets the exec
queue default state to user data passed in. The intent is for a Mesa
tool to use this replay GPU hangs.

v2:
 - Enable the flag DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE
 - Fix the page size math calculation to avoid a crash
v4:
 - Use vmemdup_user (Maarten)
 - Copy default state first into LRC, then replay state (Testing, Carlos)

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patch.msgid.link/20251126185952.546277-10-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_exec_queue.c
drivers/gpu/drm/xe/xe_exec_queue_types.h
drivers/gpu/drm/xe/xe_execlist.c
drivers/gpu/drm/xe/xe_lrc.c
drivers/gpu/drm/xe/xe_lrc.h