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
51#define DRM_AMDGPU_GEM_OP 0x1051#define DRM_AMDGPU_GEM_OP 0x10
52#define DRM_AMDGPU_GEM_USERPTR 0x1152#define DRM_AMDGPU_GEM_USERPTR 0x11
53#define DRM_AMDGPU_WAIT_FENCES 0x1253#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 0x171#define AMDGPU_GEM_DOMAIN_CPU 0x1
70#define AMDGPU_GEM_DOMAIN_GTT 0x272#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
199struct drm_amdgpu_vm_in {
200 /** AMDGPU_VM_OP_* */
201 __u32 op;
202 __u32 flags;
203};
204
205struct drm_amdgpu_vm_out {
206 /** For future use, no flags defined so far */
207 __u64 flags;
208};
209
210union 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 any216 * 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 to217 * 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