From df0aa4ebef56e659e7a3502bf00c0a6a227495cf Mon Sep 17 00:00:00 2001 From: Carlos Santa Date: Wed, 2 Oct 2024 13:17:02 -0700 Subject: [PATCH] intel/hang_replay: fix the typo in the ioctl call What we really want to pass is DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM vs DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM Fixes: a9f1151de27 ("intel/hang_replay: use hw image param") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11959 Signed-off-by: Carlos Santa Part-of: (cherry picked from commit 700141da43d9ec13d5deffedb14c3c4a9266f8d9) --- .pick_status.json | 2 +- src/intel/tools/intel_hang_replay.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8f7bcd4f66d..b1c869dc9d2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1774,7 +1774,7 @@ "description": "intel/hang_replay: fix the typo in the ioctl call", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a9f1151de270c5270a9e0280924b70b39d4692e1", "notes": null diff --git a/src/intel/tools/intel_hang_replay.c b/src/intel/tools/intel_hang_replay.c index 8ca657c9dfa..133cd117c26 100644 --- a/src/intel/tools/intel_hang_replay.c +++ b/src/intel/tools/intel_hang_replay.c @@ -138,7 +138,11 @@ gem_context_set_hw_image(int drm_fd, uint32_t ctx_id, param.param = I915_CONTEXT_PARAM_RECOVERABLE; param.value = (uint64_t)(uintptr_t)&val; - ret = intel_ioctl(drm_fd, DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, ¶m); + /* Force i915 to convert the "proto" context to be a "live" context, since + * the I915_CONTEXT_PARAM_CONTEXT_IMAGE parameter cannot be set on a "proto" + * context. See kernel docs for i915_gem_proto_context. + */ + ret = intel_ioctl(drm_fd, DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM, ¶m); if (ret) return false;