summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r300.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-02-18 20:24:28 +0000
committerDave Airlie <airlied@redhat.com>2010-02-23 09:48:56 +1000
commitaa5120d2ef228042416d3023fb7eda9ee487dcf9 (patch)
tree802a097e3d3b18f91113f47f02bbd091b9409698 /drivers/gpu/drm/radeon/r300.c
parent08ff2a7a7a13c562e81a406722193f43cbb4e4ef (diff)
drm/radeon/kms: implement reading active PCIE lanes on R600+
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r--drivers/gpu/drm/radeon/r300.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index b188aae764c..dc32cd13a83 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -554,7 +554,10 @@ int rv370_get_pcie_lanes(struct radeon_device *rdev)
/* FIXME wait for idle */
- link_width_cntl = RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
+ if (rdev->family < CHIP_R600)
+ link_width_cntl = RREG32_PCIE(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
+ else
+ link_width_cntl = RREG32_PCIE_P(RADEON_PCIE_LC_LINK_WIDTH_CNTL);
switch ((link_width_cntl & RADEON_PCIE_LC_LINK_WIDTH_RD_MASK) >> RADEON_PCIE_LC_LINK_WIDTH_RD_SHIFT) {
case RADEON_PCIE_LC_LINK_WIDTH_X0: