History

drm/amdkfd: Implement image tiling mode support v2

v2: Removed hole in ioctl number space

Yong Zhao committed 9 years ago

Commit 5d71dbc1 parent fb31a0c2 files · +70 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/kfd_ioctl.h+27−1
@@ -238,6 +238,29 @@ struct kfd_ioctl_set_scratch_backing_va_args { · 237 unmodified lines
238238 uint32_t pad;
239239 };
240240
241+struct kfd_ioctl_get_tile_config_args {
242+ /* to KFD: pointer to tile array */
243+ uint64_t tile_config_ptr;
244+ /* to KFD: pointer to macro tile array */
245+ uint64_t macro_tile_config_ptr;
246+ /* to KFD: array size allocated by user mode
247+ * from KFD: array size filled by kernel
248+ */
249+ uint32_t num_tile_configs;
250+ /* to KFD: array size allocated by user mode
251+ * from KFD: array size filled by kernel
252+ */
253+ uint32_t num_macro_tile_configs;
254+
255+ uint32_t gpu_id; /* to KFD */
256+ uint32_t gb_addr_config; /* from KFD */
257+ uint32_t num_banks; /* from KFD */
258+ uint32_t num_ranks; /* from KFD */
259+ /* struct size can be extended later if needed
260+ * without breaking ABI compatibility
261+ */
262+};
263+
241264 #define AMDKFD_IOCTL_BASE 'K'
242265 #define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
243266 #define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
@@ -295,7 +318,10 @@ struct kfd_ioctl_set_scratch_backing_va_args { · 51 unmodified lines
295318 #define AMDKFD_IOC_SET_SCRATCH_BACKING_VA \
296319 AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args)
297320
321+#define AMDKFD_IOC_GET_TILE_CONFIG \
322+ AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args)
323+
298324 #define AMDKFD_COMMAND_START 0x01
299−#define AMDKFD_COMMAND_END 0x12
325+#define AMDKFD_COMMAND_END 0x13
300326
301327 #endif