<html>
<head>
<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>
</head>
<body dir="ltr">
<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 face="Calibri, sans-serif" style="font-size:11pt" 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; amd-gfx@lists.freedesktop.org<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 <christian.koenig@amd.com>.<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 <yttao@amd.com><br>
> Sent: Thursday, May 16, 2019 7:54 PM<br>
> To: amd-gfx@lists.freedesktop.org<br>
> Cc: Tao, Yintian <Yintian.Tao@amd.com>; Liu, Monk <Monk.Liu@amd.com><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 <yttao@amd.com><br>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com><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>
</body>
</html>