答复: 答复: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV
Tao, Yintian
Yintian.Tao at amd.com
Fri May 17 07:23:22 UTC 2019
Hi Chrisitian
Yes, of course. Thanks for your reminder.
Best Regards
Yintian Tao
________________________________
发件人: Christian König <ckoenig.leichtzumerken at gmail.com>
发送时间: 2019年5月17日 15:20:54
收件人: Tao, Yintian; Koenig, Christian
抄送: amd-gfx at lists.freedesktop.org; Liu, Monk
主题: Re: 答复: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV
[CAUTION: External Email]
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 at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.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 at amd.com><mailto:christian.koenig at amd.com>.
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 at amd.com><mailto:yttao at amd.com>
> Sent: Thursday, May 16, 2019 7:54 PM
> To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
> Cc: Tao, Yintian <Yintian.Tao at amd.com><mailto:Yintian.Tao at amd.com>; Liu, Monk <Monk.Liu at amd.com><mailto:Monk.Liu at amd.com>
> 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 at amd.com><mailto:yttao at amd.com>
> Signed-off-by: Monk Liu <Monk.Liu at amd.com><mailto:Monk.Liu at amd.com>
> ---
> 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 at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190517/dc05530f/attachment-0001.html>
More information about the amd-gfx
mailing list