AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Zhu, Rex" <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>,
	Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP module
Date: Fri, 9 Mar 2018 19:29:37 +0100	[thread overview]
Message-ID: <afc56834-ab09-ebdf-9292-d4a46915c1ca@gmail.com> (raw)
In-Reply-To: <CY4PR12MB1687AD7E1DEB313C60E836CFFBDE0-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 6913 bytes --]

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 
> <mailto: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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
>>     <mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex
>>     Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> <mailto:alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>     *Sent:* Friday, March 9, 2018 4:54 AM
>>     *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>>     <mailto: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>
>>     <mailto: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 <mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
>>     https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>     <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
>>     amd-gfx Info Page - freedesktop.org
>>     <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
>>     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
>>     <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
>>     lists.freedesktop.org <http://lists.freedesktop.org>
>>     Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the
>>     following form. Use of all freedesktop.org
>>     <http://freedesktop.org> lists is subject to our Code of ...
>>     www <http://freedesktop.org/>
>>     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 <mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
>>     https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>     <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
>>     amd-gfx Info Page - freedesktop.org
>>     <https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
>>     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


[-- Attachment #1.2: Type: text/html, Size: 45944 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

      parent reply	other threads:[~2018-03-09 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 20:54 [PATCH 1/2] drm/amdgpu/psp: add a few more fw load type checks Alex Deucher
     [not found] ` <20180308205409.3203-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-03-08 20:54   ` [PATCH 2/2] drm/amdgpu/soc15: always load the psp IP module Alex Deucher
     [not found]     ` <20180308205409.3203-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-03-09  5:10       ` Zhu, Rex
     [not found]         ` <CY4PR12MB1687F2F0D4288F02D750C755FBDE0-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-03-09  7:45           ` Christian König
     [not found]             ` <b6999bc4-1fae-c293-42f4-2929b08d1821-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-09 17:02               ` Alex Deucher
     [not found]                 ` <CADnq5_PK5K5OYG4HVxKa1wCk-MxtJNaxH83HF9F7RzxkaXai_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-09 17:53                   ` Zhu, Rex
     [not found]                     ` <CY4PR12MB1687AD7E1DEB313C60E836CFFBDE0-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-03-09 18:29                       ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afc56834-ab09-ebdf-9292-d4a46915c1ca@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=Rex.Zhu-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox