From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Re: [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP module Date: Fri, 9 Mar 2018 19:29:37 +0100 Message-ID: References: <20180308205409.3203-1-alexander.deucher@amd.com> <20180308205409.3203-2-alexander.deucher@amd.com> Reply-To: christian.koenig-5C7GfCeVMHo@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1411126611==" Return-path: In-Reply-To: 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: "Zhu, Rex" , Alex Deucher , "Koenig, Christian" Cc: "Deucher, Alexander" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" This is a multi-part message in MIME format. --===============1411126611== Content-Type: multipart/alternative; boundary="------------10832BEB1699915F84D59FE2" Content-Language: en-US This is a multi-part message in MIME format. --------------10832BEB1699915F84D59FE2 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit That still leaves us with the issue that we need the PSP for the GPU reset independent if it is used for firmware loading or not. Additional to that the PSP is present in the hardware no matter if we use it or not. So I think we should always at least add it. Regards, Christian. Am 09.03.2018 um 18:53 schrieb Zhu, Rex: > >  >I also don't really like the fact that we use the module parameter > directly to determine whether to load the >PSP module or not, we > should be using adev->firmware.load_type, but that doesn't get set > until later. > > > we can move function amdgpu_ucode_get_load_type to > amdgpu_check_arguments(adev); > adev->firmware.load_type will be set. > > >The problem with checking the module parameter is that that param is > gobal so if you you have multiple >GPUs, you may get messed up. > > if user set the load type through module parameters, it is valid for > all gpu. > > Best Regards > Rex > > > ------------------------------------------------------------------------ > *From:* Alex Deucher > *Sent:* Saturday, March 10, 2018 1:02 AM > *To:* Koenig, Christian > *Cc:* Zhu, Rex; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; Deucher, Alexander > *Subject:* Re: [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP > module > On Fri, Mar 9, 2018 at 2:45 AM, Christian König > > wrote: > > Hi Rex, > > I think still initializing the PSP even when you don't need it for > firmware upload sounds like a good idea to me. > > But take that with a grain of salt since I really on don't know > that part of the hardware so well. > > > Right.  We need PSP for GPU resets among other things.  I also don't > really like the fact that we use the module parameter directly to > determine whether to load the PSP module or not, we should be using > adev->firmware.load_type, but that doesn't get set until later.  We > should probably just move that earlier in the common code rather than > having it in the soc files.  The problem with checking the module > parameter is that that param is gobal so if you you have multiple > GPUs, you may get messed up. > > Alex > > > Christian. > > > Am 09.03.2018 um 06:10 schrieb Zhu, Rex: >> >> Hi Alex, >> >> >> How about keep the firmware type checking in set_ip_blocks. >> >> and remove the same check code in psp module. >> >> also no need to change load type if psp load firmware failed in >> psp module. >> >> >> Please review the attached patch. >> >> >> Best Regards >> >> Rex >> >> ------------------------------------------------------------------------ >> *From:* amd-gfx >> on behalf of Alex >> Deucher >> *Sent:* Friday, March 9, 2018 4:54 AM >> *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org >> >> *Cc:* Deucher, Alexander >> *Subject:* [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP >> module >> We already handle the firmware loading type checks in the >> psp module directly, no need for an additional check. >> >> Signed-off-by: Alex Deucher >> >> --- >>  drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +-- >>  1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c >> b/drivers/gpu/drm/amd/amdgpu/soc15.c >> index 8dc8b72ed49b..ecf58a68cf66 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c >> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c >> @@ -531,8 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device >> *adev) >> amdgpu_device_ip_block_add(adev, &vega10_common_ip_block); >> amdgpu_device_ip_block_add(adev, &gmc_v9_0_ip_block); >> amdgpu_device_ip_block_add(adev, &vega10_ih_ip_block); >> -               if (amdgpu_fw_load_type == 2 || >> amdgpu_fw_load_type == -1) >> - amdgpu_device_ip_block_add(adev, &psp_v3_1_ip_block); >> + amdgpu_device_ip_block_add(adev, &psp_v3_1_ip_block); >>                  if (!amdgpu_sriov_vf(adev)) >> amdgpu_device_ip_block_add(adev, &amdgpu_pp_ip_block); >>                  if (adev->enable_virtual_display || >> amdgpu_sriov_vf(adev)) >> -- >> 2.13.6 >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> >> amd-gfx Info Page - freedesktop.org >> >> lists.freedesktop.org >> Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the >> following form. Use of all freedesktop.org lists is subject to >> our Code of ... >> >> >> amd-gfx Info Page - freedesktop.org >> >> lists.freedesktop.org >> Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the >> following form. Use of all freedesktop.org >> lists is subject to our Code of ... >> www >> freedesktop.org >> Welcome to freedesktop.org. freedesktop.org is open source / open >> discussion software projects working on interoperability and >> shared technology for X Window System ... >> >> >> >> >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> >> amd-gfx Info Page - freedesktop.org >> >> lists.freedesktop.org >> Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the >> following form. Use of all freedesktop.org lists is subject to >> our Code of ... >> >> > > > > > _______________________________________________ > amd-gfx mailing list > amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx --------------10832BEB1699915F84D59FE2 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
That still leaves us with the issue that we need the PSP for the GPU reset independent if it is used for firmware loading or not.

Additional to that the PSP is present in the hardware no matter if we use it or not. So I think we should always at least add it.

Regards,
Christian.

Am 09.03.2018 um 18:53 schrieb Zhu, Rex:

 >I also don't really like the fact that we use the module parameter directly to determine whether to load the >PSP module or not, we should be using adev->firmware.load_type, but that doesn't get set until later.


we can move function amdgpu_ucode_get_load_type to amdgpu_check_arguments(adev);
adev->firmware.load_type will be set.

>The problem with checking the module parameter is that that param is gobal so if you you have multiple >GPUs, you may get messed up.

if user set the load type through module parameters, it is valid for all gpu.

 
Best Regards
Rex



From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent: Saturday, March 10, 2018 1:02 AM
To: Koenig, Christian
Cc: Zhu, Rex; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; Deucher, Alexander
Subject: Re: [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP module
 
On Fri, Mar 9, 2018 at 2:45 AM, Christian König <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Rex,

I think still initializing the PSP even when you don't need it for firmware upload sounds like a good idea to me.

But take that with a grain of salt since I really on don't know that part of the hardware so well.

Right.  We need PSP for GPU resets among other things.  I also don't really like the fact that we use the module parameter directly to determine whether to load the PSP module or not, we should be using adev->firmware.load_type, but that doesn't get set until later.  We should probably just move that earlier in the common code rather than having it in the soc files.  The problem with checking the module parameter is that that param is gobal so if you you have multiple GPUs, you may get messed up.

Alex

 

Christian.


Am 09.03.2018 um 06:10 schrieb Zhu, Rex:

Hi Alex,


How about keep the firmware type checking in set_ip_blocks.

and remove the same check code in psp module.

also no need to change load type if psp load firmware failed in psp module.


Please review the attached patch.


Best Regards

Rex


From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent: Friday, March 9, 2018 4:54 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander
Subject: [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP module
 
We already handle the firmware loading type checks in the
psp module directly, no need for an additional check.

Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 8dc8b72ed49b..ecf58a68cf66 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -531,8 +531,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)
                 amdgpu_device_ip_block_add(adev, &vega10_common_ip_block);
                 amdgpu_device_ip_block_add(adev, &gmc_v9_0_ip_block);
                 amdgpu_device_ip_block_add(adev, &vega10_ih_ip_block);
-               if (amdgpu_fw_load_type == 2 || amdgpu_fw_load_type == -1)
-                       amdgpu_device_ip_block_add(adev, &psp_v3_1_ip_block);
+               amdgpu_device_ip_block_add(adev, &psp_v3_1_ip_block);
                 if (!amdgpu_sriov_vf(adev))
                         amdgpu_device_ip_block_add(adev, &amdgpu_pp_ip_block);
                 if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
--
2.13.6

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

Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...




_______________________________________________
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

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