From: Dave Airlie <airl...@redhat.com>

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 <airl...@redhat.com>
---
 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 f915f11..be2bba6 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
                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);
                }
                if (gart_info->gart_table_location == DRM_ATI_GART_MAIN)
                        gart_info->bus_addr = 0;
@@ -165,10 +165,10 @@ int r600_page_table_init(struct drm_device *dev)
 
        gart_idx = 0;
        for (i = 0; i < pages; i++) {
-               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);
-- 
1.6.0.6


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to