Commit d97de3d1 authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Wen Zhiwei
Browse files

drm/amd: Fix initialization mistake for NBIO 7.7.0

stable inclusion
from stable-v6.6.63
commit 5e91cd9a34171171c83d462256626c6a8deec2a0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBI1RP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5e91cd9a34171171c83d462256626c6a8deec2a0



--------------------------------

commit 7013a8268d311fded6c7a6528fc1de82668e75f6 upstream.

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

Co-developed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20241112161142.28974-1-mario.limonciello@amd.com


Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 447a54a0f79c9a409ceaa17804bdd2e0206397b9)
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 2adffd22
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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,