History

tools headers UAPI: Sync drm/i915_drm.h with the kernel sources

To pick the changes in: 2459e56fd8af0b47 ("drm/i915/uapi: implement object placement extension") ebcb40298947bdb0 ("drm/i915/uapi: introduce drm_i915_gem_create_ext") 710217292a61110a ("drm/i915/query: Expose memory regions through the query uAPI") e3bdccafb5bcfab2 ("drm/i915/uapi: convert i915_query and friend to kernel doc") 19d053d477a14506 ("drm/i915/uapi: convert i915_user_extension to kernel doc") 2ef6a01fb636997b ("drm/i915/uapi: fix kernel doc warnings") That picks a new ioctl: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/i915_drm.h tools/include/uapi/drm/i915_drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after --- before 2021-07-05 14:25:13.247680316 -0300 +++ after 2021-07-05 14:25:22.454874111 -0300 @@ -166,4 +166,5 @@ [DRM_COMMAND_BASE + 0x39] = "I915_QUERY", [DRM_COMMAND_BASE + 0x3a] = "I915_GEM_VM_CREATE", [DRM_COMMAND_BASE + 0x3b] = "I915_GEM_VM_DESTROY", + [DRM_COMMAND_BASE + 0x3c] = "I915_GEM_CREATE_EXT", }; $ Addressing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h

Arnaldo Carvalho de Melo committed 5 years ago

Commit 4a1cdde1 parent 688ef3e1 file · +359 −34Browse files

Unified · Split

tools/include/uapi/drm/i915_drm.h+359−34
@@ -62,8 +62,8 @@ extern "C" { · 61 unmodified lines
6262 #define I915_ERROR_UEVENT "ERROR"
6363 #define I915_RESET_UEVENT "RESET"
6464
65−/*
66− * i915_user_extension: Base class for defining a chain of extensions
65+/**
66+ * struct i915_user_extension - Base class for defining a chain of extensions
6767 *
6868 * Many interfaces need to grow over time. In most cases we can simply
6969 * extend the struct and have userspace pass in more data. Another option,
@@ -76,12 +76,58 @@ extern "C" { · 6 unmodified lines
7676 * increasing complexity, and for large parts of that interface to be
7777 * entirely optional. The downside is more pointer chasing; chasing across
7878 * the __user boundary with pointers encapsulated inside u64.
79+ *
80+ * Example chaining:
81+ *
82+ * .. code-block:: C
83+ *
84+ * struct i915_user_extension ext3 {
85+ * .next_extension = 0, // end
86+ * .name = ...,
87+ * };
88+ * struct i915_user_extension ext2 {
89+ * .next_extension = (uintptr_t)&ext3,
90+ * .name = ...,
91+ * };
92+ * struct i915_user_extension ext1 {
93+ * .next_extension = (uintptr_t)&ext2,
94+ * .name = ...,
95+ * };
96+ *
97+ * Typically the struct i915_user_extension would be embedded in some uAPI
98+ * struct, and in this case we would feed it the head of the chain(i.e ext1),
99+ * which would then apply all of the above extensions.
100+ *
79101 */
80102 struct i915_user_extension {
103+ /**
104+ * @next_extension:
105+ *
106+ * Pointer to the next struct i915_user_extension, or zero if the end.
107+ */
81108 __u64 next_extension;
109+ /**
110+ * @name: Name of the extension.
111+ *
112+ * Note that the name here is just some integer.
113+ *
114+ * Also note that the name space for this is not global for the whole
115+ * driver, but rather its scope/meaning is limited to the specific piece
116+ * of uAPI which has embedded the struct i915_user_extension.
117+ */
82118 __u32 name;
83− __u32 flags; /* All undefined bits must be zero. */
84− __u32 rsvd[4]; /* Reserved for future use; must be zero. */
119+ /**
120+ * @flags: MBZ
121+ *
122+ * All undefined bits must be zero.
123+ */
124+ __u32 flags;
125+ /**
126+ * @rsvd: MBZ
127+ *
128+ * Reserved for future use; must be zero.
129+ */
130+ __u32 rsvd[4];
85131 };
86132
87133 /*
@@ -360,6 +406,7 @@ typedef struct _drm_i915_sarea { · 272 unmodified lines
360406 #define DRM_I915_QUERY 0x39
361407 #define DRM_I915_GEM_VM_CREATE 0x3a
362408 #define DRM_I915_GEM_VM_DESTROY 0x3b
409+#define DRM_I915_GEM_CREATE_EXT 0x3c
363410 /* Must be kept compact -- no holes */
364411
365412 #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
@@ -392,6 +439,7 @@ typedef struct _drm_i915_sarea { · 26 unmodified lines
392439 #define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
393440 #define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
394441 #define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create)
442+#define DRM_IOCTL_I915_GEM_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE_EXT, struct drm_i915_gem_create_ext)
395443 #define DRM_IOCTL_I915_GEM_PREAD DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread)
396444 #define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
397445 #define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
@@ -1054,12 +1102,12 @@ struct drm_i915_gem_exec_fence { · 656 unmodified lines
10541102 __u32 flags;
10551103 };
10561104
1057−/**
1105+/*
10581106 * See drm_i915_gem_execbuffer_ext_timeline_fences.
10591107 */
10601108 #define DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES 0
10611109
1062−/**
1110+/*
10631111 * This structure describes an array of drm_syncobj and associated points for
10641112 * timeline variants of drm_syncobj. It is invalid to append this structure to
10651113 * the execbuf if I915_EXEC_FENCE_ARRAY is set.
@@ -1700,7 +1748,7 @@ struct drm_i915_gem_context_param { · 634 unmodified lines
17001748 __u64 value;
17011749 };
17021750
1703−/**
1751+/*
17041752 * Context SSEU programming
17051753 *
17061754 * It may be necessary for either functional or performance reason to configure
@@ -2067,7 +2115,7 @@ struct drm_i915_perf_open_param { · 360 unmodified lines
20672115 __u64 properties_ptr;
20682116 };
20692117
2070−/**
2118+/*
20712119 * Enable data capture for a stream that was either opened in a disabled state
20722120 * via I915_PERF_FLAG_DISABLED or was later disabled via
20732121 * I915_PERF_IOCTL_DISABLE.
@@ -2081,7 +2129,7 @@ struct drm_i915_perf_open_param { · 7 unmodified lines
20812129 */
20822130 #define I915_PERF_IOCTL_ENABLE _IO('i', 0x0)
20832131
2084−/**
2132+/*
20852133 * Disable data capture for a stream.
20862134 *
20872135 * It is an error to try and read a stream that is disabled.
@@ -2090,7 +2138,7 @@ struct drm_i915_perf_open_param { · 2 unmodified lines
20902138 */
20912139 #define I915_PERF_IOCTL_DISABLE _IO('i', 0x1)
20922140
2093−/**
2141+/*
20942142 * Change metrics_set captured by a stream.
20952143 *
20962144 * If the stream is bound to a specific context, the configuration change
@@ -2103,7 +2151,7 @@ struct drm_i915_perf_open_param { · 6 unmodified lines
21032151 */
21042152 #define I915_PERF_IOCTL_CONFIG _IO('i', 0x2)
21052153
2106−/**
2154+/*
21072155 * Common to all i915 perf records
21082156 */
21092157 struct drm_i915_perf_record_header {
@@ -2151,7 +2199,7 @@ enum drm_i915_perf_record_type { · 41 unmodified lines
21512199 DRM_I915_PERF_RECORD_MAX /* non-ABI */
21522200 };
21532201
2154−/**
2202+/*
21552203 * Structure to upload perf dynamic configuration into the kernel.
21562204 */
21572205 struct drm_i915_perf_oa_config {
@@ -2172,53 +2220,95 @@ struct drm_i915_perf_oa_config { · 14 unmodified lines
21722220 __u64 flex_regs_ptr;
21732221 };
21742222
2223+/**
2224+ * struct drm_i915_query_item - An individual query for the kernel to process.
2225+ *
2226+ * The behaviour is determined by the @query_id. Note that exactly what
2227+ * @data_ptr is also depends on the specific @query_id.
2228+ */
21752229 struct drm_i915_query_item {
2230+ /** @query_id: The id for this query */
21762231 __u64 query_id;
21772232 #define DRM_I915_QUERY_TOPOLOGY_INFO 1
21782233 #define DRM_I915_QUERY_ENGINE_INFO 2
21792234 #define DRM_I915_QUERY_PERF_CONFIG 3
2235+#define DRM_I915_QUERY_MEMORY_REGIONS 4
21802236 /* Must be kept compact -- no holes and well documented */
21812237
2182− /*
2238+ /**
2239+ * @length:
2240+ *
21832241 * When set to zero by userspace, this is filled with the size of the
2184− * data to be written at the data_ptr pointer. The kernel sets this
2242+ * data to be written at the @data_ptr pointer. The kernel sets this
21852243 * value to a negative value to signal an error on a particular query
21862244 * item.
21872245 */
21882246 __s32 length;
21892247
2190− /*
2248+ /**
2249+ * @flags:
2250+ *
21912251 * When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
21922252 *
21932253 * When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
2194− * following :
2195− * - DRM_I915_QUERY_PERF_CONFIG_LIST
2196− * - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
2197− * - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
2254+ * following:
2255+ *
2256+ * - DRM_I915_QUERY_PERF_CONFIG_LIST
2257+ * - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
2258+ * - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
21982259 */
21992260 __u32 flags;
22002261 #define DRM_I915_QUERY_PERF_CONFIG_LIST 1
22012262 #define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2
22022263 #define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3
22032264
2204− /*
2205− * Data will be written at the location pointed by data_ptr when the
2206− * value of length matches the length of the data to be written by the
2265+ /**
2266+ * @data_ptr:
2267+ *
2268+ * Data will be written at the location pointed by @data_ptr when the
2269+ * value of @length matches the length of the data to be written by the
22072270 * kernel.
22082271 */
22092272 __u64 data_ptr;
22102273 };
22112274
2275+/**
2276+ * struct drm_i915_query - Supply an array of struct drm_i915_query_item for the
2277+ * kernel to fill out.
2278+ *
2279+ * Note that this is generally a two step process for each struct
2280+ * drm_i915_query_item in the array:
2281+ *
2282+ * 1. Call the DRM_IOCTL_I915_QUERY, giving it our array of struct
2283+ * drm_i915_query_item, with &drm_i915_query_item.length set to zero. The
2284+ * kernel will then fill in the size, in bytes, which tells userspace how
2285+ * memory it needs to allocate for the blob(say for an array of properties).
2286+ *
2287+ * 2. Next we call DRM_IOCTL_I915_QUERY again, this time with the
2288+ * &drm_i915_query_item.data_ptr equal to our newly allocated blob. Note that
2289+ * the &drm_i915_query_item.length should still be the same as what the
2290+ * kernel previously set. At this point the kernel can fill in the blob.
2291+ *
2292+ * Note that for some query items it can make sense for userspace to just pass
2293+ * in a buffer/blob equal to or larger than the required size. In this case only
2294+ * a single ioctl call is needed. For some smaller query items this can work
2295+ * quite well.
2296+ *
2297+ */
22122298 struct drm_i915_query {
2299+ /** @num_items: The number of elements in the @items_ptr array */
22132300 __u32 num_items;
22142301
2215− /*
2216− * Unused for now. Must be cleared to zero.
2302+ /**
2303+ * @flags: Unused for now. Must be cleared to zero.
22172304 */
22182305 __u32 flags;
22192306
2220− /*
2221− * This points to an array of num_items drm_i915_query_item structures.
2307+ /**
2308+ * @items_ptr:
2309+ *
2310+ * Pointer to an array of struct drm_i915_query_item. The number of
2311+ * array elements is @num_items.
22222312 */
22232313 __u64 items_ptr;
22242314 };
@@ -2292,21 +2382,21 @@ struct drm_i915_query_topology_info { · 67 unmodified lines
22922382 * Describes one engine and it's capabilities as known to the driver.
22932383 */
22942384 struct drm_i915_engine_info {
2295− /** Engine class and instance. */
2385+ /** @engine: Engine class and instance. */
22962386 struct i915_engine_class_instance engine;
22972387
2298− /** Reserved field. */
2388+ /** @rsvd0: Reserved field. */
22992389 __u32 rsvd0;
23002390
2301− /** Engine flags. */
2391+ /** @flags: Engine flags. */
23022392 __u64 flags;
23032393
2304− /** Capabilities of this engine. */
2394+ /** @capabilities: Capabilities of this engine. */
23052395 __u64 capabilities;
23062396 #define I915_VIDEO_CLASS_CAPABILITY_HEVC (1 << 0)
23072397 #define I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC (1 << 1)
23082398
2309− /** Reserved fields. */
2399+ /** @rsvd1: Reserved fields. */
23102400 __u64 rsvd1[4];
23112401 };
23122402
@@ -2317,13 +2407,13 @@ struct drm_i915_engine_info { · 4 unmodified lines
23172407 * an array of struct drm_i915_engine_info structures.
23182408 */
23192409 struct drm_i915_query_engine_info {
2320− /** Number of struct drm_i915_engine_info structs following. */
2410+ /** @num_engines: Number of struct drm_i915_engine_info structs following. */
23212411 __u32 num_engines;
23222412
2323− /** MBZ */
2413+ /** @rsvd: MBZ */
23242414 __u32 rsvd[3];
23252415
2326− /** Marker for drm_i915_engine_info structures. */
2416+ /** @engines: Marker for drm_i915_engine_info structures. */
23272417 struct drm_i915_engine_info engines[];
23282418 };
23292419
@@ -2377,6 +2467,241 @@ struct drm_i915_query_perf_config { · 47 unmodified lines
23772467 __u8 data[];
23782468 };
23792469
2470+/**
2471+ * enum drm_i915_gem_memory_class - Supported memory classes
2472+ */
2473+enum drm_i915_gem_memory_class {
2474+ /** @I915_MEMORY_CLASS_SYSTEM: System memory */
2475+ I915_MEMORY_CLASS_SYSTEM = 0,
2476+ /** @I915_MEMORY_CLASS_DEVICE: Device local-memory */
2477+ I915_MEMORY_CLASS_DEVICE,
2478+};
2479+
2480+/**
2481+ * struct drm_i915_gem_memory_class_instance - Identify particular memory region
2482+ */
2483+struct drm_i915_gem_memory_class_instance {
2484+ /** @memory_class: See enum drm_i915_gem_memory_class */
2485+ __u16 memory_class;
2486+
2487+ /** @memory_instance: Which instance */
2488+ __u16 memory_instance;
2489+};
2490+
2491+/**
2492+ * struct drm_i915_memory_region_info - Describes one region as known to the
2493+ * driver.
2494+ *
2495+ * Note that we reserve some stuff here for potential future work. As an example
2496+ * we might want expose the capabilities for a given region, which could include
2497+ * things like if the region is CPU mappable/accessible, what are the supported
2498+ * mapping types etc.
2499+ *
2500+ * Note that to extend struct drm_i915_memory_region_info and struct
2501+ * drm_i915_query_memory_regions in the future the plan is to do the following:
2502+ *
2503+ * .. code-block:: C
2504+ *
2505+ * struct drm_i915_memory_region_info {
2506+ * struct drm_i915_gem_memory_class_instance region;
2507+ * union {
2508+ * __u32 rsvd0;
2509+ * __u32 new_thing1;
2510+ * };
2511+ * ...
2512+ * union {
2513+ * __u64 rsvd1[8];
2514+ * struct {
2515+ * __u64 new_thing2;
2516+ * __u64 new_thing3;
2517+ * ...
2518+ * };
2519+ * };
2520+ * };
2521+ *
2522+ * With this things should remain source compatible between versions for
2523+ * userspace, even as we add new fields.
2524+ *
2525+ * Note this is using both struct drm_i915_query_item and struct drm_i915_query.
2526+ * For this new query we are adding the new query id DRM_I915_QUERY_MEMORY_REGIONS
2527+ * at &drm_i915_query_item.query_id.
2528+ */
2529+struct drm_i915_memory_region_info {
2530+ /** @region: The class:instance pair encoding */
2531+ struct drm_i915_gem_memory_class_instance region;
2532+
2533+ /** @rsvd0: MBZ */
2534+ __u32 rsvd0;
2535+
2536+ /** @probed_size: Memory probed by the driver (-1 = unknown) */
2537+ __u64 probed_size;
2538+
2539+ /** @unallocated_size: Estimate of memory remaining (-1 = unknown) */
2540+ __u64 unallocated_size;
2541+
2542+ /** @rsvd1: MBZ */
2543+ __u64 rsvd1[8];
2544+};
2545+
2546+/**
2547+ * struct drm_i915_query_memory_regions
2548+ *
2549+ * The region info query enumerates all regions known to the driver by filling
2550+ * in an array of struct drm_i915_memory_region_info structures.
2551+ *
2552+ * Example for getting the list of supported regions:
2553+ *
2554+ * .. code-block:: C
2555+ *
2556+ * struct drm_i915_query_memory_regions *info;
2557+ * struct drm_i915_query_item item = {
2558+ * .query_id = DRM_I915_QUERY_MEMORY_REGIONS;
2559+ * };
2560+ * struct drm_i915_query query = {
2561+ * .num_items = 1,
2562+ * .items_ptr = (uintptr_t)&item,
2563+ * };
2564+ * int err, i;
2565+ *
2566+ * // First query the size of the blob we need, this needs to be large
2567+ * // enough to hold our array of regions. The kernel will fill out the
2568+ * // item.length for us, which is the number of bytes we need.
2569+ * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query);
2570+ * if (err) ...
2571+ *
2572+ * info = calloc(1, item.length);
2573+ * // Now that we allocated the required number of bytes, we call the ioctl
2574+ * // again, this time with the data_ptr pointing to our newly allocated
2575+ * // blob, which the kernel can then populate with the all the region info.
2576+ * item.data_ptr = (uintptr_t)&info,
2577+ *
2578+ * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query);
2579+ * if (err) ...
2580+ *
2581+ * // We can now access each region in the array
2582+ * for (i = 0; i < info->num_regions; i++) {
2583+ * struct drm_i915_memory_region_info mr = info->regions[i];
2584+ * u16 class = mr.region.class;
2585+ * u16 instance = mr.region.instance;
2586+ *
2587+ * ....
2588+ * }
2589+ *
2590+ * free(info);
2591+ */
2592+struct drm_i915_query_memory_regions {
2593+ /** @num_regions: Number of supported regions */
2594+ __u32 num_regions;
2595+
2596+ /** @rsvd: MBZ */
2597+ __u32 rsvd[3];
2598+
2599+ /** @regions: Info about each supported region */
2600+ struct drm_i915_memory_region_info regions[];
2601+};
2602+
2603+/**
2604+ * struct drm_i915_gem_create_ext - Existing gem_create behaviour, with added
2605+ * extension support using struct i915_user_extension.
2606+ *
2607+ * Note that in the future we want to have our buffer flags here, at least for
2608+ * the stuff that is immutable. Previously we would have two ioctls, one to
2609+ * create the object with gem_create, and another to apply various parameters,
2610+ * however this creates some ambiguity for the params which are considered
2611+ * immutable. Also in general we're phasing out the various SET/GET ioctls.
2612+ */
2613+struct drm_i915_gem_create_ext {
2614+ /**
2615+ * @size: Requested size for the object.
2616+ *
2617+ * The (page-aligned) allocated size for the object will be returned.
2618+ *
2619+ * Note that for some devices we have might have further minimum
2620+ * page-size restrictions(larger than 4K), like for device local-memory.
2621+ * However in general the final size here should always reflect any
2622+ * rounding up, if for example using the I915_GEM_CREATE_EXT_MEMORY_REGIONS
2623+ * extension to place the object in device local-memory.
2624+ */
2625+ __u64 size;
2626+ /**
2627+ * @handle: Returned handle for the object.
2628+ *
2629+ * Object handles are nonzero.
2630+ */
2631+ __u32 handle;
2632+ /** @flags: MBZ */
2633+ __u32 flags;
2634+ /**
2635+ * @extensions: The chain of extensions to apply to this object.
2636+ *
2637+ * This will be useful in the future when we need to support several
2638+ * different extensions, and we need to apply more than one when
2639+ * creating the object. See struct i915_user_extension.
2640+ *
2641+ * If we don't supply any extensions then we get the same old gem_create
2642+ * behaviour.
2643+ *
2644+ * For I915_GEM_CREATE_EXT_MEMORY_REGIONS usage see
2645+ * struct drm_i915_gem_create_ext_memory_regions.
2646+ */
2647+#define I915_GEM_CREATE_EXT_MEMORY_REGIONS 0
2648+ __u64 extensions;
2649+};
2650+
2651+/**
2652+ * struct drm_i915_gem_create_ext_memory_regions - The
2653+ * I915_GEM_CREATE_EXT_MEMORY_REGIONS extension.
2654+ *
2655+ * Set the object with the desired set of placements/regions in priority
2656+ * order. Each entry must be unique and supported by the device.
2657+ *
2658+ * This is provided as an array of struct drm_i915_gem_memory_class_instance, or
2659+ * an equivalent layout of class:instance pair encodings. See struct
2660+ * drm_i915_query_memory_regions and DRM_I915_QUERY_MEMORY_REGIONS for how to
2661+ * query the supported regions for a device.
2662+ *
2663+ * As an example, on discrete devices, if we wish to set the placement as
2664+ * device local-memory we can do something like:
2665+ *
2666+ * .. code-block:: C
2667+ *
2668+ * struct drm_i915_gem_memory_class_instance region_lmem = {
2669+ * .memory_class = I915_MEMORY_CLASS_DEVICE,
2670+ * .memory_instance = 0,
2671+ * };
2672+ * struct drm_i915_gem_create_ext_memory_regions regions = {
2673+ * .base = { .name = I915_GEM_CREATE_EXT_MEMORY_REGIONS },
2674+ * .regions = (uintptr_t)&region_lmem,
2675+ * .num_regions = 1,
2676+ * };
2677+ * struct drm_i915_gem_create_ext create_ext = {
2678+ * .size = 16 * PAGE_SIZE,
2679+ * .extensions = (uintptr_t)&regions,
2680+ * };
2681+ *
2682+ * int err = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
2683+ * if (err) ...
2684+ *
2685+ * At which point we get the object handle in &drm_i915_gem_create_ext.handle,
2686+ * along with the final object size in &drm_i915_gem_create_ext.size, which
2687+ * should account for any rounding up, if required.
2688+ */
2689+struct drm_i915_gem_create_ext_memory_regions {
2690+ /** @base: Extension link. See struct i915_user_extension. */
2691+ struct i915_user_extension base;
2692+
2693+ /** @pad: MBZ */
2694+ __u32 pad;
2695+ /** @num_regions: Number of elements in the @regions array. */
2696+ __u32 num_regions;
2697+ /**
2698+ * @regions: The regions/placements array.
2699+ *
2700+ * An array of struct drm_i915_gem_memory_class_instance.
2701+ */
2702+ __u64 regions;
2703+};
2704+
23802705 #if defined(__cplusplus)
23812706 }
23822707 #endif