diff options
author | Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> | 2013-05-03 18:43:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-05-29 12:36:12 -0400 |
commit | 7e0e41963740525af702bb23edede8ae9afc4ac0 (patch) | |
tree | b26034a6a42ea58d952f87e83e51c5e55d653d1c /drivers/gpu/drm/radeon/r600.c | |
parent | 50a583f64bfe53aae4996965c1d1b25d90ce4f64 (diff) |
radeon: use max_bus_speed to activate gen2 speeds
radeon currently uses a drm function to get the speed capabilities for
the bus, drm_pcie_get_speed_cap_mask. However, this is a non-standard
method of performing this detection and this patch changes it to use
the max_bus_speed attribute.
From: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 1a08008c978b..b45e64848677 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -4631,8 +4631,6 @@ static void r600_pcie_gen2_enable(struct radeon_device *rdev) | |||
4631 | { | 4631 | { |
4632 | u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp; | 4632 | u32 link_width_cntl, lanes, speed_cntl, training_cntl, tmp; |
4633 | u16 link_cntl2; | 4633 | u16 link_cntl2; |
4634 | u32 mask; | ||
4635 | int ret; | ||
4636 | 4634 | ||
4637 | if (radeon_pcie_gen2 == 0) | 4635 | if (radeon_pcie_gen2 == 0) |
4638 | return; | 4636 | return; |
@@ -4651,11 +4649,8 @@ static void r600_pcie_gen2_enable(struct radeon_device *rdev) | |||
4651 | if (rdev->family <= CHIP_R600) | 4649 | if (rdev->family <= CHIP_R600) |
4652 | return; | 4650 | return; |
4653 | 4651 | ||
4654 | ret = drm_pcie_get_speed_cap_mask(rdev->ddev, &mask); | 4652 | if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) && |
4655 | if (ret != 0) | 4653 | (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT)) |
4656 | return; | ||
4657 | |||
4658 | if (!(mask & DRM_PCIE_SPEED_50)) | ||
4659 | return; | 4654 | return; |
4660 | 4655 | ||
4661 | speed_cntl = RREG32_PCIE_PORT(PCIE_LC_SPEED_CNTL); | 4656 | speed_cntl = RREG32_PCIE_PORT(PCIE_LC_SPEED_CNTL); |