drm/amdgpu: fix GFX10 missing CSIB set
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -3
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amdgpu: should stop GFX ring in hw_fini
To align with the scheme from gfx9:
without disabling gfx ring in hw_fini we would
hit GFX hang if a guest VM is destroyed suddenly
when running a game
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -3809,6 +3809,7 @@ static int gfx_v10_0_hw_fini(void *handle)if (amdgpu_gfx_disable_kcq (adev))DRM_ERROR ("KCQ disable failed\n" );if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_cp_gfx_enable (adev, false);pr_debug ("For SRIOV client, shouldn't do anything.\n" );return 0 ; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/2] drm/amdgpu: should stop GFX ring in hw_fini
Sorry, the description of " without disabling gfx ring in hw_fini we would hit GFX hang if a guest VM is destroyed suddenly when running a game" is not correct
Will send another one.
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Monk Liu <[email protected]>
Sent: Friday, November 29, 2019 4:24 PM
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: should stop GFX ring in hw_fini
To align with the scheme from gfx9:
without disabling gfx ring in hw_fini we would hit GFX hang if a guest VM is destroyed suddenly when running a game
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -3809,6 +3809,7 @@ static int gfx_v10_0_hw_fini(void *handle)if (amdgpu_gfx_disable_kcq (adev))DRM_ERROR ("KCQ disable failed\n" );if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_cp_gfx_enable (adev, false);pr_debug ("For SRIOV client, shouldn't do anything.\n" );return 0 ; }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
I don't think you need to introduce SRIOV specific path here. The gfx_v10_0_init_pg should be good enough to cover both bare-metal and virtualization case.
You can drop the tlb flush in that function if that's your major concern.
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -4
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086&sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, there are more jobs in init_pg(), so in the future I'd expect there will be More lines come into init_pg() on gfx10 and by that time I need to modify init_pg() ,
So IMHO the best way is use init_csb() from the beginning
Thanks
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk <[email protected]>; [email protected]
Cc: Liu, Monk <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
I don't think you need to introduce SRIOV specific path here. The gfx_v10_0_init_pg should be good enough to cover both bare-metal and virtualization case.
You can drop the tlb flush in that function if that's your major concern.
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -4
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086&sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need driver to be involved anymore. So the legacy programing for gfx_idle_threshold.etc will not be applied to gfx10.
More aggressively, let's drop gfx_v10_0_init_pg and just init csb.
Regards,
Hawking
-----Original Message-----
From: Liu, Monk <[email protected]>
Sent: 2019年11月29日 16:47
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, there are more jobs in init_pg(), so in the future I'd expect there will be More lines come into init_pg() on gfx10 and by that time I need to modify init_pg() ,
So IMHO the best way is use init_csb() from the beginning
Thanks
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk <[email protected]>; [email protected]
Cc: Liu, Monk <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
I don't think you need to introduce SRIOV specific path here. The gfx_v10_0_init_pg should be good enough to cover both bare-metal and virtualization case.
You can drop the tlb flush in that function if that's your major concern.
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -4
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086&sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
BTW, Please also make the change for backdoor loading code path as we need that for further ASIC bring up. Thanks.
Regards,
Hawking
-----Original Message-----
From: Zhang, Hawking
Sent: 2019年11月29日 17:08
To: Liu, Monk <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need driver to be involved anymore. So the legacy programing for gfx_idle_threshold.etc will not be applied to gfx10.
More aggressively, let's drop gfx_v10_0_init_pg and just init csb.
Regards,
Hawking
-----Original Message-----
From: Liu, Monk <[email protected]>
Sent: 2019年11月29日 16:47
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, there are more jobs in init_pg(), so in the future I'd expect there will be More lines come into init_pg() on gfx10 and by that time I need to modify init_pg() ,
So IMHO the best way is use init_csb() from the beginning
Thanks
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk <[email protected]>; [email protected]
Cc: Liu, Monk <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
I don't think you need to introduce SRIOV specific path here. The gfx_v10_0_init_pg should be good enough to cover both bare-metal and virtualization case.
You can drop the tlb flush in that function if that's your major concern.
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -4
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086&sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Do you mean the code path of " if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) " , if so already handled
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, November 29, 2019 5:22 PM
To: Liu, Monk <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Public Use]
BTW, Please also make the change for backdoor loading code path as we need that for further ASIC bring up. Thanks.
Regards,
Hawking
-----Original Message-----
From: Zhang, Hawking
Sent: 2019年11月29日 17:08
To: Liu, Monk <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need driver to be involved anymore. So the legacy programing for gfx_idle_threshold.etc will not be applied to gfx10.
More aggressively, let's drop gfx_v10_0_init_pg and just init csb.
Regards,
Hawking
-----Original Message-----
From: Liu, Monk <[email protected]>
Sent: 2019年11月29日 16:47
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, there are more jobs in init_pg(), so in the future I'd expect there will be More lines come into init_pg() on gfx10 and by that time I need to modify init_pg() ,
So IMHO the best way is use init_csb() from the beginning
Thanks
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk <[email protected]>; [email protected]
Cc: Liu, Monk <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
[AMD Official Use Only - Internal Distribution Only]
I don't think you need to introduce SRIOV specific path here. The gfx_v10_0_init_pg should be good enough to cover both bare-metal and virtualization case.
You can drop the tlb flush in that function if that's your major concern.
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set
still need to init csb even for SRIOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -4
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev) {int r; -if (amdgpu_sriov_vf (adev)) -return 0 ; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { r =gfx_v10_0_wait_for_rlc_autoload_complete (adev);if (r)return r; +if (amdgpu_sriov_vf (adev)) { +gfx_v10_0_init_csb (adev); +return 0 ; + } + r =gfx_v10_0_init_pg (adev);if (r)return r; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086&sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx