[03/11] drm/amdgpu/psp: skip loading SDMA/RLCG under SRIOV VF

Submitted by Yu, Xiangliang on April 24, 2017, 6:58 a.m.

Details

Message ID 1493017089-23101-4-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "Enable UVD and PSP loading for SRIOV" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang April 24, 2017, 6:58 a.m.
From: Daniel Wang <Daniel.Wang2@amd.com>

Now GPU hypervisor will load SDMA and RLCG ucode, so skip it
in guest.

Signed-off-by: Daniel Wang <Daniel.Wang2@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 1e380fe..ac5e92e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -289,6 +289,12 @@  static int psp_np_fw_load(struct psp_context *psp)
 		if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC &&
 		    psp_smu_reload_quirk(psp))
 			continue;
+		if (amdgpu_sriov_vf(adev) &&
+		   (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA0
+		    || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1
+		    || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_G))
+			/*skip ucode loading in SRIOV VF */
+			continue;
 
 		ret = psp_prep_cmd_buf(ucode, psp->cmd);
 		if (ret)

Comments

> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Xiangliang Yu

> Sent: Monday, April 24, 2017 2:58 AM

> To: amd-gfx@lists.freedesktop.org

> Cc: Wang, Daniel(Xiaowei); Yu, Xiangliang

> Subject: [PATCH 03/11] drm/amdgpu/psp: skip loading SDMA/RLCG under

> SRIOV VF

> 

> From: Daniel Wang <Daniel.Wang2@amd.com>

> 

> Now GPU hypervisor will load SDMA and RLCG ucode, so skip it

> in guest.

> 

> Signed-off-by: Daniel Wang <Daniel.Wang2@amd.com>

> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>


Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


> ---

>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++

>  1 file changed, 6 insertions(+)

> 

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

> index 1e380fe..ac5e92e 100644

> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

> @@ -289,6 +289,12 @@ static int psp_np_fw_load(struct psp_context *psp)

>  		if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC &&

>  		    psp_smu_reload_quirk(psp))

>  			continue;

> +		if (amdgpu_sriov_vf(adev) &&

> +		   (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA0

> +		    || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1

> +		    || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_G))

> +			/*skip ucode loading in SRIOV VF */

> +			continue;

> 

>  		ret = psp_prep_cmd_buf(ucode, psp->cmd);

>  		if (ret)

> --

> 2.7.4

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx