Skip to contentSkip to conversation

drm/amdgpu: Restrict PSP OS version read to PF

PATCH In review Lijo Lazar 2 participants 3 messages Oct 12, 2023

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

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

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

---
 drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +3 -0
index 1997260a8156..96ea64e1bf37 100644
@@ -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);
 }
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Regards,
Hawking
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Thursday, October 12, 2023 13:51
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>
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.

---
 drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +3 -1
index 1997260a8156..96ea64e1bf37 100644
@@ -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

#2 lore raw
In reply to Lijo Lazar

[AMD Official Use Only - General]

Please ignore this patch as tOS is not loaded on VF and hence the path is not taken.

Thanks,
Lijo

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Lijo Lazar
Sent: Thursday, October 12, 2023 11:21 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
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.

---
 drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +3 -1
index 1997260a8156..96ea64e1bf37 100644
@@ -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