summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-09 11:03:36 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-03-09 11:03:36 -0400
commitf80b83278fde794defd556807c5408e67bd39e7e (patch)
tree4176eaebf4205ddb2767663a76b16f0159c8a917
parentcee25efa7deabaf15501e15e0b05c8bd345fda89 (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> pulled in from drm-next
-rw-r--r--shared-core/r600_cp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/shared-core/r600_cp.c b/shared-core/r600_cp.c
index 8fb128c3..d273ea70 100644
--- a/shared-core/r600_cp.c
+++ b/shared-core/r600_cp.c
@@ -448,8 +448,8 @@ void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
for (i = 0; i < pages; i++) {
if (!entry->busaddr[i])
break;
- pci_unmap_single(dev->pdev, entry->busaddr[i],
- PAGE_SIZE, PCI_DMA_TODEVICE);
+ pci_unmap_page(dev->pdev, entry->busaddr[i],
+ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
}
#endif
if (gart_info->gart_table_location == DRM_ATI_GART_MAIN)
@@ -481,10 +481,9 @@ int r600_page_table_init(struct drm_device *dev)
for (i = 0; i < pages; i++) {
#ifdef __linux__
- entry->busaddr[i] = pci_map_single(dev->pdev,
- page_address(entry->
- pagelist[i]),
- PAGE_SIZE, PCI_DMA_TODEVICE);
+ entry->busaddr[i] = pci_map_page(dev->pdev,
+ entry->pagelist[i], 0,
+ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
if (entry->busaddr[i] == 0) {
DRM_ERROR("unable to map PCIGART pages!\n");
r600_page_table_cleanup(dev, gart_info);