AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Tao, Yintian" <Yintian.Tao-5C7GfCeVMHo@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
Cc: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: 答复: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV
Date: Fri, 17 May 2019 09:20:54 +0200	[thread overview]
Message-ID: <0f307e3d-3f5f-3766-6db8-e51ab6c2562e@gmail.com> (raw)
In-Reply-To: <MN2PR12MB30390AB5467D6A7080AD45C6E50B0-rweVpJHSKTr/fpeVZQY9RQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>


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

Hi Yintian,

please add this as a code comment to the patch.

Christian.

Am 17.05.19 um 09:17 schrieb Tao, Yintian:
>
> Hi  Christian
>
>
> Many thanks for your review.
>
>
> The background is that this bo is to let psp load sos and sysdrv but 
> under sriov, sos and sysdrv is loaded by VBIOS or hypervisor driver.
>
>
> The reason why not let guest driver to load it under SRIOV is that it 
> is not safe.
>
>
>
> Best Regards
>
> Yintian Tao
>
> ------------------------------------------------------------------------
> *发件人:* Koenig, Christian
> *发送时间:* 2019年5月17日 14:53:35
> *收件人:* Tao, Yintian
> *抄送:* Liu, Monk; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> *主题:* Re: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV
> Looks good to me now, but I don't know the technical background why this
> BO is not needed under SRIOV.
>
> So this patch is Acked-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>.
>
> Regards,
> Christian.
>
> Am 17.05.19 um 04:41 schrieb Tao, Yintian:
> > Hi Christian
> >
> >
> > I have modified it according to your suggestion. Can you help review 
> this again? Thanks in advance.
> >
> >
> > Best Regards
> > Yintian Tao
> >
> > -----Original Message-----
> > From: Yintian Tao <yttao-5C7GfCeVMHo@public.gmane.org>
> > Sent: Thursday, May 16, 2019 7:54 PM
> > To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> > Cc: Tao, Yintian <Yintian.Tao-5C7GfCeVMHo@public.gmane.org>; Liu, Monk <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
> > Subject: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV
> >
> > PSP fw primary buffer is not used under SRIOV.
> > Therefore, we don't need to allocate memory for it.
> >
> > v2: remove superfluous check for amdgpu_bo_free_kernel().
> >
> > Signed-off-by: Yintian Tao <yttao-5C7GfCeVMHo@public.gmane.org>
> > Signed-off-by: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 ++++++++++-------
> >   1 file changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > index c567a55..af9835c 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> > @@ -905,13 +905,16 @@ static int psp_load_fw(struct amdgpu_device *adev)
> >        if (!psp->cmd)
> >                return -ENOMEM;
> >
> > -     ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG, PSP_1_MEG,
> > - AMDGPU_GEM_DOMAIN_GTT,
> > - &psp->fw_pri_bo,
> > - &psp->fw_pri_mc_addr,
> > - &psp->fw_pri_buf);
> > -     if (ret)
> > -             goto failed;
> > +     /* this fw pri bo is not used under SRIOV */
> > +     if (!amdgpu_sriov_vf(psp->adev)) {
> > +             ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG, PSP_1_MEG,
> > + AMDGPU_GEM_DOMAIN_GTT,
> > + &psp->fw_pri_bo,
> > + &psp->fw_pri_mc_addr,
> > + &psp->fw_pri_buf);
> > +             if (ret)
> > +                     goto failed;
> > +     }
> >
> >        ret = amdgpu_bo_create_kernel(adev, PSP_FENCE_BUFFER_SIZE, 
> PAGE_SIZE,
> > AMDGPU_GEM_DOMAIN_VRAM,
>
>
> _______________________________________________
> 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: 8636 bytes --]

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

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

  parent reply	other threads:[~2019-05-17  7:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 11:53 [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV Yintian Tao
     [not found] ` <1558007618-24482-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org>
2019-05-17  2:41   ` Tao, Yintian
     [not found]     ` <MN2PR12MB3039EAC37D6BB17BD3582D77E50B0-rweVpJHSKTr/fpeVZQY9RQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-05-17  6:53       ` Koenig, Christian
     [not found]         ` <f77131be-9a53-789d-0f1e-c743c80dc11a-5C7GfCeVMHo@public.gmane.org>
2019-05-17  7:17           ` 答复: " Tao, Yintian
     [not found]             ` <MN2PR12MB30390AB5467D6A7080AD45C6E50B0-rweVpJHSKTr/fpeVZQY9RQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-05-17  7:20               ` Christian König [this message]
     [not found]                 ` <0f307e3d-3f5f-3766-6db8-e51ab6c2562e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-05-17  7:23                   ` 答复: " Tao, Yintian
2019-05-17 10:19               ` Liu, Monk

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=0f307e3d-3f5f-3766-6db8-e51ab6c2562e@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=Yintian.Tao-5C7GfCeVMHo@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