summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-08-21 10:49:48 +1000
committerDave Airlie <airlied@redhat.com>2017-08-21 10:49:48 +1000
commita0aeb3b2ac3ff0608f1bc3fb46332148856d3276 (patch)
tree26ec19e95ddfc02fef15821b86c9928102ec0d07 /include
parent5fd27c2a1f75439ae72212e730c3bd73868f487c (diff)
parent5d71dbc3a588690c3d66d76db8cd29973425ce6d (diff)
downloadlinux-stable-a0aeb3b2ac3ff0608f1bc3fb46332148856d3276.tar.gz
linux-stable-a0aeb3b2ac3ff0608f1bc3fb46332148856d3276.tar.bz2
linux-stable-a0aeb3b2ac3ff0608f1bc3fb46332148856d3276.zip
Merge tag 'drm-amdkfd-next-2017-08-18' of git://people.freedesktop.org/~gabbayo/linux into drm-next
This is the amdkfd pull request for 4.14 merge window. AMD has started cleaning the pipe and sending patches from their internal development to the upstream community. The plan as I understand it is to first get all the non-dGPU patches to upstream and then move to upstream dGPU support. The patches here are relevant only for Kaveri and Carrizo. The following is a summary of the changes: - Add new IOCTL to set a Scratch memory VA - Update PM4 headers for new firmware that support scratch memory - Support image tiling mode - Remove all uses of BUG_ON - Various Bug fixes and coding style fixes * tag 'drm-amdkfd-next-2017-08-18' of git://people.freedesktop.org/~gabbayo/linux: (24 commits) drm/amdkfd: Implement image tiling mode support v2 drm/amdgpu: Add kgd kfd interface get_tile_config() v2 drm/amdkfd: Adding new IOCTL for scratch memory v2 drm/amdgpu: Add kgd/kfd interface to support scratch memory v2 drm/amdgpu: Program SH_STATIC_MEM_CONFIG globally, not per-VMID drm/amd: Update MEC HQD loading code for KFD drm/amdgpu: Disable GFX PG on CZ drm/amdkfd: Update PM4 packet headers drm/amdkfd: Clamp EOP queue size correctly on Gfx8 drm/amdkfd: Add more error printing to help bringup v2 drm/amdkfd: Handle remaining BUG_ONs more gracefully v2 drm/amdkfd: Allocate gtt_sa_bitmap in long units drm/amdkfd: Fix doorbell initialization and finalization drm/amdkfd: Remove BUG_ONs for NULL pointer arguments drm/amdkfd: Remove usage of alloc(sizeof(struct... drm/amdkfd: Fix goto usage v2 drm/amdkfd: Change x==NULL/false references to !x drm/amdkfd: Consolidate and clean up log commands drm/amdkfd: Clean up KFD style errors and warnings v2 drm/amdgpu: Remove hard-coded assumptions about compute pipes ...
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/kfd_ioctl.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index d6833426fdef..7b4567bacfc2 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -232,6 +232,35 @@ struct kfd_ioctl_wait_events_args {
uint32_t wait_result; /* from KFD */
};
+struct kfd_ioctl_set_scratch_backing_va_args {
+ uint64_t va_addr; /* to KFD */
+ uint32_t gpu_id; /* to KFD */
+ uint32_t pad;
+};
+
+struct kfd_ioctl_get_tile_config_args {
+ /* to KFD: pointer to tile array */
+ uint64_t tile_config_ptr;
+ /* to KFD: pointer to macro tile array */
+ uint64_t macro_tile_config_ptr;
+ /* to KFD: array size allocated by user mode
+ * from KFD: array size filled by kernel
+ */
+ uint32_t num_tile_configs;
+ /* to KFD: array size allocated by user mode
+ * from KFD: array size filled by kernel
+ */
+ uint32_t num_macro_tile_configs;
+
+ uint32_t gpu_id; /* to KFD */
+ uint32_t gb_addr_config; /* from KFD */
+ uint32_t num_banks; /* from KFD */
+ uint32_t num_ranks; /* from KFD */
+ /* struct size can be extended later if needed
+ * without breaking ABI compatibility
+ */
+};
+
#define AMDKFD_IOCTL_BASE 'K'
#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
@@ -286,7 +315,13 @@ struct kfd_ioctl_wait_events_args {
#define AMDKFD_IOC_DBG_WAVE_CONTROL \
AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args)
+#define AMDKFD_IOC_SET_SCRATCH_BACKING_VA \
+ AMDKFD_IOWR(0x11, struct kfd_ioctl_set_scratch_backing_va_args)
+
+#define AMDKFD_IOC_GET_TILE_CONFIG \
+ AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args)
+
#define AMDKFD_COMMAND_START 0x01
-#define AMDKFD_COMMAND_END 0x11
+#define AMDKFD_COMMAND_END 0x13
#endif