diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1989-drm-amdgpu-skip-fw-pri-bo-alloc-for-SRIOV.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1989-drm-amdgpu-skip-fw-pri-bo-alloc-for-SRIOV.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1989-drm-amdgpu-skip-fw-pri-bo-alloc-for-SRIOV.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1989-drm-amdgpu-skip-fw-pri-bo-alloc-for-SRIOV.patch new file mode 100644 index 00000000..65386c88 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1989-drm-amdgpu-skip-fw-pri-bo-alloc-for-SRIOV.patch @@ -0,0 +1,53 @@ +From 4ee2bd4df70df8b92de5273bbaf49d7512876ed4 Mon Sep 17 00:00:00 2001 +From: Yintian Tao <yttao@amd.com> +Date: Thu, 16 May 2019 13:07:26 +0800 +Subject: [PATCH 1989/2940] drm/amdgpu: skip fw pri bo alloc for SRIOV +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +PSP fw primary buffer is not used under SRIOV. +Under SRIOV, VBIOS or hypervisor driver will load psp +sos and psp sysdrv. 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@amd.com> +Signed-off-by: Monk Liu <Monk.Liu@amd.com> +Acked-by: Christian König <christian.koenig@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 9faa31fb8537..2bf1b6908b7f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +@@ -908,13 +908,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, +-- +2.17.1 + |