It will be used for reserving vmid for shader debugging that requires a fixed vmid. v2: fix warning (Alex)
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -51,6 +51,7 @@ extern "C" { · 50 unmodified lines | |||
| 51 | #define DRM_AMDGPU_GEM_OP 0x10 | 51 | #define DRM_AMDGPU_GEM_OP 0x10 |
| 52 | #define DRM_AMDGPU_GEM_USERPTR 0x11 | 52 | #define DRM_AMDGPU_GEM_USERPTR 0x11 |
| 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 | 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 |
| 54 | #define DRM_AMDGPU_VM 0x13 | ||
| 54 | 55 | ||
| 55 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) | 56 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 56 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) | 57 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
| @@ -65,6 +66,7 @@ extern "C" { · 8 unmodified lines | |||
| 65 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) | 66 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) |
| 66 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) | 67 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) |
| 67 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) | 68 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) |
| 69 | #define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) | ||
| 68 | 70 | ||
| 69 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 | 71 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
| 70 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 | 72 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| @@ -190,6 +192,26 @@ union drm_amdgpu_ctx { · 119 unmodified lines | |||
| 190 | union drm_amdgpu_ctx_out out; | 192 | union drm_amdgpu_ctx_out out; |
| 191 | }; | 193 | }; |
| 192 | 194 | ||
| 195 | /* vm ioctl */ | ||
| 196 | #define AMDGPU_VM_OP_RESERVE_VMID 1 | ||
| 197 | #define AMDGPU_VM_OP_UNRESERVE_VMID 2 | ||
| 198 | |||
| 199 | struct drm_amdgpu_vm_in { | ||
| 200 | /** AMDGPU_VM_OP_* */ | ||
| 201 | __u32 op; | ||
| 202 | __u32 flags; | ||
| 203 | }; | ||
| 204 | |||
| 205 | struct drm_amdgpu_vm_out { | ||
| 206 | /** For future use, no flags defined so far */ | ||
| 207 | __u64 flags; | ||
| 208 | }; | ||
| 209 | |||
| 210 | union drm_amdgpu_vm { | ||
| 211 | struct drm_amdgpu_vm_in in; | ||
| 212 | struct drm_amdgpu_vm_out out; | ||
| 213 | }; | ||
| 214 | |||
| 193 | /* | 215 | /* |
| 194 | * This is not a reliable API and you should expect it to fail for any | 216 | * This is not a reliable API and you should expect it to fail for any |
| 195 | * number of reasons and have fallback path that do not use userptr to | 217 | * number of reasons and have fallback path that do not use userptr to |