Skip to contentSkip to conversation

drm/amdgpu: bypass RLC init under sriov for Tonga

PATCH In review Tiecheng Zhou 3 participants 4 messages Dec 7, 2018 – Dec 10, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: bypass RLC init under sriov for Tonga

SWDEV-173384: vm-mix reboot (4 VMs) fail on Tonga under sriov

Phenomena: there is compute_1.3.1 ring test fail on one VM
when it starts to do hw_init after it is rebooted

Root cause: RLC will go wrong in soft_reset under sriov

Workaround: init RLC csb, and skip RLC stop, reset, start
this is because GIM has already done full initialization on RLC

refer to 'commit cfee05bc9057 ("drm/amdgpu:bypass RLC init for SRIOV")'

     and 'commit f840cc5f8447 ("drm/amdgpu/sriov:init csb for gfxv9")'
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -0
index 1454fc3..a9c853a 100644
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+	if (amdgpu_sriov(adev)) {
+		gfx_v8_0_init_csb(adev);
+		return 0;
+	}
+
 	adev->gfx.rlc.funcs->stop(adev);
 	adev->gfx.rlc.funcs->reset(adev);
 	gfx_v8_0_init_pg(adev);
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): 1544148709-7256-1-git-send-email-Tiecheng.Zhou-5C7GfCeVMHo@public.gmane.org

#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Tiecheng Zhou <[email protected]>
Sent: Thursday, December 6, 2018 9:11:49 PM
To: [email protected]
Cc: Zhou, Tiecheng
Subject: [PATCH] drm/amdgpu: bypass RLC init under sriov for Tonga

SWDEV-173384: vm-mix reboot (4 VMs) fail on Tonga under sriov

Phenomena: there is compute_1.3.1 ring test fail on one VM
when it starts to do hw_init after it is rebooted

Root cause: RLC will go wrong in soft_reset under sriov

Workaround: init RLC csb, and skip RLC stop, reset, start
this is because GIM has already done full initialization on RLC

refer to 'commit cfee05bc9057 ("drm/amdgpu:bypass RLC init for SRIOV")'

     and 'commit f840cc5f8447 ("drm/amdgpu/sriov:init csb for gfxv9")'
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -0
index 1454fc3..a9c853a 100644
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+       if (amdgpu_sriov(adev)) {
+               gfx_v8_0_init_csb(adev);
+               return 0;
+       }
+
         adev->gfx.rlc.funcs->stop(adev);
         adev->gfx.rlc.funcs->reset(adev);
         gfx_v8_0_init_pg(adev);

--
2.7.4

_______________________________________________
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): BN6PR12MB180903FE05AC850D8D4BFEC9F7AA0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Acked-by Alex Deucher
#4 lore raw

I got this compilation error message after I rebase this morning, do I miss anything?

/home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_rlc_resume’:
/home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4071:6: error: implicit declaration of function ‘amdgpu_sriov’; did you mean ‘amdgpu_sriov_vf’? [-Werror=implicit-function-declaration]

  if (amdgpu_sriov(adev)) {
      ^~~~~~~~~~~~
      amdgpu_sriov_vf

cc1: some warnings being treated as errors
/home/yangp/git/compute_staging/kernel/scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.o' failed make[10]: *** [drivers/gpu/drm/amd/amdgpu/gfx_v8_0.o] Error 1

Philip

On 2018-12-07 10:33 a.m., Deucher, Alexander wrote:

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Tiecheng Zhou <[email protected]><mailto:[email protected]>
Sent: Thursday, December 6, 2018 9:11:49 PM
To: [email protected]<mailto:[email protected]>
Cc: Zhou, Tiecheng
Subject: [PATCH] drm/amdgpu: bypass RLC init under sriov for Tonga

SWDEV-173384: vm-mix reboot (4 VMs) fail on Tonga under sriov

Phenomena: there is compute_1.3.1 ring test fail on one VM
when it starts to do hw_init after it is rebooted

Root cause: RLC will go wrong in soft_reset under sriov

Workaround: init RLC csb, and skip RLC stop, reset, start
this is because GIM has already done full initialization on RLC

refer to 'commit cfee05bc9057 ("drm/amdgpu:bypass RLC init for SRIOV")'

     and 'commit f840cc5f8447 ("drm/amdgpu/sriov:init csb for gfxv9")'
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -0
index 1454fc3..a9c853a 100644
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+       if (amdgpu_sriov(adev)) {
+               gfx_v8_0_init_csb(adev);
+               return 0;
+       }
+
         adev->gfx.rlc.funcs->stop(adev);
         adev->gfx.rlc.funcs->reset(adev);
         gfx_v8_0_init_pg(adev);

--
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]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 18e5b0c7-1d33-a385-38c1-6a14663b9b60-5C7GfCeVMHo@public.gmane.org

Acked-by Alex Deucher
#6 lore raw

Never mind, just saw the patch to fix the typo.

On 2018-12-10 1:07 p.m., Yang, Philip wrote:
I got this compilation error message after I rebase this morning, do I miss anything?

/home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function ‘gfx_v8_0_rlc_resume’:
/home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4071:6: error: implicit declaration of function ‘amdgpu_sriov’; did you mean ‘amdgpu_sriov_vf’? [-Werror=implicit-function-declaration]

  if (amdgpu_sriov(adev)) {
      ^~~~~~~~~~~~
      amdgpu_sriov_vf

cc1: some warnings being treated as errors
/home/yangp/git/compute_staging/kernel/scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.o' failed make[10]: *** [drivers/gpu/drm/amd/amdgpu/gfx_v8_0.o] Error 1

Philip

On 2018-12-07 10:33 a.m., Deucher, Alexander wrote:

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org><mailto:[email protected]> on behalf of Tiecheng Zhou <[email protected]><mailto:[email protected]>
Sent: Thursday, December 6, 2018 9:11:49 PM
To: [email protected]<mailto:[email protected]>
Cc: Zhou, Tiecheng
Subject: [PATCH] drm/amdgpu: bypass RLC init under sriov for Tonga

SWDEV-173384: vm-mix reboot (4 VMs) fail on Tonga under sriov

Phenomena: there is compute_1.3.1 ring test fail on one VM
when it starts to do hw_init after it is rebooted

Root cause: RLC will go wrong in soft_reset under sriov

Workaround: init RLC csb, and skip RLC stop, reset, start
this is because GIM has already done full initialization on RLC

refer to 'commit cfee05bc9057 ("drm/amdgpu:bypass RLC init for SRIOV")'

     and 'commit f840cc5f8447 ("drm/amdgpu/sriov:init csb for gfxv9")'
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -0
index 1454fc3..a9c853a 100644
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_device *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+       if (amdgpu_sriov(adev)) {
+               gfx_v8_0_init_csb(adev);
+               return 0;
+       }
+
         adev->gfx.rlc.funcs->stop(adev);
         adev->gfx.rlc.funcs->reset(adev);
         gfx_v8_0_init_pg(adev);

--
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