Skip to contentSkip to conversation

drm/amd: Fix initialization mistake for NBIO 7.7.0

PATCH In review Mario Limonciello 2 participants 2 messages Nov 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Fix initialization mistake for NBIO 7.7.0

From: Vijendar Mukunda <[email protected]>

There is a strapping issue on NBIO 7.7.0 that can lead to spurious PME events while in the D0 state.

---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +6 -0
index fb37e354a9d5..1ac730328516 100644
@@ -247,6 +247,12 @@ static void nbio_v7_7_init_registers(struct amdgpu_device *adev)
 	if (def != data)
 		WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data);
 
+	switch (adev->ip_versions[NBIO_HWIP][0]) {
+	case IP_VERSION(7, 7, 0):
+		data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23);
+		WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data);
+		break;
+	}
 }
 
 static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *adev,
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Mario Limonciello

From: Vijendar Mukunda <[email protected]>

There is a strapping issue on NBIO 7.7.0 that can lead to spurious PME events while in the D0 state.

Quoted 24 lines
---
 drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +6 -1
index fb37e354a9d5..1ac730328516 100644
@@ -247,6 +247,12 @@ static void nbio_v7_7_init_registers(struct amdgpu_device *adev)
        if (def != data)
                WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data);
 
+       switch (adev->ip_versions[NBIO_HWIP][0]) {
+       case IP_VERSION(7, 7, 0):
+               data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23);
+               WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data);
+               break;
+       }
 }
 
 static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *adev,
--

2.34.1