From: "Yang, Philip" Subject: Re: [PATCH] drm/amdgpu: bypass RLC init under sriov for Tonga Date: Mon, 10 Dec 2018 18:14:11 +0000 Message-ID: <61d18282-a793-9ede-7b38-5778722cf44e@amd.com> References: <1544148709-7256-1-git-send-email-Tiecheng.Zhou@amd.com> <18e5b0c7-1d33-a385-38c1-6a14663b9b60@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1138096839==" Return-path: In-Reply-To: <18e5b0c7-1d33-a385-38c1-6a14663b9b60-5C7GfCeVMHo@public.gmane.org> Content-Language: en-US List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: "Deucher, Alexander" , "Zhou, Tiecheng" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" --===============1138096839== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_61d18282a7939ede7b385778722cf44eamdcom_" --_000_61d18282a7939ede7b385778722cf44eamdcom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable 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 =91gfx_v8_0_rlc_resume=92: /home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.= c:4071:6: error: implicit declaration of function =91amdgpu_sriov=92; did y= ou mean =91amdgpu_sriov_vf=92? [-Werror=3Dimplicit-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 f= or 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: Acked-by: Alex Deucher ________________________________ From: amd-gfx on behalf of Tiecheng Zhou = Sent: Thursday, December 6, 2018 9:11:49 PM To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org 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")' Signed-off-by: Tiecehng Zhou --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/am= dgpu/gfx_v8_0.c index 1454fc3..a9c853a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -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 amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx --_000_61d18282a7939ede7b385778722cf44eamdcom_ Content-Type: text/html; charset="Windows-1252" Content-ID: <62ED1B4207829E4E92882284BA0D6B8F-asWib9pRmPqcE4WynfumptQqCkab/8FMAL8bYrjMMd8@public.gmane.org> Content-Transfer-Encoding: quoted-printable
Never mind, just saw the patch to fix the ty= po.

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 =91gfx_v8_0_rlc_resume=92:
/home/yangp/git/compute_staging/kernel/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.= c:4071:6: error: implicit declaration of function =91amdgpu_sriov=92; did y= ou mean =91amdgpu_sriov_vf=92? [-Werror=3Dimplicit-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 f= or 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> on behalf of Tiecheng Zho= u <Tiecheng.Zhou-5C7GfCeVMHo@public.gmane.org>
Sent: Thursday, December 6, 2018 9:11:49 PM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
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 ini= tialization on RLC

refer to 'commit cfee05bc9057 ("drm/amdgpu:bypass RLC init for SRIOV&q= uot;)'
     and 'commit f840cc5f8447 ("drm/amdgpu/sriov:i= nit csb for gfxv9")'

Signed-off-by: Tiecehng Zhou <Tiecheng.Zhou-5C7GfCeVMHo@public.gmane.org>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++  1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/am= dgpu/gfx_v8_0.c
index 1454fc3..a9c853a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4068,6 +4068,11 @@ static void gfx_v8_0_rlc_start(struct amdgpu_dev= ice *adev)
 
 static int gfx_v8_0_rlc_resume(struct amdgpu_device *adev)
 {
+       if (amdgpu_sriov(adev)) {
+           &nbs= p;   gfx_v8_0_init_csb(adev);
+           &nbs= p;   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
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx=

____________________________________=
___________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.=
org/mailman/listinfo/amd-gfx


____________________________________=
___________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-=
gfx

--_000_61d18282a7939ede7b385778722cf44eamdcom_-- --===============1138096839== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYW1kLWdmeCBt YWlsaW5nIGxpc3QKYW1kLWdmeEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9hbWQtZ2Z4Cg== --===============1138096839==--