From: David Francis <David.Francis@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: David Francis <David.Francis@amd.com>
Subject: [PATCH v6 1/2] include: Add GEM_CHANGE_HANDLE to drm.h
Date: Wed, 25 Nov 2026 09:41:09 -0500 [thread overview]
Message-ID: <20261125144110.2198338-1-David.Francis@amd.com> (raw)
This ioctl was added in kernel patch
https://lore.kernel.org/dri-devel/20250717143556.857893-2-David.Francis@amd.com/
It provides an interface to change the handle of a gem object.
To test it, we need this interface
Signed-off-by: David Francis <David.Francis@amd.com>
---
include/drm-uapi/drm.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/include/drm-uapi/drm.h b/include/drm-uapi/drm.h
index baa620e3f..cf131da24 100644
--- a/include/drm-uapi/drm.h
+++ b/include/drm-uapi/drm.h
@@ -619,6 +619,21 @@ struct drm_gem_open {
__u64 size;
};
+/**
+ * struct drm_gem_change_handle - Argument for &DRM_IOCTL_GEM_CHANGE_HANDLE ioctl.
+ * @handle: The handle of a gem object.
+ * @new_handle: An available gem handle.
+ *
+ * This ioctl changes the handle of a GEM object to the specified one.
+ * The new handle must be unused. On success the old handle is closed
+ * and all further IOCTL should refer to the new handle only.
+ * Calls to DRM_IOCTL_PRIME_FD_TO_HANDLE will return the new handle.
+ */
+struct drm_gem_change_handle {
+ __u32 handle;
+ __u32 new_handle;
+};
+
/**
* DRM_CAP_DUMB_BUFFER
*
@@ -1296,6 +1311,14 @@ extern "C" {
*/
#define DRM_IOCTL_MODE_CLOSEFB DRM_IOWR(0xD0, struct drm_mode_closefb)
+/**
+ * DRM_IOCTL_GEM_CHANGE_HANDLE - Move an object to a different handle
+ *
+ * Some applications (notably CRIU) need objects to have specific gem handles.
+ * This ioctl changes the object at one gem handle to use a new gem handle.
+ */
+#define DRM_IOCTL_GEM_CHANGE_HANDLE DRM_IOWR(0xD2, struct drm_gem_change_handle)
+
/*
* Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x9f.
--
2.34.1
next reply other threads:[~2026-11-25 14:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 14:41 David Francis [this message]
2026-11-25 14:41 ` [PATCH v6 2/2] tests/intel: Add edge case and race condition tests for GEM_CHANGE_HANDLE David Francis
2026-11-30 16:01 ` Kamil Konieczny
2026-11-25 23:06 ` ✓ Xe.CI.BAT: success for series starting with [v6,1/2] include: Add GEM_CHANGE_HANDLE to drm.h Patchwork
2026-11-25 23:25 ` ✓ i915.CI.BAT: " Patchwork
2026-11-26 8:31 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-26 19:41 ` [PATCH v6 1/2] " Kamil Konieczny
2026-11-26 19:51 ` Francis, David
2026-11-30 16:00 ` Kamil Konieczny
2026-11-27 6:20 ` ✗ i915.CI.Full: failure for series starting with [v6,1/2] " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261125144110.2198338-1-David.Francis@amd.com \
--to=david.francis@amd.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox