diff options
Diffstat (limited to 'tools/include/uapi/drm')
| -rw-r--r-- | tools/include/uapi/drm/drm.h | 22 | ||||
| -rw-r--r-- | tools/include/uapi/drm/i915_drm.h | 51 |
2 files changed, 71 insertions, 2 deletions
diff --git a/tools/include/uapi/drm/drm.h b/tools/include/uapi/drm/drm.h index 101593ab10ac..97677cd6964d 100644 --- a/tools/include/uapi/drm/drm.h +++ b/tools/include/uapi/drm/drm.h | |||
| @@ -700,6 +700,7 @@ struct drm_prime_handle { | |||
| 700 | 700 | ||
| 701 | struct drm_syncobj_create { | 701 | struct drm_syncobj_create { |
| 702 | __u32 handle; | 702 | __u32 handle; |
| 703 | #define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) | ||
| 703 | __u32 flags; | 704 | __u32 flags; |
| 704 | }; | 705 | }; |
| 705 | 706 | ||
| @@ -718,6 +719,24 @@ struct drm_syncobj_handle { | |||
| 718 | __u32 pad; | 719 | __u32 pad; |
| 719 | }; | 720 | }; |
| 720 | 721 | ||
| 722 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) | ||
| 723 | #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) | ||
| 724 | struct drm_syncobj_wait { | ||
| 725 | __u64 handles; | ||
| 726 | /* absolute timeout */ | ||
| 727 | __s64 timeout_nsec; | ||
| 728 | __u32 count_handles; | ||
| 729 | __u32 flags; | ||
| 730 | __u32 first_signaled; /* only valid when not waiting all */ | ||
| 731 | __u32 pad; | ||
| 732 | }; | ||
| 733 | |||
| 734 | struct drm_syncobj_array { | ||
| 735 | __u64 handles; | ||
| 736 | __u32 count_handles; | ||
| 737 | __u32 pad; | ||
| 738 | }; | ||
| 739 | |||
| 721 | #if defined(__cplusplus) | 740 | #if defined(__cplusplus) |
| 722 | } | 741 | } |
| 723 | #endif | 742 | #endif |
| @@ -840,6 +859,9 @@ extern "C" { | |||
| 840 | #define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) | 859 | #define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) |
| 841 | #define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) | 860 | #define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) |
| 842 | #define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) | 861 | #define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) |
| 862 | #define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) | ||
| 863 | #define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) | ||
| 864 | #define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) | ||
| 843 | 865 | ||
| 844 | /** | 866 | /** |
| 845 | * Device specific ioctls should only be in their respective headers | 867 | * Device specific ioctls should only be in their respective headers |
diff --git a/tools/include/uapi/drm/i915_drm.h b/tools/include/uapi/drm/i915_drm.h index 7ccbd6a2bbe0..6598fb76d2c2 100644 --- a/tools/include/uapi/drm/i915_drm.h +++ b/tools/include/uapi/drm/i915_drm.h | |||
| @@ -260,6 +260,8 @@ typedef struct _drm_i915_sarea { | |||
| 260 | #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 | 260 | #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 |
| 261 | #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 | 261 | #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 |
| 262 | #define DRM_I915_PERF_OPEN 0x36 | 262 | #define DRM_I915_PERF_OPEN 0x36 |
| 263 | #define DRM_I915_PERF_ADD_CONFIG 0x37 | ||
| 264 | #define DRM_I915_PERF_REMOVE_CONFIG 0x38 | ||
| 263 | 265 | ||
| 264 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 266 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
| 265 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 267 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
| @@ -315,6 +317,8 @@ typedef struct _drm_i915_sarea { | |||
| 315 | #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) | 317 | #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) |
| 316 | #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) | 318 | #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) |
| 317 | #define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) | 319 | #define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) |
| 320 | #define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config) | ||
| 321 | #define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64) | ||
| 318 | 322 | ||
| 319 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 323 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
| 320 | * on the security mechanisms provided by hardware. | 324 | * on the security mechanisms provided by hardware. |
| @@ -431,6 +435,11 @@ typedef struct drm_i915_irq_wait { | |||
| 431 | */ | 435 | */ |
| 432 | #define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 | 436 | #define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 |
| 433 | 437 | ||
| 438 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports supplying an array of | ||
| 439 | * drm_i915_gem_exec_fence structures. See I915_EXEC_FENCE_ARRAY. | ||
| 440 | */ | ||
| 441 | #define I915_PARAM_HAS_EXEC_FENCE_ARRAY 49 | ||
| 442 | |||
| 434 | typedef struct drm_i915_getparam { | 443 | typedef struct drm_i915_getparam { |
| 435 | __s32 param; | 444 | __s32 param; |
| 436 | /* | 445 | /* |
| @@ -812,6 +821,17 @@ struct drm_i915_gem_exec_object2 { | |||
| 812 | __u64 rsvd2; | 821 | __u64 rsvd2; |
| 813 | }; | 822 | }; |
| 814 | 823 | ||
| 824 | struct drm_i915_gem_exec_fence { | ||
| 825 | /** | ||
| 826 | * User's handle for a drm_syncobj to wait on or signal. | ||
| 827 | */ | ||
| 828 | __u32 handle; | ||
| 829 | |||
| 830 | #define I915_EXEC_FENCE_WAIT (1<<0) | ||
| 831 | #define I915_EXEC_FENCE_SIGNAL (1<<1) | ||
| 832 | __u32 flags; | ||
| 833 | }; | ||
| 834 | |||
| 815 | struct drm_i915_gem_execbuffer2 { | 835 | struct drm_i915_gem_execbuffer2 { |
| 816 | /** | 836 | /** |
| 817 | * List of gem_exec_object2 structs | 837 | * List of gem_exec_object2 structs |
| @@ -826,7 +846,11 @@ struct drm_i915_gem_execbuffer2 { | |||
| 826 | __u32 DR1; | 846 | __u32 DR1; |
| 827 | __u32 DR4; | 847 | __u32 DR4; |
| 828 | __u32 num_cliprects; | 848 | __u32 num_cliprects; |
| 829 | /** This is a struct drm_clip_rect *cliprects */ | 849 | /** |
| 850 | * This is a struct drm_clip_rect *cliprects if I915_EXEC_FENCE_ARRAY | ||
| 851 | * is not set. If I915_EXEC_FENCE_ARRAY is set, then this is a | ||
| 852 | * struct drm_i915_gem_exec_fence *fences. | ||
| 853 | */ | ||
| 830 | __u64 cliprects_ptr; | 854 | __u64 cliprects_ptr; |
| 831 | #define I915_EXEC_RING_MASK (7<<0) | 855 | #define I915_EXEC_RING_MASK (7<<0) |
| 832 | #define I915_EXEC_DEFAULT (0<<0) | 856 | #define I915_EXEC_DEFAULT (0<<0) |
| @@ -927,7 +951,14 @@ struct drm_i915_gem_execbuffer2 { | |||
| 927 | * element). | 951 | * element). |
| 928 | */ | 952 | */ |
| 929 | #define I915_EXEC_BATCH_FIRST (1<<18) | 953 | #define I915_EXEC_BATCH_FIRST (1<<18) |
| 930 | #define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_BATCH_FIRST<<1)) | 954 | |
| 955 | /* Setting I915_FENCE_ARRAY implies that num_cliprects and cliprects_ptr | ||
| 956 | * define an array of i915_gem_exec_fence structures which specify a set of | ||
| 957 | * dma fences to wait upon or signal. | ||
| 958 | */ | ||
| 959 | #define I915_EXEC_FENCE_ARRAY (1<<19) | ||
| 960 | |||
| 961 | #define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1)) | ||
| 931 | 962 | ||
| 932 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) | 963 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
| 933 | #define i915_execbuffer2_set_context_id(eb2, context) \ | 964 | #define i915_execbuffer2_set_context_id(eb2, context) \ |
| @@ -1467,6 +1498,22 @@ enum drm_i915_perf_record_type { | |||
| 1467 | DRM_I915_PERF_RECORD_MAX /* non-ABI */ | 1498 | DRM_I915_PERF_RECORD_MAX /* non-ABI */ |
| 1468 | }; | 1499 | }; |
| 1469 | 1500 | ||
| 1501 | /** | ||
| 1502 | * Structure to upload perf dynamic configuration into the kernel. | ||
| 1503 | */ | ||
| 1504 | struct drm_i915_perf_oa_config { | ||
| 1505 | /** String formatted like "%08x-%04x-%04x-%04x-%012x" */ | ||
| 1506 | char uuid[36]; | ||
| 1507 | |||
| 1508 | __u32 n_mux_regs; | ||
| 1509 | __u32 n_boolean_regs; | ||
| 1510 | __u32 n_flex_regs; | ||
| 1511 | |||
| 1512 | __u64 __user mux_regs_ptr; | ||
| 1513 | __u64 __user boolean_regs_ptr; | ||
| 1514 | __u64 __user flex_regs_ptr; | ||
| 1515 | }; | ||
| 1516 | |||
| 1470 | #if defined(__cplusplus) | 1517 | #if defined(__cplusplus) |
| 1471 | } | 1518 | } |
| 1472 | #endif | 1519 | #endif |
