History

drm/amdgpu: add vm ioctl

It will be used for reserving vmid for shader debugging that requires a fixed vmid. v2: fix warning (Alex)

Chunming Zhou committed 9 years ago

Commit cfbcacf1 parent 63a7c744 files · +40 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/drm/amdgpu_drm.h+22−0
@@ -51,6 +51,7 @@ extern "C" { · 50 unmodified lines
5151 #define DRM_AMDGPU_GEM_OP 0x10
5252 #define DRM_AMDGPU_GEM_USERPTR 0x11
5353 #define DRM_AMDGPU_WAIT_FENCES 0x12
54+#define DRM_AMDGPU_VM 0x13
5455
5556 #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
5657 #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
6566 #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op)
6667 #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
6768 #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)
6870
6971 #define AMDGPU_GEM_DOMAIN_CPU 0x1
7072 #define AMDGPU_GEM_DOMAIN_GTT 0x2
@@ -190,6 +192,26 @@ union drm_amdgpu_ctx { · 119 unmodified lines
190192 union drm_amdgpu_ctx_out out;
191193 };
192194
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+
193215 /*
194216 * This is not a reliable API and you should expect it to fail for any
195217 * number of reasons and have fallback path that do not use userptr to

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t