aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_device.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-12-18 21:24:37 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-06-25 17:50:23 -0400
commitefad86db4ed09cb144bedf9fc69ae6233713f544 (patch)
tree61102ebb8f5811e3480c37e95a5ef5a1d0e29fa2 /drivers/gpu/drm/radeon/radeon_device.c
parente282917ca31b4af213ac9e220fabaebde0791898 (diff)
drm/radeon: adapt to PCI BAR changes on CIK
register BAR is now at PCI BAR 5. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index c24056b4af7b..4e97ff79b7f0 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1148,8 +1148,13 @@ int radeon_device_init(struct radeon_device *rdev,
1148 /* Registers mapping */ 1148 /* Registers mapping */
1149 /* TODO: block userspace mapping of io register */ 1149 /* TODO: block userspace mapping of io register */
1150 spin_lock_init(&rdev->mmio_idx_lock); 1150 spin_lock_init(&rdev->mmio_idx_lock);
1151 rdev->rmmio_base = pci_resource_start(rdev->pdev, 2); 1151 if (rdev->family >= CHIP_BONAIRE) {
1152 rdev->rmmio_size = pci_resource_len(rdev->pdev, 2); 1152 rdev->rmmio_base = pci_resource_start(rdev->pdev, 5);
1153 rdev->rmmio_size = pci_resource_len(rdev->pdev, 5);
1154 } else {
1155 rdev->rmmio_base = pci_resource_start(rdev->pdev, 2);
1156 rdev->rmmio_size = pci_resource_len(rdev->pdev, 2);
1157 }
1153 rdev->rmmio = ioremap(rdev->rmmio_base, rdev->rmmio_size); 1158 rdev->rmmio = ioremap(rdev->rmmio_base, rdev->rmmio_size);
1154 if (rdev->rmmio == NULL) { 1159 if (rdev->rmmio == NULL) {
1155 return -ENOMEM; 1160 return -ENOMEM;