Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_I915_DRM_H_ |
| 20 | #define _UAPI_I915_DRM_H_ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 21 | #include "drm.h" |
| 22 | #ifdef __cplusplus |
Christopher Ferris | 48fe0ae | 2019-01-10 15:59:33 -0800 | [diff] [blame] | 23 | extern "C" { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 24 | #endif |
| 25 | #define I915_L3_PARITY_UEVENT "L3_PARITY_ERROR" |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 26 | #define I915_ERROR_UEVENT "ERROR" |
| 27 | #define I915_RESET_UEVENT "RESET" |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 28 | struct i915_user_extension { |
| 29 | __u64 next_extension; |
| 30 | __u32 name; |
| 31 | __u32 flags; |
| 32 | __u32 rsvd[4]; |
| 33 | }; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 34 | enum i915_mocs_table_index { |
| 35 | I915_MOCS_UNCACHED, |
| 36 | I915_MOCS_PTE, |
| 37 | I915_MOCS_CACHED, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 38 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 39 | enum drm_i915_gem_engine_class { |
| 40 | I915_ENGINE_CLASS_RENDER = 0, |
| 41 | I915_ENGINE_CLASS_COPY = 1, |
| 42 | I915_ENGINE_CLASS_VIDEO = 2, |
| 43 | I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 44 | I915_ENGINE_CLASS_COMPUTE = 4, |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 45 | I915_ENGINE_CLASS_INVALID = - 1 |
| 46 | }; |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 47 | struct i915_engine_class_instance { |
| 48 | __u16 engine_class; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 49 | #define I915_ENGINE_CLASS_INVALID_NONE - 1 |
| 50 | #define I915_ENGINE_CLASS_INVALID_VIRTUAL - 2 |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 51 | __u16 engine_instance; |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 52 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 53 | enum drm_i915_pmu_engine_sample { |
| 54 | I915_SAMPLE_BUSY = 0, |
| 55 | I915_SAMPLE_WAIT = 1, |
| 56 | I915_SAMPLE_SEMA = 2 |
| 57 | }; |
| 58 | #define I915_PMU_SAMPLE_BITS (4) |
| 59 | #define I915_PMU_SAMPLE_MASK (0xf) |
| 60 | #define I915_PMU_SAMPLE_INSTANCE_BITS (8) |
| 61 | #define I915_PMU_CLASS_SHIFT (I915_PMU_SAMPLE_BITS + I915_PMU_SAMPLE_INSTANCE_BITS) |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 62 | #define __I915_PMU_ENGINE(__linux_class,instance,sample) ((__linux_class) << I915_PMU_CLASS_SHIFT | (instance) << I915_PMU_SAMPLE_BITS | (sample)) |
| 63 | #define I915_PMU_ENGINE_BUSY(__linux_class,instance) __I915_PMU_ENGINE(__linux_class, instance, I915_SAMPLE_BUSY) |
| 64 | #define I915_PMU_ENGINE_WAIT(__linux_class,instance) __I915_PMU_ENGINE(__linux_class, instance, I915_SAMPLE_WAIT) |
| 65 | #define I915_PMU_ENGINE_SEMA(__linux_class,instance) __I915_PMU_ENGINE(__linux_class, instance, I915_SAMPLE_SEMA) |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 66 | #define __I915_PMU_GT_SHIFT (60) |
| 67 | #define ___I915_PMU_OTHER(gt,x) (((__u64) __I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) | ((__u64) (gt) << __I915_PMU_GT_SHIFT)) |
| 68 | #define __I915_PMU_OTHER(x) ___I915_PMU_OTHER(0, x) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 69 | #define I915_PMU_ACTUAL_FREQUENCY __I915_PMU_OTHER(0) |
| 70 | #define I915_PMU_REQUESTED_FREQUENCY __I915_PMU_OTHER(1) |
| 71 | #define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2) |
| 72 | #define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 73 | #define I915_PMU_SOFTWARE_GT_AWAKE_TIME __I915_PMU_OTHER(4) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 74 | #define I915_PMU_LAST I915_PMU_RC6_RESIDENCY |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 75 | #define __I915_PMU_ACTUAL_FREQUENCY(gt) ___I915_PMU_OTHER(gt, 0) |
| 76 | #define __I915_PMU_REQUESTED_FREQUENCY(gt) ___I915_PMU_OTHER(gt, 1) |
| 77 | #define __I915_PMU_INTERRUPTS(gt) ___I915_PMU_OTHER(gt, 2) |
| 78 | #define __I915_PMU_RC6_RESIDENCY(gt) ___I915_PMU_OTHER(gt, 3) |
| 79 | #define __I915_PMU_SOFTWARE_GT_AWAKE_TIME(gt) ___I915_PMU_OTHER(gt, 4) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 80 | #define I915_NR_TEX_REGIONS 255 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | #define I915_LOG_MIN_TEX_REGION_SIZE 14 |
| 82 | typedef struct _drm_i915_init { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 83 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | I915_INIT_DMA = 0x01, |
| 85 | I915_CLEANUP_DMA = 0x02, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 86 | I915_RESUME_DMA = 0x03 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 87 | } func; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 88 | unsigned int mmio_offset; |
| 89 | int sarea_priv_offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 | unsigned int ring_start; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 91 | unsigned int ring_end; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 92 | unsigned int ring_size; |
| 93 | unsigned int front_offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 94 | unsigned int back_offset; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 95 | unsigned int depth_offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 96 | unsigned int w; |
| 97 | unsigned int h; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 98 | unsigned int pitch; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 99 | unsigned int pitch_bits; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | unsigned int back_pitch; |
| 101 | unsigned int depth_pitch; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 102 | unsigned int cpp; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 103 | unsigned int chipset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | } drm_i915_init_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 105 | typedef struct _drm_i915_sarea { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 106 | struct drm_tex_region texList[I915_NR_TEX_REGIONS + 1]; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 107 | int last_upload; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 108 | int last_enqueue; |
| 109 | int last_dispatch; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 | int ctxOwner; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 111 | int texAge; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 112 | int pf_enabled; |
| 113 | int pf_active; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 114 | int pf_current_page; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 115 | int perf_boxes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 | int width, height; |
| 117 | drm_handle_t front_handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 118 | int front_offset; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 119 | int front_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | drm_handle_t back_handle; |
| 121 | int back_offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | int back_size; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 123 | drm_handle_t depth_handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 124 | int depth_offset; |
| 125 | int depth_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 126 | drm_handle_t tex_handle; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 127 | int tex_offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 128 | int tex_size; |
| 129 | int log_tex_granularity; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 130 | int pitch; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 131 | int rotation; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | int rotated_offset; |
| 133 | int rotated_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 134 | int rotated_pitch; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 135 | int virtualX, virtualY; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 136 | unsigned int front_tiled; |
| 137 | unsigned int back_tiled; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 138 | unsigned int depth_tiled; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 139 | unsigned int rotated_tiled; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 | unsigned int rotated2_tiled; |
| 141 | int pipeA_x; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 142 | int pipeA_y; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 143 | int pipeA_w; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 144 | int pipeA_h; |
| 145 | int pipeB_x; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 146 | int pipeB_y; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 147 | int pipeB_w; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 | int pipeB_h; |
| 149 | drm_handle_t unused_handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 150 | __u32 unused1, unused2, unused3; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 151 | __u32 front_bo_handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 152 | __u32 back_bo_handle; |
| 153 | __u32 unused_bo_handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 154 | __u32 depth_bo_handle; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 155 | } drm_i915_sarea_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | #define planeA_x pipeA_x |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 157 | #define planeA_y pipeA_y |
| 158 | #define planeA_w pipeA_w |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 159 | #define planeA_h pipeA_h |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | #define planeB_x pipeB_x |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 161 | #define planeB_y pipeB_y |
| 162 | #define planeB_w pipeB_w |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 163 | #define planeB_h pipeB_h |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | #define I915_BOX_RING_EMPTY 0x1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 165 | #define I915_BOX_FLIP 0x2 |
| 166 | #define I915_BOX_WAIT 0x4 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 167 | #define I915_BOX_TEXTURE_LOAD 0x8 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 168 | #define I915_BOX_LOST_CONTEXT 0x10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 169 | #define DRM_I915_INIT 0x00 |
| 170 | #define DRM_I915_FLUSH 0x01 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 171 | #define DRM_I915_FLIP 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 172 | #define DRM_I915_BATCHBUFFER 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 173 | #define DRM_I915_IRQ_EMIT 0x04 |
| 174 | #define DRM_I915_IRQ_WAIT 0x05 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 175 | #define DRM_I915_GETPARAM 0x06 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 176 | #define DRM_I915_SETPARAM 0x07 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 177 | #define DRM_I915_ALLOC 0x08 |
| 178 | #define DRM_I915_FREE 0x09 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 179 | #define DRM_I915_INIT_HEAP 0x0a |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 180 | #define DRM_I915_CMDBUFFER 0x0b |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 181 | #define DRM_I915_DESTROY_HEAP 0x0c |
| 182 | #define DRM_I915_SET_VBLANK_PIPE 0x0d |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 183 | #define DRM_I915_GET_VBLANK_PIPE 0x0e |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 184 | #define DRM_I915_VBLANK_SWAP 0x0f |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 185 | #define DRM_I915_HWS_ADDR 0x11 |
| 186 | #define DRM_I915_GEM_INIT 0x13 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 187 | #define DRM_I915_GEM_EXECBUFFER 0x14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | #define DRM_I915_GEM_PIN 0x15 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 189 | #define DRM_I915_GEM_UNPIN 0x16 |
| 190 | #define DRM_I915_GEM_BUSY 0x17 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 191 | #define DRM_I915_GEM_THROTTLE 0x18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 192 | #define DRM_I915_GEM_ENTERVT 0x19 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 193 | #define DRM_I915_GEM_LEAVEVT 0x1a |
| 194 | #define DRM_I915_GEM_CREATE 0x1b |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 195 | #define DRM_I915_GEM_PREAD 0x1c |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 196 | #define DRM_I915_GEM_PWRITE 0x1d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 197 | #define DRM_I915_GEM_MMAP 0x1e |
| 198 | #define DRM_I915_GEM_SET_DOMAIN 0x1f |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 199 | #define DRM_I915_GEM_SW_FINISH 0x20 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 200 | #define DRM_I915_GEM_SET_TILING 0x21 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 201 | #define DRM_I915_GEM_GET_TILING 0x22 |
| 202 | #define DRM_I915_GEM_GET_APERTURE 0x23 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 203 | #define DRM_I915_GEM_MMAP_GTT 0x24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 204 | #define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 205 | #define DRM_I915_GEM_MADVISE 0x26 |
| 206 | #define DRM_I915_OVERLAY_PUT_IMAGE 0x27 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 207 | #define DRM_I915_OVERLAY_ATTRS 0x28 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 208 | #define DRM_I915_GEM_EXECBUFFER2 0x29 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 209 | #define DRM_I915_GEM_EXECBUFFER2_WR DRM_I915_GEM_EXECBUFFER2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 210 | #define DRM_I915_GET_SPRITE_COLORKEY 0x2a |
| 211 | #define DRM_I915_SET_SPRITE_COLORKEY 0x2b |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 212 | #define DRM_I915_GEM_WAIT 0x2c |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 213 | #define DRM_I915_GEM_CONTEXT_CREATE 0x2d |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 214 | #define DRM_I915_GEM_CONTEXT_DESTROY 0x2e |
| 215 | #define DRM_I915_GEM_SET_CACHING 0x2f |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 216 | #define DRM_I915_GEM_GET_CACHING 0x30 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 217 | #define DRM_I915_REG_READ 0x31 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 218 | #define DRM_I915_GET_RESET_STATS 0x32 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 219 | #define DRM_I915_GEM_USERPTR 0x33 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 220 | #define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 221 | #define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 222 | #define DRM_I915_PERF_OPEN 0x36 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 223 | #define DRM_I915_PERF_ADD_CONFIG 0x37 |
| 224 | #define DRM_I915_PERF_REMOVE_CONFIG 0x38 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 225 | #define DRM_I915_QUERY 0x39 |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 226 | #define DRM_I915_GEM_VM_CREATE 0x3a |
| 227 | #define DRM_I915_GEM_VM_DESTROY 0x3b |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 228 | #define DRM_I915_GEM_CREATE_EXT 0x3c |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 229 | #define DRM_IOCTL_I915_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
| 230 | #define DRM_IOCTL_I915_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLUSH) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 231 | #define DRM_IOCTL_I915_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLIP) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 232 | #define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 233 | #define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 234 | #define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 235 | #define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 236 | #define DRM_IOCTL_I915_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 237 | #define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 238 | #define DRM_IOCTL_I915_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 239 | #define DRM_IOCTL_I915_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 240 | #define DRM_IOCTL_I915_CMDBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t) |
| 241 | #define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t) |
| 242 | #define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 243 | #define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 244 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 245 | #define DRM_IOCTL_I915_HWS_ADDR DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init) |
| 246 | #define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 247 | #define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 248 | #define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 249 | #define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2_WR, struct drm_i915_gem_execbuffer2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 250 | #define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin) |
| 251 | #define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 252 | #define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 253 | #define DRM_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHING, struct drm_i915_gem_caching) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 254 | #define DRM_IOCTL_I915_GEM_GET_CACHING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHING, struct drm_i915_gem_caching) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 255 | #define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 256 | #define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 257 | #define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 258 | #define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create) |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 259 | #define DRM_IOCTL_I915_GEM_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE_EXT, struct drm_i915_gem_create_ext) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 260 | #define DRM_IOCTL_I915_GEM_PREAD DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 261 | #define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 262 | #define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 263 | #define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt) |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 264 | #define DRM_IOCTL_I915_GEM_MMAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_offset) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 265 | #define DRM_IOCTL_I915_GEM_SET_DOMAIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 266 | #define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 267 | #define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) |
| 268 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) |
| 269 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 270 | #define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 271 | #define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 272 | #define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image) |
| 273 | #define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 274 | #define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 275 | #define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 276 | #define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 277 | #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 278 | #define DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create_ext) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 279 | #define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 280 | #define DRM_IOCTL_I915_REG_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) |
| 281 | #define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) |
| 282 | #define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 283 | #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 284 | #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 285 | #define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 286 | #define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config) |
| 287 | #define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 288 | #define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 289 | #define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control) |
| 290 | #define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 291 | typedef struct drm_i915_batchbuffer { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 292 | int start; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 293 | int used; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 294 | int DR1; |
| 295 | int DR4; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 296 | int num_cliprects; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 297 | struct drm_clip_rect * cliprects; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 298 | } drm_i915_batchbuffer_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 299 | typedef struct _drm_i915_cmdbuffer { |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 300 | char * buf; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 301 | int sz; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 302 | int DR1; |
| 303 | int DR4; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 304 | int num_cliprects; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 305 | struct drm_clip_rect * cliprects; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 306 | } drm_i915_cmdbuffer_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 307 | typedef struct drm_i915_irq_emit { |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 308 | int * irq_seq; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 309 | } drm_i915_irq_emit_t; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 310 | typedef struct drm_i915_irq_wait { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 311 | int irq_seq; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 312 | } drm_i915_irq_wait_t; |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 313 | #define I915_GEM_PPGTT_NONE 0 |
| 314 | #define I915_GEM_PPGTT_ALIASING 1 |
| 315 | #define I915_GEM_PPGTT_FULL 2 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 316 | #define I915_PARAM_IRQ_ACTIVE 1 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 317 | #define I915_PARAM_ALLOW_BATCHBUFFER 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 318 | #define I915_PARAM_LAST_DISPATCH 3 |
| 319 | #define I915_PARAM_CHIPSET_ID 4 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 320 | #define I915_PARAM_HAS_GEM 5 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 321 | #define I915_PARAM_NUM_FENCES_AVAIL 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 322 | #define I915_PARAM_HAS_OVERLAY 7 |
| 323 | #define I915_PARAM_HAS_PAGEFLIPPING 8 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 324 | #define I915_PARAM_HAS_EXECBUF2 9 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 325 | #define I915_PARAM_HAS_BSD 10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 326 | #define I915_PARAM_HAS_BLT 11 |
| 327 | #define I915_PARAM_HAS_RELAXED_FENCING 12 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 328 | #define I915_PARAM_HAS_COHERENT_RINGS 13 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 329 | #define I915_PARAM_HAS_EXEC_CONSTANTS 14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 330 | #define I915_PARAM_HAS_RELAXED_DELTA 15 |
| 331 | #define I915_PARAM_HAS_GEN7_SOL_RESET 16 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 332 | #define I915_PARAM_HAS_LLC 17 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 333 | #define I915_PARAM_HAS_ALIASING_PPGTT 18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 334 | #define I915_PARAM_HAS_WAIT_TIMEOUT 19 |
| 335 | #define I915_PARAM_HAS_SEMAPHORES 20 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 336 | #define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 337 | #define I915_PARAM_HAS_VEBOX 22 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 338 | #define I915_PARAM_HAS_SECURE_BATCHES 23 |
| 339 | #define I915_PARAM_HAS_PINNED_BATCHES 24 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 340 | #define I915_PARAM_HAS_EXEC_NO_RELOC 25 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 341 | #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 |
| 342 | #define I915_PARAM_HAS_WT 27 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 343 | #define I915_PARAM_CMD_PARSER_VERSION 28 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 344 | #define I915_PARAM_HAS_COHERENT_PHYS_GTT 29 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 345 | #define I915_PARAM_MMAP_VERSION 30 |
| 346 | #define I915_PARAM_HAS_BSD2 31 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 347 | #define I915_PARAM_REVISION 32 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 348 | #define I915_PARAM_SUBSLICE_TOTAL 33 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 349 | #define I915_PARAM_EU_TOTAL 34 |
| 350 | #define I915_PARAM_HAS_GPU_RESET 35 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 351 | #define I915_PARAM_HAS_RESOURCE_STREAMER 36 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 352 | #define I915_PARAM_HAS_EXEC_SOFTPIN 37 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 353 | #define I915_PARAM_HAS_POOLED_EU 38 |
| 354 | #define I915_PARAM_MIN_EU_IN_POOL 39 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 355 | #define I915_PARAM_MMAP_GTT_VERSION 40 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 356 | #define I915_PARAM_HAS_SCHEDULER 41 |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 357 | #define I915_SCHEDULER_CAP_ENABLED (1ul << 0) |
| 358 | #define I915_SCHEDULER_CAP_PRIORITY (1ul << 1) |
| 359 | #define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 360 | #define I915_SCHEDULER_CAP_SEMAPHORES (1ul << 3) |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 361 | #define I915_SCHEDULER_CAP_ENGINE_BUSY_STATS (1ul << 4) |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 362 | #define I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP (1ul << 5) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 363 | #define I915_PARAM_HUC_STATUS 42 |
| 364 | #define I915_PARAM_HAS_EXEC_ASYNC 43 |
| 365 | #define I915_PARAM_HAS_EXEC_FENCE 44 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 366 | #define I915_PARAM_HAS_EXEC_CAPTURE 45 |
| 367 | #define I915_PARAM_SLICE_MASK 46 |
| 368 | #define I915_PARAM_SUBSLICE_MASK 47 |
| 369 | #define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 |
| 370 | #define I915_PARAM_HAS_EXEC_FENCE_ARRAY 49 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 371 | #define I915_PARAM_HAS_CONTEXT_ISOLATION 50 |
| 372 | #define I915_PARAM_CS_TIMESTAMP_FREQUENCY 51 |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 373 | #define I915_PARAM_MMAP_GTT_COHERENT 52 |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 374 | #define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53 |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 375 | #define I915_PARAM_PERF_REVISION 54 |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 376 | #define I915_PARAM_HAS_EXEC_TIMELINE_FENCES 55 |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 377 | #define I915_PARAM_HAS_USERPTR_PROBE 56 |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 378 | #define I915_PARAM_OA_TIMESTAMP_FREQUENCY 57 |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 379 | #define I915_PARAM_PXP_STATUS 58 |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 380 | struct drm_i915_getparam { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 381 | __s32 param; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 382 | int * value; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 383 | }; |
| 384 | typedef struct drm_i915_getparam drm_i915_getparam_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 385 | #define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 |
| 386 | #define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 |
| 387 | #define I915_SETPARAM_ALLOW_BATCHBUFFER 3 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 388 | #define I915_SETPARAM_NUM_USED_FENCES 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 389 | typedef struct drm_i915_setparam { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 390 | int param; |
| 391 | int value; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 392 | } drm_i915_setparam_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 393 | #define I915_MEM_REGION_AGP 1 |
| 394 | typedef struct drm_i915_mem_alloc { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 395 | int region; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 396 | int alignment; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 397 | int size; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 398 | int * region_offset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 399 | } drm_i915_mem_alloc_t; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 400 | typedef struct drm_i915_mem_free { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 401 | int region; |
| 402 | int region_offset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 403 | } drm_i915_mem_free_t; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 404 | typedef struct drm_i915_mem_init_heap { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 405 | int region; |
| 406 | int size; |
| 407 | int start; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 408 | } drm_i915_mem_init_heap_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 409 | typedef struct drm_i915_mem_destroy_heap { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 410 | int region; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | } drm_i915_mem_destroy_heap_t; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 412 | #define DRM_I915_VBLANK_PIPE_A 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 413 | #define DRM_I915_VBLANK_PIPE_B 2 |
| 414 | typedef struct drm_i915_vblank_pipe { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 415 | int pipe; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 416 | } drm_i915_vblank_pipe_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 417 | typedef struct drm_i915_vblank_swap { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 418 | drm_drawable_t drawable; |
| 419 | enum drm_vblank_seq_type seqtype; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 420 | unsigned int sequence; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 421 | } drm_i915_vblank_swap_t; |
| 422 | typedef struct drm_i915_hws_addr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 423 | __u64 addr; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 424 | } drm_i915_hws_addr_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 425 | struct drm_i915_gem_init { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 426 | __u64 gtt_start; |
| 427 | __u64 gtt_end; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 428 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 429 | struct drm_i915_gem_create { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 430 | __u64 size; |
| 431 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 432 | __u32 pad; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 433 | }; |
| 434 | struct drm_i915_gem_pread { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 435 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 436 | __u32 pad; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 437 | __u64 offset; |
| 438 | __u64 size; |
| 439 | __u64 data_ptr; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 440 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 441 | struct drm_i915_gem_pwrite { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 442 | __u32 handle; |
| 443 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 444 | __u64 offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 445 | __u64 size; |
| 446 | __u64 data_ptr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 447 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 448 | struct drm_i915_gem_mmap { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 449 | __u32 handle; |
| 450 | __u32 pad; |
| 451 | __u64 offset; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 452 | __u64 size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 453 | __u64 addr_ptr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 454 | __u64 flags; |
| 455 | #define I915_MMAP_WC 0x1 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 456 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 457 | struct drm_i915_gem_mmap_gtt { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 458 | __u32 handle; |
| 459 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 460 | __u64 offset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 461 | }; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 462 | struct drm_i915_gem_mmap_offset { |
| 463 | __u32 handle; |
| 464 | __u32 pad; |
| 465 | __u64 offset; |
| 466 | __u64 flags; |
| 467 | #define I915_MMAP_OFFSET_GTT 0 |
| 468 | #define I915_MMAP_OFFSET_WC 1 |
| 469 | #define I915_MMAP_OFFSET_WB 2 |
| 470 | #define I915_MMAP_OFFSET_UC 3 |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 471 | #define I915_MMAP_OFFSET_FIXED 4 |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 472 | __u64 extensions; |
| 473 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 474 | struct drm_i915_gem_set_domain { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 475 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 476 | __u32 read_domains; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 477 | __u32 write_domain; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 478 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 479 | struct drm_i915_gem_sw_finish { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 480 | __u32 handle; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 481 | }; |
| 482 | struct drm_i915_gem_relocation_entry { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 483 | __u32 target_handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 484 | __u32 delta; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 485 | __u64 offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 486 | __u64 presumed_offset; |
| 487 | __u32 read_domains; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 488 | __u32 write_domain; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 489 | }; |
| 490 | #define I915_GEM_DOMAIN_CPU 0x00000001 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 491 | #define I915_GEM_DOMAIN_RENDER 0x00000002 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 492 | #define I915_GEM_DOMAIN_SAMPLER 0x00000004 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 493 | #define I915_GEM_DOMAIN_COMMAND 0x00000008 |
| 494 | #define I915_GEM_DOMAIN_INSTRUCTION 0x00000010 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 495 | #define I915_GEM_DOMAIN_VERTEX 0x00000020 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 496 | #define I915_GEM_DOMAIN_GTT 0x00000040 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 497 | #define I915_GEM_DOMAIN_WC 0x00000080 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 498 | struct drm_i915_gem_exec_object { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 499 | __u32 handle; |
| 500 | __u32 relocation_count; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 501 | __u64 relocs_ptr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 502 | __u64 alignment; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 503 | __u64 offset; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 504 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 505 | struct drm_i915_gem_execbuffer { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 506 | __u64 buffers_ptr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 507 | __u32 buffer_count; |
| 508 | __u32 batch_start_offset; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 509 | __u32 batch_len; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 510 | __u32 DR1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 511 | __u32 DR4; |
| 512 | __u32 num_cliprects; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 513 | __u64 cliprects_ptr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 514 | }; |
| 515 | struct drm_i915_gem_exec_object2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 516 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 517 | __u32 relocation_count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 518 | __u64 relocs_ptr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 519 | __u64 alignment; |
| 520 | __u64 offset; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 521 | #define EXEC_OBJECT_NEEDS_FENCE (1 << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 522 | #define EXEC_OBJECT_NEEDS_GTT (1 << 1) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 523 | #define EXEC_OBJECT_WRITE (1 << 2) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 524 | #define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1 << 3) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 525 | #define EXEC_OBJECT_PINNED (1 << 4) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 526 | #define EXEC_OBJECT_PAD_TO_SIZE (1 << 5) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 527 | #define EXEC_OBJECT_ASYNC (1 << 6) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 528 | #define EXEC_OBJECT_CAPTURE (1 << 7) |
| 529 | #define __EXEC_OBJECT_UNKNOWN_FLAGS - (EXEC_OBJECT_CAPTURE << 1) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 530 | __u64 flags; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 531 | union { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 532 | __u64 rsvd1; |
| 533 | __u64 pad_to_size; |
| 534 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 535 | __u64 rsvd2; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 536 | }; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 537 | struct drm_i915_gem_exec_fence { |
| 538 | __u32 handle; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 539 | __u32 flags; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 540 | #define I915_EXEC_FENCE_WAIT (1 << 0) |
| 541 | #define I915_EXEC_FENCE_SIGNAL (1 << 1) |
| 542 | #define __I915_EXEC_FENCE_UNKNOWN_FLAGS (- (I915_EXEC_FENCE_SIGNAL << 1)) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 543 | }; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 544 | struct drm_i915_gem_execbuffer_ext_timeline_fences { |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 545 | #define DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES 0 |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 546 | struct i915_user_extension base; |
| 547 | __u64 fence_count; |
| 548 | __u64 handles_ptr; |
| 549 | __u64 values_ptr; |
| 550 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 551 | struct drm_i915_gem_execbuffer2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 552 | __u64 buffers_ptr; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 553 | __u32 buffer_count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 554 | __u32 batch_start_offset; |
| 555 | __u32 batch_len; |
| 556 | __u32 DR1; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 557 | __u32 DR4; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 558 | __u32 num_cliprects; |
| 559 | __u64 cliprects_ptr; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 560 | __u64 flags; |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 561 | #define I915_EXEC_RING_MASK (0x3f) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 562 | #define I915_EXEC_DEFAULT (0 << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 563 | #define I915_EXEC_RENDER (1 << 0) |
| 564 | #define I915_EXEC_BSD (2 << 0) |
| 565 | #define I915_EXEC_BLT (3 << 0) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 566 | #define I915_EXEC_VEBOX (4 << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 567 | #define I915_EXEC_CONSTANTS_MASK (3 << 6) |
| 568 | #define I915_EXEC_CONSTANTS_REL_GENERAL (0 << 6) |
| 569 | #define I915_EXEC_CONSTANTS_ABSOLUTE (1 << 6) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 570 | #define I915_EXEC_CONSTANTS_REL_SURFACE (2 << 6) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 571 | #define I915_EXEC_GEN7_SOL_RESET (1 << 8) |
| 572 | #define I915_EXEC_SECURE (1 << 9) |
| 573 | #define I915_EXEC_IS_PINNED (1 << 10) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 574 | #define I915_EXEC_NO_RELOC (1 << 11) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 575 | #define I915_EXEC_HANDLE_LUT (1 << 12) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 576 | #define I915_EXEC_BSD_SHIFT (13) |
| 577 | #define I915_EXEC_BSD_MASK (3 << I915_EXEC_BSD_SHIFT) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 578 | #define I915_EXEC_BSD_DEFAULT (0 << I915_EXEC_BSD_SHIFT) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 579 | #define I915_EXEC_BSD_RING1 (1 << I915_EXEC_BSD_SHIFT) |
| 580 | #define I915_EXEC_BSD_RING2 (2 << I915_EXEC_BSD_SHIFT) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 581 | #define I915_EXEC_RESOURCE_STREAMER (1 << 15) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 582 | #define I915_EXEC_FENCE_IN (1 << 16) |
| 583 | #define I915_EXEC_FENCE_OUT (1 << 17) |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 584 | #define I915_EXEC_BATCH_FIRST (1 << 18) |
| 585 | #define I915_EXEC_FENCE_ARRAY (1 << 19) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 586 | #define I915_EXEC_FENCE_SUBMIT (1 << 20) |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 587 | #define I915_EXEC_USE_EXTENSIONS (1 << 21) |
| 588 | #define __I915_EXEC_UNKNOWN_FLAGS (- (I915_EXEC_USE_EXTENSIONS << 1)) |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 589 | __u64 rsvd1; |
| 590 | __u64 rsvd2; |
| 591 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 592 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 593 | #define i915_execbuffer2_set_context_id(eb2,context) (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK |
| 594 | #define i915_execbuffer2_get_context_id(eb2) ((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 595 | struct drm_i915_gem_pin { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 596 | __u32 handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 597 | __u32 pad; |
| 598 | __u64 alignment; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 599 | __u64 offset; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 600 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 601 | struct drm_i915_gem_unpin { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 602 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 603 | __u32 pad; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 604 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 605 | struct drm_i915_gem_busy { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 606 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 607 | __u32 busy; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 608 | }; |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 609 | struct drm_i915_gem_caching { |
| 610 | __u32 handle; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 611 | #define I915_CACHING_NONE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 612 | #define I915_CACHING_CACHED 1 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 613 | #define I915_CACHING_DISPLAY 2 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 614 | __u32 caching; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 615 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 616 | #define I915_TILING_NONE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 617 | #define I915_TILING_X 1 |
| 618 | #define I915_TILING_Y 2 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 619 | #define I915_TILING_LAST I915_TILING_Y |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 620 | #define I915_BIT_6_SWIZZLE_NONE 0 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 621 | #define I915_BIT_6_SWIZZLE_9 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 622 | #define I915_BIT_6_SWIZZLE_9_10 2 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 623 | #define I915_BIT_6_SWIZZLE_9_11 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 624 | #define I915_BIT_6_SWIZZLE_9_10_11 4 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 625 | #define I915_BIT_6_SWIZZLE_UNKNOWN 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 626 | #define I915_BIT_6_SWIZZLE_9_17 6 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 627 | #define I915_BIT_6_SWIZZLE_9_10_17 7 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 628 | struct drm_i915_gem_set_tiling { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 629 | __u32 handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 630 | __u32 tiling_mode; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 631 | __u32 stride; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 632 | __u32 swizzle_mode; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 633 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 634 | struct drm_i915_gem_get_tiling { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 635 | __u32 handle; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 636 | __u32 tiling_mode; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 637 | __u32 swizzle_mode; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 638 | __u32 phys_swizzle_mode; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 639 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 640 | struct drm_i915_gem_get_aperture { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 641 | __u64 aper_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 642 | __u64 aper_available_size; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 643 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 644 | struct drm_i915_get_pipe_from_crtc_id { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 645 | __u32 crtc_id; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 646 | __u32 pipe; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 647 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 648 | #define I915_MADV_WILLNEED 0 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 649 | #define I915_MADV_DONTNEED 1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 650 | #define __I915_MADV_PURGED 2 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 651 | struct drm_i915_gem_madvise { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 652 | __u32 handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 653 | __u32 madv; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 654 | __u32 retained; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 655 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 656 | #define I915_OVERLAY_TYPE_MASK 0xff |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 657 | #define I915_OVERLAY_YUV_PLANAR 0x01 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 658 | #define I915_OVERLAY_YUV_PACKED 0x02 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 659 | #define I915_OVERLAY_RGB 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 660 | #define I915_OVERLAY_DEPTH_MASK 0xff00 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 661 | #define I915_OVERLAY_RGB24 0x1000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 662 | #define I915_OVERLAY_RGB16 0x2000 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 663 | #define I915_OVERLAY_RGB15 0x3000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 664 | #define I915_OVERLAY_YUV422 0x0100 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 665 | #define I915_OVERLAY_YUV411 0x0200 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 666 | #define I915_OVERLAY_YUV420 0x0300 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 667 | #define I915_OVERLAY_YUV410 0x0400 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 668 | #define I915_OVERLAY_SWAP_MASK 0xff0000 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 669 | #define I915_OVERLAY_NO_SWAP 0x000000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 670 | #define I915_OVERLAY_UV_SWAP 0x010000 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 671 | #define I915_OVERLAY_Y_SWAP 0x020000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 672 | #define I915_OVERLAY_Y_AND_UV_SWAP 0x030000 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 673 | #define I915_OVERLAY_FLAGS_MASK 0xff000000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 674 | #define I915_OVERLAY_ENABLE 0x01000000 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 675 | struct drm_intel_overlay_put_image { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 676 | __u32 flags; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 677 | __u32 bo_handle; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 678 | __u16 stride_Y; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 679 | __u16 stride_UV; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 680 | __u32 offset_Y; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 681 | __u32 offset_U; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 682 | __u32 offset_V; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 683 | __u16 src_width; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 684 | __u16 src_height; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 685 | __u16 src_scan_width; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 686 | __u16 src_scan_height; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 687 | __u32 crtc_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 688 | __u16 dst_x; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 689 | __u16 dst_y; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 690 | __u16 dst_width; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 691 | __u16 dst_height; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 692 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 693 | #define I915_OVERLAY_UPDATE_ATTRS (1 << 0) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 694 | #define I915_OVERLAY_UPDATE_GAMMA (1 << 1) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 695 | #define I915_OVERLAY_DISABLE_DEST_COLORKEY (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 696 | struct drm_intel_overlay_attrs { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 697 | __u32 flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 698 | __u32 color_key; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 699 | __s32 brightness; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 700 | __u32 contrast; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 701 | __u32 saturation; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 702 | __u32 gamma0; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 703 | __u32 gamma1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 704 | __u32 gamma2; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 705 | __u32 gamma3; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 706 | __u32 gamma4; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 707 | __u32 gamma5; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 708 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 709 | #define I915_SET_COLORKEY_NONE (1 << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 710 | #define I915_SET_COLORKEY_DESTINATION (1 << 1) |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 711 | #define I915_SET_COLORKEY_SOURCE (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 712 | struct drm_intel_sprite_colorkey { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 713 | __u32 plane_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 714 | __u32 min_value; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 715 | __u32 channel_mask; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 716 | __u32 max_value; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 717 | __u32 flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 718 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 719 | struct drm_i915_gem_wait { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 720 | __u32 bo_handle; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 721 | __u32 flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 722 | __s64 timeout_ns; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 723 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 724 | struct drm_i915_gem_context_create { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 725 | __u32 ctx_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 726 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 727 | }; |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 728 | struct drm_i915_gem_context_create_ext { |
| 729 | __u32 ctx_id; |
| 730 | __u32 flags; |
| 731 | #define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 732 | #define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1) |
| 733 | #define I915_CONTEXT_CREATE_FLAGS_UNKNOWN (- (I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1)) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 734 | __u64 extensions; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 735 | #define I915_CONTEXT_CREATE_EXT_SETPARAM 0 |
| 736 | #define I915_CONTEXT_CREATE_EXT_CLONE 1 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 737 | }; |
| 738 | struct drm_i915_gem_context_param { |
| 739 | __u32 ctx_id; |
| 740 | __u32 size; |
| 741 | __u64 param; |
| 742 | #define I915_CONTEXT_PARAM_BAN_PERIOD 0x1 |
| 743 | #define I915_CONTEXT_PARAM_NO_ZEROMAP 0x2 |
| 744 | #define I915_CONTEXT_PARAM_GTT_SIZE 0x3 |
| 745 | #define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4 |
| 746 | #define I915_CONTEXT_PARAM_BANNABLE 0x5 |
| 747 | #define I915_CONTEXT_PARAM_PRIORITY 0x6 |
| 748 | #define I915_CONTEXT_MAX_USER_PRIORITY 1023 |
| 749 | #define I915_CONTEXT_DEFAULT_PRIORITY 0 |
| 750 | #define I915_CONTEXT_MIN_USER_PRIORITY - 1023 |
| 751 | #define I915_CONTEXT_PARAM_SSEU 0x7 |
| 752 | #define I915_CONTEXT_PARAM_RECOVERABLE 0x8 |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 753 | #define I915_CONTEXT_PARAM_VM 0x9 |
| 754 | #define I915_CONTEXT_PARAM_ENGINES 0xa |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 755 | #define I915_CONTEXT_PARAM_PERSISTENCE 0xb |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 756 | #define I915_CONTEXT_PARAM_RINGSIZE 0xc |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 757 | #define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 758 | __u64 value; |
| 759 | }; |
| 760 | struct drm_i915_gem_context_param_sseu { |
| 761 | struct i915_engine_class_instance engine; |
| 762 | __u32 flags; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 763 | #define I915_CONTEXT_SSEU_FLAG_ENGINE_INDEX (1u << 0) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 764 | __u64 slice_mask; |
| 765 | __u64 subslice_mask; |
| 766 | __u16 min_eus_per_subslice; |
| 767 | __u16 max_eus_per_subslice; |
| 768 | __u32 rsvd; |
| 769 | }; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 770 | struct i915_context_engines_load_balance { |
| 771 | struct i915_user_extension base; |
| 772 | __u16 engine_index; |
| 773 | __u16 num_siblings; |
| 774 | __u32 flags; |
| 775 | __u64 mbz64; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 776 | struct i915_engine_class_instance engines[]; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 777 | } __attribute__((packed)); |
| 778 | #define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE(name__,N__) struct { struct i915_user_extension base; __u16 engine_index; __u16 num_siblings; __u32 flags; __u64 mbz64; struct i915_engine_class_instance engines[N__]; \ |
| 779 | } __attribute__((packed)) name__ |
| 780 | struct i915_context_engines_bond { |
| 781 | struct i915_user_extension base; |
| 782 | struct i915_engine_class_instance master; |
| 783 | __u16 virtual_index; |
| 784 | __u16 num_bonds; |
| 785 | __u64 flags; |
| 786 | __u64 mbz64[4]; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 787 | struct i915_engine_class_instance engines[]; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 788 | } __attribute__((packed)); |
| 789 | #define I915_DEFINE_CONTEXT_ENGINES_BOND(name__,N__) struct { struct i915_user_extension base; struct i915_engine_class_instance master; __u16 virtual_index; __u16 num_bonds; __u64 flags; __u64 mbz64[4]; struct i915_engine_class_instance engines[N__]; \ |
| 790 | } __attribute__((packed)) name__ |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 791 | struct i915_context_engines_parallel_submit { |
| 792 | struct i915_user_extension base; |
| 793 | __u16 engine_index; |
| 794 | __u16 width; |
| 795 | __u16 num_siblings; |
| 796 | __u16 mbz16; |
| 797 | __u64 flags; |
| 798 | __u64 mbz64[3]; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 799 | struct i915_engine_class_instance engines[]; |
Colin Cross | 4ac3322 | 2022-12-15 15:45:35 -0800 | [diff] [blame] | 800 | } __attribute__((__packed__)); |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 801 | #define I915_DEFINE_CONTEXT_ENGINES_PARALLEL_SUBMIT(name__,N__) struct { struct i915_user_extension base; __u16 engine_index; __u16 width; __u16 num_siblings; __u16 mbz16; __u64 flags; __u64 mbz64[3]; struct i915_engine_class_instance engines[N__]; \ |
| 802 | } __attribute__((packed)) name__ |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 803 | struct i915_context_param_engines { |
| 804 | __u64 extensions; |
| 805 | #define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 |
| 806 | #define I915_CONTEXT_ENGINES_EXT_BOND 1 |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 807 | #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 808 | struct i915_engine_class_instance engines[]; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 809 | } __attribute__((packed)); |
| 810 | #define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__,N__) struct { __u64 extensions; struct i915_engine_class_instance engines[N__]; \ |
| 811 | } __attribute__((packed)) name__ |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 812 | struct drm_i915_gem_context_create_ext_setparam { |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 813 | struct i915_user_extension base; |
| 814 | struct drm_i915_gem_context_param param; |
| 815 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 816 | struct drm_i915_gem_context_destroy { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 817 | __u32 ctx_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 818 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 819 | }; |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 820 | struct drm_i915_gem_vm_control { |
| 821 | __u64 extensions; |
| 822 | __u32 flags; |
| 823 | __u32 vm_id; |
| 824 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 825 | struct drm_i915_reg_read { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 826 | __u64 offset; |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 827 | #define I915_REG_READ_8B_WA (1ul << 0) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 828 | __u64 val; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 829 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 830 | struct drm_i915_reset_stats { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 831 | __u32 ctx_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 832 | __u32 flags; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 833 | __u32 reset_count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 834 | __u32 batch_active; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 835 | __u32 batch_pending; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 836 | __u32 pad; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 837 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 838 | struct drm_i915_gem_userptr { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 839 | __u64 user_ptr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 840 | __u64 user_size; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 841 | __u32 flags; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 842 | #define I915_USERPTR_READ_ONLY 0x1 |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 843 | #define I915_USERPTR_PROBE 0x2 |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 844 | #define I915_USERPTR_UNSYNCHRONIZED 0x80000000 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 845 | __u32 handle; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 846 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 847 | enum drm_i915_oa_format { |
| 848 | I915_OA_FORMAT_A13 = 1, |
| 849 | I915_OA_FORMAT_A29, |
| 850 | I915_OA_FORMAT_A13_B8_C8, |
| 851 | I915_OA_FORMAT_B4_C8, |
| 852 | I915_OA_FORMAT_A45_B8_C8, |
| 853 | I915_OA_FORMAT_B4_C8_A16, |
| 854 | I915_OA_FORMAT_C4_B8, |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 855 | I915_OA_FORMAT_A12, |
| 856 | I915_OA_FORMAT_A12_B8_C8, |
| 857 | I915_OA_FORMAT_A32u40_A4u32_B8_C8, |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 858 | I915_OAR_FORMAT_A32u40_A4u32_B8_C8, |
| 859 | I915_OA_FORMAT_A24u40_A14u32_B8_C8, |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 860 | I915_OAM_FORMAT_MPEC8u64_B8_C8, |
| 861 | I915_OAM_FORMAT_MPEC8u32_B8_C8, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 862 | I915_OA_FORMAT_MAX |
| 863 | }; |
| 864 | enum drm_i915_perf_property_id { |
| 865 | DRM_I915_PERF_PROP_CTX_HANDLE = 1, |
| 866 | DRM_I915_PERF_PROP_SAMPLE_OA, |
| 867 | DRM_I915_PERF_PROP_OA_METRICS_SET, |
| 868 | DRM_I915_PERF_PROP_OA_FORMAT, |
| 869 | DRM_I915_PERF_PROP_OA_EXPONENT, |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 870 | DRM_I915_PERF_PROP_HOLD_PREEMPTION, |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 871 | DRM_I915_PERF_PROP_GLOBAL_SSEU, |
| 872 | DRM_I915_PERF_PROP_POLL_OA_PERIOD, |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 873 | DRM_I915_PERF_PROP_OA_ENGINE_CLASS, |
| 874 | DRM_I915_PERF_PROP_OA_ENGINE_INSTANCE, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 875 | DRM_I915_PERF_PROP_MAX |
| 876 | }; |
| 877 | struct drm_i915_perf_open_param { |
| 878 | __u32 flags; |
| 879 | #define I915_PERF_FLAG_FD_CLOEXEC (1 << 0) |
| 880 | #define I915_PERF_FLAG_FD_NONBLOCK (1 << 1) |
| 881 | #define I915_PERF_FLAG_DISABLED (1 << 2) |
| 882 | __u32 num_properties; |
| 883 | __u64 properties_ptr; |
| 884 | }; |
| 885 | #define I915_PERF_IOCTL_ENABLE _IO('i', 0x0) |
| 886 | #define I915_PERF_IOCTL_DISABLE _IO('i', 0x1) |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 887 | #define I915_PERF_IOCTL_CONFIG _IO('i', 0x2) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 888 | struct drm_i915_perf_record_header { |
| 889 | __u32 type; |
| 890 | __u16 pad; |
| 891 | __u16 size; |
| 892 | }; |
| 893 | enum drm_i915_perf_record_type { |
| 894 | DRM_I915_PERF_RECORD_SAMPLE = 1, |
| 895 | DRM_I915_PERF_RECORD_OA_REPORT_LOST = 2, |
| 896 | DRM_I915_PERF_RECORD_OA_BUFFER_LOST = 3, |
| 897 | DRM_I915_PERF_RECORD_MAX |
| 898 | }; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 899 | struct drm_i915_perf_oa_config { |
| 900 | char uuid[36]; |
| 901 | __u32 n_mux_regs; |
| 902 | __u32 n_boolean_regs; |
| 903 | __u32 n_flex_regs; |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 904 | __u64 mux_regs_ptr; |
| 905 | __u64 boolean_regs_ptr; |
| 906 | __u64 flex_regs_ptr; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 907 | }; |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 908 | struct drm_i915_query_item { |
| 909 | __u64 query_id; |
| 910 | #define DRM_I915_QUERY_TOPOLOGY_INFO 1 |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 911 | #define DRM_I915_QUERY_ENGINE_INFO 2 |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 912 | #define DRM_I915_QUERY_PERF_CONFIG 3 |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 913 | #define DRM_I915_QUERY_MEMORY_REGIONS 4 |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 914 | #define DRM_I915_QUERY_HWCONFIG_BLOB 5 |
| 915 | #define DRM_I915_QUERY_GEOMETRY_SUBSLICES 6 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 916 | __s32 length; |
| 917 | __u32 flags; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 918 | #define DRM_I915_QUERY_PERF_CONFIG_LIST 1 |
| 919 | #define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2 |
| 920 | #define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 921 | __u64 data_ptr; |
| 922 | }; |
| 923 | struct drm_i915_query { |
| 924 | __u32 num_items; |
| 925 | __u32 flags; |
| 926 | __u64 items_ptr; |
| 927 | }; |
| 928 | struct drm_i915_query_topology_info { |
| 929 | __u16 flags; |
| 930 | __u16 max_slices; |
| 931 | __u16 max_subslices; |
| 932 | __u16 max_eus_per_subslice; |
| 933 | __u16 subslice_offset; |
| 934 | __u16 subslice_stride; |
| 935 | __u16 eu_offset; |
| 936 | __u16 eu_stride; |
| 937 | __u8 data[]; |
| 938 | }; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 939 | struct drm_i915_engine_info { |
| 940 | struct i915_engine_class_instance engine; |
| 941 | __u32 rsvd0; |
| 942 | __u64 flags; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 943 | #define I915_ENGINE_INFO_HAS_LOGICAL_INSTANCE (1 << 0) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 944 | __u64 capabilities; |
| 945 | #define I915_VIDEO_CLASS_CAPABILITY_HEVC (1 << 0) |
| 946 | #define I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC (1 << 1) |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 947 | __u16 logical_instance; |
| 948 | __u16 rsvd1[3]; |
| 949 | __u64 rsvd2[3]; |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 950 | }; |
| 951 | struct drm_i915_query_engine_info { |
| 952 | __u32 num_engines; |
| 953 | __u32 rsvd[3]; |
| 954 | struct drm_i915_engine_info engines[]; |
| 955 | }; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 956 | struct drm_i915_query_perf_config { |
| 957 | union { |
| 958 | __u64 n_configs; |
| 959 | __u64 config; |
| 960 | char uuid[36]; |
| 961 | }; |
| 962 | __u32 flags; |
| 963 | __u8 data[]; |
| 964 | }; |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 965 | enum drm_i915_gem_memory_class { |
| 966 | I915_MEMORY_CLASS_SYSTEM = 0, |
| 967 | I915_MEMORY_CLASS_DEVICE, |
| 968 | }; |
| 969 | struct drm_i915_gem_memory_class_instance { |
| 970 | __u16 memory_class; |
| 971 | __u16 memory_instance; |
| 972 | }; |
| 973 | struct drm_i915_memory_region_info { |
| 974 | struct drm_i915_gem_memory_class_instance region; |
| 975 | __u32 rsvd0; |
| 976 | __u64 probed_size; |
| 977 | __u64 unallocated_size; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 978 | union { |
| 979 | __u64 rsvd1[8]; |
| 980 | struct { |
| 981 | __u64 probed_cpu_visible_size; |
| 982 | __u64 unallocated_cpu_visible_size; |
| 983 | }; |
| 984 | }; |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 985 | }; |
| 986 | struct drm_i915_query_memory_regions { |
| 987 | __u32 num_regions; |
| 988 | __u32 rsvd[3]; |
| 989 | struct drm_i915_memory_region_info regions[]; |
| 990 | }; |
| 991 | struct drm_i915_gem_create_ext { |
| 992 | __u64 size; |
| 993 | __u32 handle; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 994 | #define I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS (1 << 0) |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 995 | __u32 flags; |
| 996 | #define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0 |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 997 | #define I915_GEM_CREATE_EXT_PROTECTED_CONTENT 1 |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 998 | #define I915_GEM_CREATE_EXT_SET_PAT 2 |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 999 | __u64 extensions; |
| 1000 | }; |
| 1001 | struct drm_i915_gem_create_ext_memory_regions { |
| 1002 | struct i915_user_extension base; |
| 1003 | __u32 pad; |
| 1004 | __u32 num_regions; |
| 1005 | __u64 regions; |
| 1006 | }; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 1007 | struct drm_i915_gem_create_ext_protected_content { |
| 1008 | struct i915_user_extension base; |
| 1009 | __u32 flags; |
| 1010 | }; |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 1011 | struct drm_i915_gem_create_ext_set_pat { |
| 1012 | struct i915_user_extension base; |
| 1013 | __u32 pat_index; |
| 1014 | __u32 rsvd; |
| 1015 | }; |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 1016 | #define I915_PROTECTED_CONTENT_DEFAULT_SESSION 0xf |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 1017 | #ifdef __cplusplus |
Christopher Ferris | 48fe0ae | 2019-01-10 15:59:33 -0800 | [diff] [blame] | 1018 | } |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1019 | #endif |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 1020 | #endif |