Skip to contentSkip to conversation

drm/amdgpu: Don't need to call csb_vram_unpin

PATCH In review Emily Deng 2 participants 3 messages May 24, 2019 – May 27, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Emily Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Don't need to call csb_vram_unpin

As it will destory clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 ----------------
 1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -16
index c763733..231b9e0 100644
@@ -1154,20 +1154,6 @@ static int gfx_v9_0_csb_vram_pin(struct amdgpu_device *adev)
 	return r;
 }
 
-static void gfx_v9_0_csb_vram_unpin(struct amdgpu_device *adev)
-{
-	int r;
-
-	if (!adev->gfx.rlc.clear_state_obj)
-		return;
-
-	r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
-	if (likely(r == 0)) {
-		amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
-		amdgpu_bo_unreserve(adev->gfx.rlc.clear_state_obj);
-	}
-}
-
 static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)
 {
 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
@@ -3385,8 +3371,6 @@ static int gfx_v9_0_hw_fini(void *handle)
 	gfx_v9_0_cp_enable(adev, false);
 	adev->gfx.rlc.funcs->stop(adev);
 
-	gfx_v9_0_csb_vram_unpin(adev);
-
 	return 0;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1558694002-19915-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Ping......

Best wishes
Emily Deng

Quoted 56 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Friday, May 24, 2019 6:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

[CAUTION: External Email]

As it will destory clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning.

---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 ----------------

1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -16
index c763733..231b9e0 100644
@@ -1154,20 +1154,6 @@ static int gfx_v9_0_csb_vram_pin(struct
 amdgpu_device *adev)
       return r;
 }
 
-static void gfx_v9_0_csb_vram_unpin(struct amdgpu_device *adev) -{
-       int r;
-
-       if (!adev->gfx.rlc.clear_state_obj)
-               return;
-
-       r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
-       if (likely(r == 0)) {
-               amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
-               amdgpu_bo_unreserve(adev->gfx.rlc.clear_state_obj);
-       }
-}
-
 static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)  {
       amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
@@ -3385,8 +3371,6 @@ static int gfx_v9_0_hw_fini(void *handle)
       gfx_v9_0_cp_enable(adev, false);
       adev->gfx.rlc.funcs->stop(adev);
 
-       gfx_v9_0_csb_vram_unpin(adev);
-
       return 0;
 }
 
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): MWHPR12MB1326D8B853B29C387FC1874B8F1D0-Gy0DoCVfaSVaj5rVPFIlogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw

Did you ever test S3 suspend/resume? On S3 suspend/resume path, only hw_fini was called.

Quoted 67 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Deng, Emily
Sent: Monday, May 27, 2019 11:09 AM
To: Deng, Emily <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

Ping......

Best wishes
Emily Deng

Quoted 56 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Friday, May 24, 2019 6:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu: Don't need to call csb_vram_unpin

[CAUTION: External Email]

As it will destory clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call csb_vram unpin in gfx_v9_0_hw_fini, or it will have unpin warning.

---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 ----------------

1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -16
index c763733..231b9e0 100644
@@ -1154,20 +1154,6 @@ static int gfx_v9_0_csb_vram_pin(struct
 amdgpu_device *adev)
       return r;
 }
 
-static void gfx_v9_0_csb_vram_unpin(struct amdgpu_device *adev) -{
-       int r;
-
-       if (!adev->gfx.rlc.clear_state_obj)
-               return;
-
-       r = amdgpu_bo_reserve(adev->gfx.rlc.clear_state_obj, true);
-       if (likely(r == 0)) {
-               amdgpu_bo_unpin(adev->gfx.rlc.clear_state_obj);
-               amdgpu_bo_unreserve(adev->gfx.rlc.clear_state_obj);
-       }
-}
-
 static void gfx_v9_0_mec_fini(struct amdgpu_device *adev)  {
       amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
@@ -3385,8 +3371,6 @@ static int gfx_v9_0_hw_fini(void *handle)
       gfx_v9_0_cp_enable(adev, false);
       adev->gfx.rlc.funcs->stop(adev);
 
-       gfx_v9_0_csb_vram_unpin(adev);
-
       return 0;
 }
 
--

2.7.4

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx