diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-10-05 10:02:57 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-10 04:11:31 -0400 |
commit | 005a83f1412f4405694d08e95836bbdd88ea0109 (patch) | |
tree | 5783421089ed0cebf435625e9179bd04802c8ab9 /drivers/gpu/drm/radeon/radeon_device.c | |
parent | c245cb9e15055ed5dcf7eaf29232badb0059fdc1 (diff) |
drm/radeon/kms: set DMA mask properly on newer PCI asics
If a card wasn't PCIE, we always set the DMA mask to 32 bits.
This is only applies to the old rage128/r1xx gart block on
early radeon asics (~r1xx-r4xx). Newer PCI and IGP cards
can handle 40 bits just fine.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Chen Jie <chenj@lemote.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_device.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 31b1f4bf133e..cc695d05bd2b 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -750,14 +750,15 @@ int radeon_device_init(struct radeon_device *rdev, | |||
750 | 750 | ||
751 | /* set DMA mask + need_dma32 flags. | 751 | /* set DMA mask + need_dma32 flags. |
752 | * PCIE - can handle 40-bits. | 752 | * PCIE - can handle 40-bits. |
753 | * IGP - can handle 40-bits (in theory) | 753 | * IGP - can handle 40-bits |
754 | * AGP - generally dma32 is safest | 754 | * AGP - generally dma32 is safest |
755 | * PCI - only dma32 | 755 | * PCI - dma32 for legacy pci gart, 40 bits on newer asics |
756 | */ | 756 | */ |
757 | rdev->need_dma32 = false; | 757 | rdev->need_dma32 = false; |
758 | if (rdev->flags & RADEON_IS_AGP) | 758 | if (rdev->flags & RADEON_IS_AGP) |
759 | rdev->need_dma32 = true; | 759 | rdev->need_dma32 = true; |
760 | if (rdev->flags & RADEON_IS_PCI) | 760 | if ((rdev->flags & RADEON_IS_PCI) && |
761 | (rdev->family < CHIP_RS400)) | ||
761 | rdev->need_dma32 = true; | 762 | rdev->need_dma32 = true; |
762 | 763 | ||
763 | dma_bits = rdev->need_dma32 ? 32 : 40; | 764 | dma_bits = rdev->need_dma32 ? 32 : 40; |