File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1296,6 +1296,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
12961296void amdgpu_device_pci_config_reset (struct amdgpu_device * adev );
12971297int amdgpu_device_pci_reset (struct amdgpu_device * adev );
12981298bool amdgpu_device_need_post (struct amdgpu_device * adev );
1299+ bool amdgpu_device_pcie_dynamic_switching_supported (void );
12991300bool amdgpu_device_should_use_aspm (struct amdgpu_device * adev );
13001301bool amdgpu_device_aspm_support_quirk (void );
13011302
Original file line number Diff line number Diff line change @@ -1458,6 +1458,25 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
14581458 return true;
14591459}
14601460
1461+ /*
1462+ * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
1463+ * speed switching. Until we have confirmation from Intel that a specific host
1464+ * supports it, it's safer that we keep it disabled for all.
1465+ *
1466+ * https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/
1467+ * https://gitlab.freedesktop.org/drm/amd/-/issues/2663
1468+ */
1469+ bool amdgpu_device_pcie_dynamic_switching_supported (void )
1470+ {
1471+ #if IS_ENABLED (CONFIG_X86 )
1472+ struct cpuinfo_x86 * c = & cpu_data (0 );
1473+
1474+ if (c -> x86_vendor == X86_VENDOR_INTEL )
1475+ return false;
1476+ #endif
1477+ return true;
1478+ }
1479+
14611480/**
14621481 * amdgpu_device_should_use_aspm - check if the device should program ASPM
14631482 *
Original file line number Diff line number Diff line change @@ -2425,25 +2425,6 @@ int smu_v13_0_mode1_reset(struct smu_context *smu)
24252425 return ret ;
24262426}
24272427
2428- /*
2429- * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
2430- * speed switching. Until we have confirmation from Intel that a specific host
2431- * supports it, it's safer that we keep it disabled for all.
2432- *
2433- * https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/
2434- * https://gitlab.freedesktop.org/drm/amd/-/issues/2663
2435- */
2436- static bool smu_v13_0_is_pcie_dynamic_switching_supported (void )
2437- {
2438- #if IS_ENABLED (CONFIG_X86 )
2439- struct cpuinfo_x86 * c = & cpu_data (0 );
2440-
2441- if (c -> x86_vendor == X86_VENDOR_INTEL )
2442- return false;
2443- #endif
2444- return true;
2445- }
2446-
24472428int smu_v13_0_update_pcie_parameters (struct smu_context * smu ,
24482429 uint32_t pcie_gen_cap ,
24492430 uint32_t pcie_width_cap )
@@ -2455,7 +2436,7 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
24552436 uint32_t smu_pcie_arg ;
24562437 int ret , i ;
24572438
2458- if (!smu_v13_0_is_pcie_dynamic_switching_supported ()) {
2439+ if (!amdgpu_device_pcie_dynamic_switching_supported ()) {
24592440 if (pcie_table -> pcie_gen [num_of_levels - 1 ] < pcie_gen_cap )
24602441 pcie_gen_cap = pcie_table -> pcie_gen [num_of_levels - 1 ];
24612442
You can’t perform that action at this time.
0 commit comments