[PATCH 3/3] drm/amdkfd: add custom svm range flags setting
Eric Huang
jinhuieric.huang at amd.com
Fri Jun 24 16:02:43 UTC 2022
It is to give a chance for user to change default
flags setting, such as fine grain to coarse grain.
Signed-off-by: Eric Huang <jinhuieric.huang at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 353306037959..caadd18c447a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -722,7 +722,10 @@ svm_range_apply_attrs(struct kfd_process *p, struct svm_range *prange,
break;
case KFD_IOCTL_SVM_ATTR_SET_FLAGS:
*update_mapping = true;
- prange->flags |= attrs[i].value;
+ if (attrs[i].value & KFD_IOCTL_SVM_FLAG_CUSTOM)
+ prange->flags = attrs[i].value;
+ else
+ prange->flags |= attrs[i].value;
break;
case KFD_IOCTL_SVM_ATTR_CLR_FLAGS:
*update_mapping = true;
--
2.25.1
More information about the amd-gfx
mailing list