[PATCH] drm/amdgpu: Restrict PSP OS version read to PF

Zhang, Hawking Hawking.Zhang at amd.com
Thu Oct 12 05:53:54 UTC 2023


[AMD Official Use Only - General]

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

Regards,
Hawking
-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar at amd.com>
Sent: Thursday, October 12, 2023 13:51
To: amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu: Restrict PSP OS version read to PF

Only physical function can read PSP OS version register on PSP v13.x SOCs.

Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
index 1997260a8156..96ea64e1bf37 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c
@@ -280,6 +280,9 @@ static inline void psp_v13_0_init_sos_version(struct psp_context *psp)  {
        struct amdgpu_device *adev = psp->adev;

+       if (amdgpu_sriov_vf(adev))
+               return;
+
        psp->sos.fw_version = RREG32_SOC15(MP0, 0, regMP0_SMN_C2PMSG_58);  }

--
2.25.1



More information about the amd-gfx mailing list