blob: d806cc2651b57849dcdb682ee704207b6e5aeb20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 319a72aa56bf75b7e5de2968bbe2e503722a50f4 Mon Sep 17 00:00:00 2001
From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Date: Mon, 15 Jan 2018 16:50:26 -0500
Subject: [PATCH 3185/4131] drm/amdkfd: Fix eviction fence ref. count
Eviction fence is one per kfd_process not per pdd. Fix this.
BUG: SWDEV-142052
Change-Id: Ie6cb03228ac86ac310432e4ffd3157c18a32d4f5
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 64042f1..7bddeb6 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -358,11 +358,10 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
list_for_each_entry_safe(pdd, temp, &p->per_device_data,
per_device_list) {
/* Destroy the GPUVM VM context */
- if (pdd->vm) {
- dma_fence_put(p->ef);
+ if (pdd->vm)
pdd->dev->kfd2kgd->destroy_process_vm(
pdd->dev->kgd, pdd->vm);
- }
+
list_del(&pdd->per_device_list);
if (pdd->qpd.cwsr_kaddr && !pdd->qpd.cwsr_base)
@@ -408,6 +407,7 @@ static void kfd_process_wq_release(struct work_struct *work)
kfd_process_free_outstanding_kfd_bos(p);
kfd_process_destroy_pdds(p);
+ dma_fence_put(p->ef);
kfd_event_free_process(p);
--
2.7.4
|