|
@@ -4631,8 +4631,6 @@ static void r600_pcie_gen2_enable(struct radeon_device *rdev)
|
|
{
|
|
{
|
|
u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp;
|
|
u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp;
|
|
u16 link_cntl2;
|
|
u16 link_cntl2;
|
|
- u32 mask;
|
|
|
|
- int ret;
|
|
|
|
|
|
|
|
if (radeon_pcie_gen2 == 0)
|
|
if (radeon_pcie_gen2 == 0)
|
|
return;
|
|
return;
|
|
@@ -4651,11 +4649,8 @@ static void r600_pcie_gen2_enable(struct radeon_device *rdev)
|
|
if (rdev->family <= CHIP_R600)
|
|
if (rdev->family <= CHIP_R600)
|
|
return;
|
|
return;
|
|
|
|
|
|
- ret = drm_pcie_get_speed_cap_mask(rdev->ddev, &mask);
|
|
|
|
- if (ret != 0)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- if (!(mask & DRM_PCIE_SPEED_50))
|
|
|
|
|
|
+ if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) &&
|
|
|
|
+ (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT))
|
|
return;
|
|
return;
|
|
|
|
|
|
speed_cntl = RREG32_PCIE_PORT(PCIE_LC_SPEED_CNTL);
|
|
speed_cntl = RREG32_PCIE_PORT(PCIE_LC_SPEED_CNTL);
|