summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorZhu Lingshan <lingshan.zhu@amd.com>2024-10-29 16:46:34 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-12-08 13:56:40 -0500
commit3880d8e3c6ef2797900d5a437b705afe9baa815f (patch)
tree11638c2cb4aca6faff29d2ac3628a57ee6343863 /drivers/gpu/drm/amd
parent42cbb68ce896ea472ebcdb310ad01b6712fd4d13 (diff)
amdkfd: find_process_by_mm always return the primary context
Up until this commit, the kfd multiple contexts feature has not been fully implemented in mainline kernel yet. For backawrd compatibility, not break existing use cases, this commit changes function find_process_by_mm, let it always return the primary kfd_process. Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 307cf4ccc2a3..1abcabc054a5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -935,7 +935,7 @@ static struct kfd_process *find_process_by_mm(const struct mm_struct *mm)
hash_for_each_possible_rcu(kfd_processes_table, process,
kfd_processes, (uintptr_t)mm)
- if (process->mm == mm)
+ if (process->mm == mm && process->context_id == KFD_CONTEXT_ID_PRIMARY)
return process;
return NULL;