The commit 84a1ed5e6756 ("drm/xe/uapi: Remove unused flags") is partially reverted. At the time, flags not used by user space were removed during cleanup. Some flags now needed by the compute runtime are brought back in this commit: - DRM_XE_VM_BIND_FLAG_READONLY is used to write protect kernel ISA thus preventing accidental overwrites. - DRM_XE_VM_BIND_FLAG_IMMEDIATE is used to trigger mapping at the time of binding in order to prevent faulting at execution time. The changes in the compute runtime are ready and approved, see link below. v2: Include a link to the PR in the commit message (Matthew Brost) v3: Update kernel doc and improve commit message (Lucas De Marchi)
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -871,6 +871,12 @@ struct drm_xe_vm_destroy { · 870 unmodified lines | |||
| 871 | * - %DRM_XE_VM_BIND_OP_PREFETCH | 871 | * - %DRM_XE_VM_BIND_OP_PREFETCH |
| 872 | * | 872 | * |
| 873 | * and the @flags can be: | 873 | * and the @flags can be: |
| 874 | * - %DRM_XE_VM_BIND_FLAG_READONLY - Setup the page tables as read-only | ||
| 875 | * to ensure write protection | ||
| 876 | * - %DRM_XE_VM_BIND_FLAG_IMMEDIATE - On a faulting VM, do the | ||
| 877 | * MAP operation immediately rather than deferring the MAP to the page | ||
| 878 | * fault handler. This is implied on a non-faulting VM as there is no | ||
| 879 | * fault handler to defer to. | ||
| 874 | * - %DRM_XE_VM_BIND_FLAG_NULL - When the NULL flag is set, the page | 880 | * - %DRM_XE_VM_BIND_FLAG_NULL - When the NULL flag is set, the page |
| 875 | * tables are setup with a special bit which indicates writes are | 881 | * tables are setup with a special bit which indicates writes are |
| 876 | * dropped and all reads return zero. In the future, the NULL flags | 882 | * dropped and all reads return zero. In the future, the NULL flags |
| @@ -963,6 +969,8 @@ struct drm_xe_vm_bind_op { · 86 unmodified lines | |||
| 963 | /** @op: Bind operation to perform */ | 969 | /** @op: Bind operation to perform */ |
| 964 | __u32 op; | 970 | __u32 op; |
| 965 | 971 | ||
| 972 | #define DRM_XE_VM_BIND_FLAG_READONLY (1 << 0) | ||
| 973 | #define DRM_XE_VM_BIND_FLAG_IMMEDIATE (1 << 1) | ||
| 966 | #define DRM_XE_VM_BIND_FLAG_NULL (1 << 2) | 974 | #define DRM_XE_VM_BIND_FLAG_NULL (1 << 2) |
| 967 | #define DRM_XE_VM_BIND_FLAG_DUMPABLE (1 << 3) | 975 | #define DRM_XE_VM_BIND_FLAG_DUMPABLE (1 << 3) |
| 968 | /** @flags: Bind flags */ | 976 | /** @flags: Bind flags */ |