v2: Removed hole in ioctl number space
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -238,6 +238,29 @@ struct kfd_ioctl_set_scratch_backing_va_args { · 237 unmodified lines | ||
| 238 | 238 | uint32_t pad; |
| 239 | 239 | }; |
| 240 | 240 | |
| 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 | + | |
| 241 | 264 | #define AMDKFD_IOCTL_BASE 'K' |
| 242 | 265 | #define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr) |
| 243 | 266 | #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 | ||
| 295 | 318 | #define AMDKFD_IOC_SET_SCRATCH_BACKING_VA \ |
| 296 | 319 | AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args) |
| 297 | 320 | |
| 321 | +#define AMDKFD_IOC_GET_TILE_CONFIG \ | |
| 322 | + AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args) | |
| 323 | + | |
| 298 | 324 | #define AMDKFD_COMMAND_START 0x01 |
| 299 | −#define AMDKFD_COMMAND_END 0x12 | |
| 325 | +#define AMDKFD_COMMAND_END 0x13 | |
| 300 | 326 | |
| 301 | 327 | #endif |