diff options
author | Dave Airlie <airlied@redhat.com> | 2009-03-08 22:17:08 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-13 00:24:18 -0400 |
commit | a763d7dc0adb1159c1a52d43e566409da9fa59f0 (patch) | |
tree | 62898c96080193cc849b635e8ef8ae08cac30836 | |
parent | 08932156cc2d4f8807dc5ca5c3d6ccd85080610a (diff) |
drm/radeon: fix r600 pci mapping calls.
This realigns the r600 pci mapping calls with the ati pcigart ones,
fixing the direction and using the correct interface.
Suggested by Jerome Glisse.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index f915f1153b41..be2bba66d5d9 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
@@ -132,8 +132,8 @@ void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info | |||
132 | for (i = 0; i < pages; i++) { | 132 | for (i = 0; i < pages; i++) { |
133 | if (!entry->busaddr[i]) | 133 | if (!entry->busaddr[i]) |
134 | break; | 134 | break; |
135 | pci_unmap_single(dev->pdev, entry->busaddr[i], | 135 | pci_unmap_page(dev->pdev, entry->busaddr[i], |
136 | PAGE_SIZE, PCI_DMA_TODEVICE); | 136 | PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); |
137 | } | 137 | } |
138 | if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) | 138 | if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) |
139 | gart_info->bus_addr = 0; | 139 | gart_info->bus_addr = 0; |
@@ -165,10 +165,10 @@ int r600_page_table_init(struct drm_device *dev) | |||
165 | 165 | ||
166 | gart_idx = 0; | 166 | gart_idx = 0; |
167 | for (i = 0; i < pages; i++) { | 167 | for (i = 0; i < pages; i++) { |
168 | entry->busaddr[i] = pci_map_single(dev->pdev, | 168 | entry->busaddr[i] = pci_map_page(dev->pdev, |
169 | page_address(entry-> | 169 | entry->pagelist[i], 0, |
170 | pagelist[i]), | 170 | PAGE_SIZE, |
171 | PAGE_SIZE, PCI_DMA_TODEVICE); | 171 | PCI_DMA_BIDIRECTIONAL); |
172 | if (entry->busaddr[i] == 0) { | 172 | if (entry->busaddr[i] == 0) { |
173 | DRM_ERROR("unable to map PCIGART pages!\n"); | 173 | DRM_ERROR("unable to map PCIGART pages!\n"); |
174 | r600_page_table_cleanup(dev, gart_info); | 174 | r600_page_table_cleanup(dev, gart_info); |