History

drm/amdkfd: Add support for more per-process flag

Add support for more per-process flags starting with option to configure MFMA precision for gfx 9.5 v2: Change flag name to KFD_PROC_FLAG_MFMA_HIGH_PRECISION Remove unused else condition v3: Bump the KFD API version v4: Missed SH_MEM_CONFIG__PRECISION_MODE__SHIFT define. Added it.

Harish Kasiviswanathan committed 1 year ago

Commit cf6d9491 parent 61972cd11 files · +47 −19Browse files

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

Unified · Split

include/uapi/linux/kfd_ioctl.h+6−2
@@ -43,9 +43,10 @@ · 42 unmodified lines
43 * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl43 * - 1.15 - Enable managing mappings in compute VMs with GEM_VA ioctl
44 * - 1.16 - Add contiguous VRAM allocation flag44 * - 1.16 - Add contiguous VRAM allocation flag
45 * - 1.17 - Add SDMA queue creation with target SDMA engine ID45 * - 1.17 - Add SDMA queue creation with target SDMA engine ID
46 * - 1.18 - Rename pad in set_memory_policy_args to misc_process_flag
46 */47 */
47#define KFD_IOCTL_MAJOR_VERSION 148#define KFD_IOCTL_MAJOR_VERSION 1
48#define KFD_IOCTL_MINOR_VERSION 1749#define KFD_IOCTL_MINOR_VERSION 18
49 50
50struct kfd_ioctl_get_version_args {51struct kfd_ioctl_get_version_args {
51 __u32 major_version; /* from KFD */52 __u32 major_version; /* from KFD */
@@ -150,6 +151,9 @@ struct kfd_dbg_device_info_entry { · 98 unmodified lines
150#define KFD_IOC_CACHE_POLICY_COHERENT 0151#define KFD_IOC_CACHE_POLICY_COHERENT 0
151#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1152#define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
152 153
154/* Misc. per process flags */
155#define KFD_PROC_FLAG_MFMA_HIGH_PRECISION (1 << 0)
156
153struct kfd_ioctl_set_memory_policy_args {157struct kfd_ioctl_set_memory_policy_args {
154 __u64 alternate_aperture_base; /* to KFD */158 __u64 alternate_aperture_base; /* to KFD */
155 __u64 alternate_aperture_size; /* to KFD */159 __u64 alternate_aperture_size; /* to KFD */
@@ -157,7 +161,7 @@ struct kfd_ioctl_set_memory_policy_args { · 1 unmodified line
157 __u32 gpu_id; /* to KFD */161 __u32 gpu_id; /* to KFD */
158 __u32 default_policy; /* to KFD */162 __u32 default_policy; /* to KFD */
159 __u32 alternate_policy; /* to KFD */163 __u32 alternate_policy; /* to KFD */
160 __u32 pad;164 __u32 misc_process_flag; /* to KFD */
161};165};
162 166
163/*167/*