v2: agd: rebase and squash in all the previous optimizations and changes so everything compiles. v3: squash in Slava's 32bit build fix v4: rebase on drm-next (fence -> dma_fence), squash in Monk's ioctl update patch
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -50,6 +50,7 @@ extern "C" { · 49 unmodified lines | |||
| 50 | #define DRM_AMDGPU_WAIT_CS 0x09 | 50 | #define DRM_AMDGPU_WAIT_CS 0x09 |
| 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 | 54 | ||
| 54 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) | 55 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 55 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) | 56 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
| @@ -63,6 +64,7 @@ extern "C" { · 7 unmodified lines | |||
| 63 | #define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) | 64 | #define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) |
| 64 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) | 65 | #define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) |
| 65 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) | 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_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) | ||
| 66 | 68 | ||
| 67 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 | 69 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
| 68 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 | 70 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| @@ -307,6 +309,32 @@ union drm_amdgpu_wait_cs { · 238 unmodified lines | |||
| 307 | struct drm_amdgpu_wait_cs_out out; | 309 | struct drm_amdgpu_wait_cs_out out; |
| 308 | }; | 310 | }; |
| 309 | 311 | ||
| 312 | struct drm_amdgpu_fence { | ||
| 313 | __u32 ctx_id; | ||
| 314 | __u32 ip_type; | ||
| 315 | __u32 ip_instance; | ||
| 316 | __u32 ring; | ||
| 317 | __u64 seq_no; | ||
| 318 | }; | ||
| 319 | |||
| 320 | struct drm_amdgpu_wait_fences_in { | ||
| 321 | /** This points to uint64_t * which points to fences */ | ||
| 322 | __u64 fences; | ||
| 323 | __u32 fence_count; | ||
| 324 | __u32 wait_all; | ||
| 325 | __u64 timeout_ns; | ||
| 326 | }; | ||
| 327 | |||
| 328 | struct drm_amdgpu_wait_fences_out { | ||
| 329 | __u32 status; | ||
| 330 | __u32 first_signaled; | ||
| 331 | }; | ||
| 332 | |||
| 333 | union drm_amdgpu_wait_fences { | ||
| 334 | struct drm_amdgpu_wait_fences_in in; | ||
| 335 | struct drm_amdgpu_wait_fences_out out; | ||
| 336 | }; | ||
| 337 | |||
| 310 | #define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 | 338 | #define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 |
| 311 | #define AMDGPU_GEM_OP_SET_PLACEMENT 1 | 339 | #define AMDGPU_GEM_OP_SET_PLACEMENT 1 |
| 312 | 340 | ||