File tree Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -1296,6 +1296,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
1296
1296
void amdgpu_device_pci_config_reset (struct amdgpu_device * adev );
1297
1297
int amdgpu_device_pci_reset (struct amdgpu_device * adev );
1298
1298
bool amdgpu_device_need_post (struct amdgpu_device * adev );
1299
+ bool amdgpu_device_pcie_dynamic_switching_supported (void );
1299
1300
bool amdgpu_device_should_use_aspm (struct amdgpu_device * adev );
1300
1301
bool amdgpu_device_aspm_support_quirk (void );
1301
1302
Original file line number Diff line number Diff line change @@ -1458,6 +1458,25 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
1458
1458
return true;
1459
1459
}
1460
1460
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
+
1461
1480
/**
1462
1481
* amdgpu_device_should_use_aspm - check if the device should program ASPM
1463
1482
*
Original file line number Diff line number Diff line change @@ -2425,25 +2425,6 @@ int smu_v13_0_mode1_reset(struct smu_context *smu)
2425
2425
return ret ;
2426
2426
}
2427
2427
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
-
2447
2428
int smu_v13_0_update_pcie_parameters (struct smu_context * smu ,
2448
2429
uint32_t pcie_gen_cap ,
2449
2430
uint32_t pcie_width_cap )
@@ -2455,7 +2436,7 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
2455
2436
uint32_t smu_pcie_arg ;
2456
2437
int ret , i ;
2457
2438
2458
- if (!smu_v13_0_is_pcie_dynamic_switching_supported ()) {
2439
+ if (!amdgpu_device_pcie_dynamic_switching_supported ()) {
2459
2440
if (pcie_table -> pcie_gen [num_of_levels - 1 ] < pcie_gen_cap )
2460
2441
pcie_gen_cap = pcie_table -> pcie_gen [num_of_levels - 1 ];
2461
2442
You can’t perform that action at this time.
0 commit comments