<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Yintian,<br>
      <br>
      please add this as a code comment to the patch.<br>
      <br>
      Christian.<br>
      <br>
      Am 17.05.19 um 09:17 schrieb Tao, Yintian:<br>
    </div>
    <blockquote type="cite"
cite="mid:MN2PR12MB30390AB5467D6A7080AD45C6E50B0@MN2PR12MB3039.namprd12.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p style="margin-top:0;margin-bottom:0">Hi  Christian</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">Many thanks for your
          review.</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">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.</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">The reason why not let
          guest driver to load it under SRIOV is that it is not safe.</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">Best Regards</p>
        <p style="margin-top:0;margin-bottom:0">Yintian Tao</p>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>发件人:</b> Koenig,
          Christian<br>
          <b>发送时间:</b> 2019年5月17日 14:53:35<br>
          <b>收件人:</b> Tao, Yintian<br>
          <b>抄送:</b> Liu, Monk; <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
          <b>主题:</b> Re: [PATCH] drm/amdgpu: skip fw pri bo alloc for
          SRIOV</font>
        <div> </div>
      </div>
      <div class="BodyFragment"><font size="2"><span
            style="font-size:11pt;">
            <div class="PlainText">Looks good to me now, but I don't
              know the technical background why this
              <br>
              BO is not needed under SRIOV.<br>
              <br>
              So this patch is Acked-by: Christian König
              <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a>.<br>
              <br>
              Regards,<br>
              Christian.<br>
              <br>
              Am 17.05.19 um 04:41 schrieb Tao, Yintian:<br>
              > Hi Christian<br>
              ><br>
              ><br>
              > I have modified it according to your suggestion. Can
              you help review this again? Thanks in advance.<br>
              ><br>
              ><br>
              > Best Regards<br>
              > Yintian Tao<br>
              ><br>
              > -----Original Message-----<br>
              > From: Yintian Tao <a class="moz-txt-link-rfc2396E" href="mailto:yttao@amd.com"><yttao@amd.com></a><br>
              > Sent: Thursday, May 16, 2019 7:54 PM<br>
              > To: <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
              > Cc: Tao, Yintian <a class="moz-txt-link-rfc2396E" href="mailto:Yintian.Tao@amd.com"><Yintian.Tao@amd.com></a>; Liu,
              Monk <a class="moz-txt-link-rfc2396E" href="mailto:Monk.Liu@amd.com"><Monk.Liu@amd.com></a><br>
              > Subject: [PATCH] drm/amdgpu: skip fw pri bo alloc for
              SRIOV<br>
              ><br>
              > PSP fw primary buffer is not used under SRIOV.<br>
              > Therefore, we don't need to allocate memory for it.<br>
              ><br>
              > v2: remove superfluous check for
              amdgpu_bo_free_kernel().<br>
              ><br>
              > Signed-off-by: Yintian Tao <a class="moz-txt-link-rfc2396E" href="mailto:yttao@amd.com"><yttao@amd.com></a><br>
              > Signed-off-by: Monk Liu <a class="moz-txt-link-rfc2396E" href="mailto:Monk.Liu@amd.com"><Monk.Liu@amd.com></a><br>
              > ---<br>
              >   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17
              ++++++++++-------<br>
              >   1 file changed, 10 insertions(+), 7 deletions(-)<br>
              ><br>
              > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
              b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
              > index c567a55..af9835c 100644<br>
              > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
              > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
              > @@ -905,13 +905,16 @@ static int psp_load_fw(struct
              amdgpu_device *adev)<br>
              >        if (!psp->cmd)<br>
              >                return -ENOMEM;<br>
              >   <br>
              > -     ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG,
              PSP_1_MEG,<br>
              > -                                    
              AMDGPU_GEM_DOMAIN_GTT,<br>
              > -                                    
              &psp->fw_pri_bo,<br>
              > -                                    
              &psp->fw_pri_mc_addr,<br>
              > -                                    
              &psp->fw_pri_buf);<br>
              > -     if (ret)<br>
              > -             goto failed;<br>
              > +     /* this fw pri bo is not used under SRIOV */<br>
              > +     if (!amdgpu_sriov_vf(psp->adev)) {<br>
              > +             ret = amdgpu_bo_create_kernel(adev,
              PSP_1_MEG, PSP_1_MEG,<br>
              > +                                          
              AMDGPU_GEM_DOMAIN_GTT,<br>
              > +                                          
              &psp->fw_pri_bo,<br>
              > +                                          
              &psp->fw_pri_mc_addr,<br>
              > +                                          
              &psp->fw_pri_buf);<br>
              > +             if (ret)<br>
              > +                     goto failed;<br>
              > +     }<br>
              >   <br>
              >        ret = amdgpu_bo_create_kernel(adev,
              PSP_FENCE_BUFFER_SIZE, PAGE_SIZE,<br>
              >                                       
              AMDGPU_GEM_DOMAIN_VRAM,<br>
              <br>
            </div>
          </span></font></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></pre>
    </blockquote>
    <br>
  </body>
</html>