Skip to contentSkip to conversation

drm/amdgpu: Remove one duplicated ef removal

PATCH In review xinhui pan 5 participants 5 messages Jul 8, 2022 – Jul 19, 2022

Subsystems (3)
lore
Share & tools
lore

xinhui pan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Remove one duplicated ef removal

That has been done in BO release notify.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -5
index 0f9811d02f61..49536fa8d269 100644
@@ -1583,11 +1583,6 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev,
 	if (!process_info)
 		return;
 
-	/* Release eviction fence from PD */
-	amdgpu_bo_reserve(pd, false);
-	amdgpu_bo_fence(pd, NULL, false);
-	amdgpu_bo_unreserve(pd);
-
 	/* Update process info */
 	mutex_lock(&process_info->lock);
 	process_info->n_vms--;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw

Am 08.07.22 um 03:53 schrieb xinhui pan:

Quoted 3 lines

That has been done in BO release notify.

Quoted 20 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -5
index 0f9811d02f61..49536fa8d269 100644
@@ -1583,11 +1583,6 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev,
  	if (!process_info)
  		return;
 
-	/* Release eviction fence from PD */
-	amdgpu_bo_reserve(pd, false);
-	amdgpu_bo_fence(pd, NULL, false);
-	amdgpu_bo_unreserve(pd);
-
  	/* Update process info */
  	mutex_lock(&process_info->lock);
  	process_info->n_vms--;
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to xinhui pan
Quoted 3 lines · xinhui pan

That has been done in BO release notify.

Quoted 20 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -5
index 0f9811d02f61..49536fa8d269 100644
@@ -1583,11 +1583,6 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev,
  	if (!process_info)
  		return;
 
-	/* Release eviction fence from PD */
-	amdgpu_bo_reserve(pd, false);
-	amdgpu_bo_fence(pd, NULL, false);
-	amdgpu_bo_unreserve(pd);
-
  	/* Update process info */
  	mutex_lock(&process_info->lock);
  	process_info->n_vms--;
#3 lore raw
In reply to xinhui pan

With this patch applied on Linus's tree 5.18-rc7 I get the following warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1367:20: warning:
unused variable 'pd' [-Wunused-variable]

       struct amdgpu_bo *pd = vm->root.bo;
                         ^

1 warning generated.

It does fix the nullpointer though :D

Quoted 27 lines · xinhui pan

That has been done in BO release notify.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -6
index 0f9811d02f61..49536fa8d269 100644
@@ -1583,11 +1583,6 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev,
        if (!process_info)
                return;
 
-       /* Release eviction fence from PD */
-       amdgpu_bo_reserve(pd, false);
-       amdgpu_bo_fence(pd, NULL, false);
-       amdgpu_bo_unreserve(pd);
-
        /* Update process info */
        mutex_lock(&process_info->lock);
        process_info->n_vms--;
--

2.34.1

#4 lore raw
Quoted 10 lines · Mike Lothian

With this patch applied on Linus's tree 5.18-rc7 I get the following warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1367:20: warning:
unused variable 'pd' [-Wunused-variable]

       struct amdgpu_bo *pd = vm->root.bo;
                         ^

1 warning generated.

It does fix the nullpointer though :D

I fixed that up when I pulled the patch in.

Alex

Quoted 30 lines · xinhui pan
Quoted 27 lines

That has been done in BO release notify.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -6
index 0f9811d02f61..49536fa8d269 100644
@@ -1583,11 +1583,6 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev,
        if (!process_info)
                return;
 
-       /* Release eviction fence from PD */
-       amdgpu_bo_reserve(pd, false);
-       amdgpu_bo_fence(pd, NULL, false);
-       amdgpu_bo_unreserve(pd);
-
        /* Update process info */
        mutex_lock(&process_info->lock);
        process_info->n_vms--;
--

2.34.1