[PATCH 1/2] drm/xe: Add DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP
Cavitt, Jonathan
jonathan.cavitt at intel.com
Wed Sep 4 17:36:53 UTC 2024
-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Matthew Brost
Sent: Wednesday, September 4, 2024 10:05 AM
To: intel-xe at lists.freedesktop.org; dri-devel at lists.freedesktop.org
Cc: simona.vetter at ffwll.ch; boris.brezillon at collabora.com; Landwerlin, Lionel G <lionel.g.landwerlin at intel.com>; Graunke, Kenneth W <kenneth.w.graunke at intel.com>
Subject: [PATCH 1/2] drm/xe: Add DRM_XE_VM_CREATE_FLAG_EXTOBJ_BOOKKEEP
>
> 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>
LGTM, though there may be an argument to be made that this should
be squashed with the next patch in this series. I won't be making that
argument, however.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt
> ---
> 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