Commit 349af06a authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher
Browse files

drm/amd: Fix initialization mistake for NBIO 7.11 devices



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

Cc: stable@vger.kernel.org
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20241118174611.10700-2-mario.limonciello@amd.com


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 902fbbf4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -275,6 +275,15 @@ static void nbio_v7_11_init_registers(struct amdgpu_device *adev)
	if (def != data)
		WREG32_SOC15(NBIO, 0, regBIF_BIF256_CI256_RC3X4_USB4_PCIE_MST_CTRL_3, data);

	switch (adev->ip_versions[NBIO_HWIP][0]) {
	case IP_VERSION(7, 11, 0):
	case IP_VERSION(7, 11, 1):
	case IP_VERSION(7, 11, 2):
	case IP_VERSION(7, 11, 3):
		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_11_update_medium_grain_clock_gating(struct amdgpu_device *adev,