[Intel-xe] [RFC PATCH] drm/xe/vm, drm/xe/uapi: Use LR abbrev for long-running vms

Lucas De Marchi lucas.demarchi at intel.com
Mon Nov 13 14:33:57 UTC 2023


On Fri, Nov 10, 2023 at 02:59:13PM +0100, Thomas Hellström wrote:
>Currently we're using "compute mode" for long running VMs using
>using preempt-fences for memory management, and "fault mode" for long
>running VMs using page faults. Internally the driver uses "no_dma_fences"
>for long-running vms which is a bit misleading since dma-fences are only
>disallowed as out-fences.
>
>Change this to use the terminology "long-running" abbreviated as LR for
>long-running VMs. These VMs can then either be in preempt-fence mode or
>fault mode. The user can force fault mode at creation time, but otherwise
>the driver can choose to use fault- or preempt-fence mode for long-running
>vms depending on the device capabilities. Initially unless fault-mode is
>specified, the driver uses preempt-fence mode.

^^ this paragraph or a variant thereof would make for a good
documentation below

>diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
>index 9bd7092a7ea4..1c574dd3bed9 100644
>--- a/include/uapi/drm/xe_drm.h
>+++ b/include/uapi/drm/xe_drm.h
>@@ -596,7 +596,7 @@ struct drm_xe_vm_create {
> 	__u64 extensions;
>
> #define DRM_XE_VM_CREATE_SCRATCH_PAGE	(0x1 << 0)
>-#define DRM_XE_VM_CREATE_COMPUTE_MODE	(0x1 << 1)

... here, or within the kernel-doc below to make it more useful than
"Flags".

Lucas De Marchi

>+#define DRM_XE_VM_CREATE_LR_MODE	(0x1 << 1)
> #define DRM_XE_VM_CREATE_ASYNC_DEFAULT	(0x1 << 2)
> #define DRM_XE_VM_CREATE_FAULT_MODE	(0x1 << 3)
> 	/** @flags: Flags */
>-- 
>2.41.0
>


More information about the Intel-xe mailing list