drm/amdgpu:Fix the unpin warning about csb buffer
Subsystems (2)
PATCH 1/1 drm/amdgpu:Fix the unpin warning about csb buffer
As it will destroy clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to
call amdgpu_bo_free_kernel in gfx_v9_0_sw_fini, or it will have unpin warning.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -3
@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev); -amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, - &adev->gfx.rlc.clear_state_gpu_addr, - (void **)&adev->gfx.rlc.cs_ptr); +amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);if (adev->asic_type ==CHIP_RAVEN ) { amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr,
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): 1559030775-19612-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org
Ping ......
Best wishes
Emily Deng
Quoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Tuesday, May 28, 2019 4:06 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferAs it will destroy
clear_state_obj, and also will unpin it in thegfx_v9_0_sw_fini, so don't need to callamdgpu_bo_free_kernelingfx_v9_0_sw_fini, or it will have unpin warning.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-4@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev); -amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, - &adev->gfx.rlc.clear_state_gpu_addr, - (void **)&adev->gfx.rlc.cs_ptr); +amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);if (adev->asic_type ==CHIP_RAVEN ) { amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr, --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): MWHPR12MB1326361E2C7ADE7523E3E7D48F1E0-Gy0DoCVfaSVaj5rVPFIlogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Ping......
Best wishes
Emily Deng
Quoted 49 lines
-----Original Message-----
From: Deng, Emily <[email protected]>
Sent: Tuesday, May 28, 2019 6:14 PM
To: Deng, Emily <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferPing ......
Best wishes
Emily DengQuoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Tuesday, May 28, 2019 4:06 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferAs it will destroy
clear_state_obj, and also will unpin it in thegfx_v9_0_sw_fini, so don't need to callamdgpu_bo_free_kernelingfx_v9_0_sw_fini, or it will have unpin warning.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-4@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev); -amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, - &adev->gfx.rlc.clear_state_gpu_addr, - (void **)&adev->gfx.rlc.cs_ptr); +amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);if (adev->asic_type ==CHIP_RAVEN ) { amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr, --2.7.4
Quoted 4 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
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB1326C5856A40BB52D1BC34508F1F0-Gy0DoCVfaSVaj5rVPFIlogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Hi Christian,
I have reverted the before change as your suggestion, and sent this new patch, could you help to review this?
Best wishes
Emily Deng
Quoted 94 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Deng, Emily
Sent: Wednesday, May 29, 2019 10:52 AM
To: [email protected]
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferPing......
Best wishes
Emily DengQuoted 49 lines
-----Original Message-----
From: Deng, Emily <[email protected]>
Sent: Tuesday, May 28, 2019 6:14 PM
To: Deng, Emily <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferPing ......
Best wishes
Emily DengQuoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Tuesday, May 28, 2019 4:06 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferAs it will destroy
clear_state_obj, and also will unpin it in thegfx_v9_0_sw_fini, so don't need to callamdgpu_bo_free_kernelingfx_v9_0_sw_fini, or it will have unpin warning.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-4@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev); -amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, - &adev->gfx.rlc.clear_state_gpu_addr, - (void **)&adev->gfx.rlc.cs_ptr); +amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);if (adev->asic_type ==CHIP_RAVEN ) { amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr, --2.7.4
Quoted 4 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
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, May 28, 2019 3:43 PM
To: Deng, Emily <[email protected]>; Quan, Evan <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Don't need to callcsb_vram_unpinAm 28.05.19 um 09:38 schrieb Deng, Emily:
Quoted 4 lines
Quoted 4 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, May 28, 2019 3:04 PM
To: Quan, Evan <[email protected]>; Deng, EmilyQuoted 8 lines
Quoted 7 lines
[email protected]
Subject: Re: [PATCH] drm/amdgpu: Don't need to callcsb_vram_unpinOk in this case the patch is a NAK.
The correct solution is to stop using
amdgpu_bo_free_kernelingfx_v9_0_sw_fini.So we just lead the memory leak here and not destroy the bo? I don't think
it is correct.
Quoted 7 lines
Oh, no. That's not what I meant.
We should stop using
amdgpu_bo_free_kerneland instead useamdgpu_bo_free!Sorry for not being clear here,
Christian.
Thanks for your good suggestion. Will revert this patch, and submit another patch.
Best wishes
Emily Deng
Quoted 12 lines
Quoted 2 lines
Quoted 2 lines
BTW: Are we using the kernel pointer somewhere? Cause that one
became
Quoted 9 lines
Quoted 9 lines
completely invalid because of patch "drm/amdgpu: pin the csb buffer on hw init".
Christian.
Am 28.05.19 um 03:42 schrieb Quan, Evan:
Quoted 3 lines
The original unpin in
hw_finiwas introduced by
https://lists.freedesktop.org/archives/amd-gfx/2018-July/023681.html
Quoted 47 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Evan
Quoted 5 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Monday, May 27, 2019 7:02 PM
To: Deng, Emily <[email protected]>; amd-Quoted 40 lines
Quoted 40 lines
Quoted 23 lines
Quoted 23 lines
Subject: Re: [PATCH] drm/amdgpu: Don't need to call
csb_vram_unpinAm 27.05.19 um 10:41 schrieb Emily Deng:
Quoted 20 lines
As it will destroy
clear_state_obj, and also will unpin it in thegfx_v9_0_sw_fini, so don't need to callcsb_vramunpin ingfx_v9_0_hw_fini, or it will have unpin warning.v2: For suspend, still need to do unpin
Signed-off-by Emily Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0@@ -3395,7 +3395,8 @@ static int gfx_v9_0_hw_fini(void *handle)gfx_v9_0_cp_enable (adev, false); adev->gfx.rlc.funcs->stop (adev);Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_hw_fini(void *handle) · line 3399
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-1-gfx_v9_0_csb_vram_unpin (adev); +if (adev->in_suspend) +gfx_v9_0_csb_vram_unpin (adev);That doesn't looks like a good idea to me.
Why do we have unpin both in the
sw_finias well as thehw_finicodepaths?
Quoted 9 lines
Quoted 9 lines
Regards,
Christian.drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static int gfx_v9_0_hw_fini(void *handle) · line 3401
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0return 0 ; }_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB132656C894105F239387AE948F1F0-Gy0DoCVfaSVaj5rVPFIlogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Christian König
Reviewed-bySorry for the delay, your patch simply got stuck in the daily wave of mails.
Regards,
Christian.
Am 29.05.19 um 05:07 schrieb Deng, Emily:
Quoted 84 lines
Hi Christian,
I have reverted the before change as your suggestion, and sent this new patch, could you help to review this?Best wishes
Emily DengQuoted 76 lines
-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Deng, Emily
Sent: Wednesday, May 29, 2019 10:52 AM
To: [email protected]
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferPing......
Best wishes
Emily DengQuoted 49 lines
-----Original Message-----
From: Deng, Emily <[email protected]>
Sent: Tuesday, May 28, 2019 6:14 PM
To: Deng, Emily <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferPing ......
Best wishes
Emily DengQuoted 36 lines
-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Emily Deng
Sent: Tuesday, May 28, 2019 4:06 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu:Fix the unpin warning about csb bufferAs it will destroy
clear_state_obj, and also will unpin it in thegfx_v9_0_sw_fini, so don't need to callamdgpu_bo_free_kernelingfx_v9_0_sw_fini, or it will have unpin warning.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-4@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev); -amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, - &adev->gfx.rlc.clear_state_gpu_addr, - (void **)&adev->gfx.rlc.cs_ptr); +amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj);if (adev->asic_type ==CHIP_RAVEN ) { amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr, --2.7.4
Quoted 4 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
_______________________________________________
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): 9a23918d-e301-a102-733f-31198495edc9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Deng, Emily
Reviewed-by Christian KönigNo problem. Thanks for your reviewing.
Best wishes
Emily Deng
From: Christian König <[email protected]>
Sent: Wednesday, May 29, 2019 3:54 PM
To: Deng, Emily <[email protected]>; [email protected]; Koenig, Christian <[email protected]>; Quan, Evan <[email protected]>
Subject: Re: [PATCH] drm/amdgpu:Fix the unpin warning about csb buffer
Sorry for the delay, your patch simply got stuck in the daily wave of mails.
Regards,
Christian.
Am 29.05.19 um 05:07 schrieb Deng, Emily:
Hi Christian,
I have reverted the before change as your suggestion, and sent this new patch, could you help to review this?
Best wishes
Emily Deng
-----Original Message-----
From: amd-gfx <[email protected]><mailto:[email protected]> On Behalf Of Deng,
Emily
Sent: Wednesday, May 29, 2019 10:52 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb buffer
Ping......
Best wishes
Emily Deng
-----Original Message-----
From: Deng, Emily <[email protected]><mailto:[email protected]>
Sent: Tuesday, May 28, 2019 6:14 PM
To: Deng, Emily <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>
Subject: RE: [PATCH] drm/amdgpu:Fix the unpin warning about csb buffer
Ping ......
Best wishes
Emily Deng
-----Original Message-----
From: amd-gfx <[email protected]><mailto:[email protected]> On Behalf Of
Emily Deng
Sent: Tuesday, May 28, 2019 4:06 PM
To: [email protected]<mailto:[email protected]>
Subject: [PATCH] drm/amdgpu:Fix the unpin warning about csb buffer
As it will destroy clear_state_obj, and also will unpin it in the
gfx_v9_0_sw_fini, so don't need to call amdgpu_bo_free_kernel in
gfx_v9_0_sw_fini, or it will have unpin warning.
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
(quoted diff) +0 -0
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index c763733..cc5a382 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)
gfx_v9_0_mec_fini(adev);
gfx_v9_0_ngg_fini(adev);- amdgpu_bo_free_kernel(&adev->gfx.rlc.clear_state_obj,
- &adev->gfx.rlc.clear_state_gpu_addr,
- (void **)&adev->gfx.rlc.cs_ptr);
+ amdgpu_bo_unref(&adev->gfx.rlc.clear_state_obj);
if (adev->asic_type == CHIP_RAVEN) {
amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj,
&adev->gfx.rlc.cp_table_gpu_addr,--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx