Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: vi: disable ASPM on Intel Alder Lake based systems

Active State Power Management (ASPM) feature is enabled since kernel 5.14.
There are some AMD Volcanic Islands (VI) GFX cards, such as the WX3200 and
RX640, that do not work with ASPM-enabled Intel Alder Lake based systems.
Using these GFX cards as video/display output, Intel Alder Lake based
systems will freeze after suspend/resume.

The issue was originally reported on one system (Dell Precision 3660 with
BIOS version 0.14.81), but was later confirmed to affect at least 4
pre-production Alder Lake based systems.

Add an extra check to disable ASPM on Intel Alder Lake based systems with
the problematic AMD Volcanic Islands GFX cards.

Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885
Signed-off-by: Richard Gong <richard.gong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Richard Gong and committed by
Alex Deucher
e02fe3bc d54762cc

+16 -1
+16 -1
drivers/gpu/drm/amd/amdgpu/vi.c
··· 81 81 #include "mxgpu_vi.h" 82 82 #include "amdgpu_dm.h" 83 83 84 + #if IS_ENABLED(CONFIG_X86) 85 + #include <asm/intel-family.h> 86 + #endif 87 + 84 88 #define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6 85 89 #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L 86 90 #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 0x00000002L ··· 1138 1134 WREG32_PCIE(ixPCIE_LC_CNTL, data); 1139 1135 } 1140 1136 1137 + static bool aspm_support_quirk_check(void) 1138 + { 1139 + #if IS_ENABLED(CONFIG_X86) 1140 + struct cpuinfo_x86 *c = &cpu_data(0); 1141 + 1142 + return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); 1143 + #else 1144 + return true; 1145 + #endif 1146 + } 1147 + 1141 1148 static void vi_program_aspm(struct amdgpu_device *adev) 1142 1149 { 1143 1150 u32 data, data1, orig; 1144 1151 bool bL1SS = false; 1145 1152 bool bClkReqSupport = true; 1146 1153 1147 - if (!amdgpu_device_should_use_aspm(adev)) 1154 + if (!amdgpu_device_should_use_aspm(adev) || !aspm_support_quirk_check()) 1148 1155 return; 1149 1156 1150 1157 if (adev->flags & AMD_IS_APU ||