summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux-core/drm_pci.c b/linux-core/drm_pci.c
index 0d3c8b23..f6e70389 100644
--- a/linux-core/drm_pci.c
+++ b/linux-core/drm_pci.c
@@ -83,7 +83,11 @@ drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
return NULL;
dmah->size = size;
+#if 0
dmah->vaddr = pci_alloc_consistent(dev->pdev, size, &dmah->busaddr);
+#else
+ dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL | __GFP_COMP);
+#endif
#ifdef DRM_DEBUG_MEMORY
if (dmah->vaddr == NULL) {
@@ -151,8 +155,13 @@ void __drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah)
ClearPageReserved(virt_to_page(addr));
}
#endif
+#if 0
pci_free_consistent(dev->pdev, dmah->size, dmah->vaddr,
dmah->busaddr);
+#else
+ dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr,
+ dmah->busaddr);
+#endif
}
#ifdef DRM_DEBUG_MEMORY