[PATCH 1/2] drm/xe: Add DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP
Matthew Brost
matthew.brost at intel.com
Wed Sep 4 17:04:59 UTC 2024
Add DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP which will install exec IOCTL
fence into external BO's dma-resv bookkeep slot rather than write slot.
A bit of confusion of the usage of the dma-buf sync uAPI lead to using
the write slot. With a proper user space the bookkeep slot is
sufficient as user space will install read / write dependencies. Flags
is added to not break old user spaces.
Cc: Kenneth Graunke <kenneth.w.graunke at intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: Boris Brezillon <boris.brezillon at collabora.com>
Suggested-by: Simona Vetter <simona.vetter at ffwll.ch>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
include/uapi/drm/xe_drm.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index b6fbe4988f2e..54ec1cbce895 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -849,6 +849,11 @@ struct drm_xe_gem_mmap_offset {
* demand when accessed, and also allows per-VM overcommit of memory.
* The xe driver internally uses recoverable pagefaults to implement
* this.
+ * - %DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP - Insert exec IOCTL fences into
+ * external BO's bookkeep slots rather than write slots. A bit of confusion
+ * the dma-buf sync uAPI lead using the write slots but with a proper user
+ * space implementation only bookkeep is required as user space will install
+ * read / write dependecies. Flag added as an opt in to correct usage model.
*/
struct drm_xe_vm_create {
/** @extensions: Pointer to the first extension struct, if any */
@@ -857,6 +862,7 @@ struct drm_xe_vm_create {
#define DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE (1 << 0)
#define DRM_XE_VM_CREATE_FLAG_LR_MODE (1 << 1)
#define DRM_XE_VM_CREATE_FLAG_FAULT_MODE (1 << 2)
+#define DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP (1 << 3)
/** @flags: Flags */
__u32 flags;
--
2.34.1
More information about the dri-devel
mailing list