drm/amdkfd: Allow querying SVM attributes that are clear
authorFelix Kuehling <Felix.Kuehling@amd.com>
Sat, 17 Jul 2021 02:46:21 +0000 (22:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Aug 2021 20:12:32 +0000 (16:12 -0400)
commita43e2a0e11491b73e2acaa27ee74d6c3b86deac0
treebd3d9c29ba1f9d91437d1683b76bfb37c27d24ab
parented7c28c77103e1441ed22eb492b26b9b035403f7
drm/amdkfd: Allow querying SVM attributes that are clear

Currently the SVM get_attr call allows querying, which flags are set
in the entire address range. Add the opposite query, which flags are
clear in the entire address range. Both queries can be combined in a
single get_attr call, which allows answering questions such as, "is
this address range coherent, non-coherent, or a mix of both"?

Proposed userspace for UAPI:
https://github.com/RadeonOpenCompute/ROCR-Runtime/tree/memory_model_queries

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yand <philip.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
include/uapi/linux/kfd_ioctl.h