diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-07-31 18:09:42 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 05:11:11 +1000 |
commit | fd1496a0fc77f955317d6ca511f66a9e788e7e02 (patch) | |
tree | 131727e8c03885892c16e0c69f3f5064ca041b98 /drivers/gpu/drm/nouveau/core/engine/device | |
parent | 3967633d2bb16cdb77e81f1b71020b7264cf0553 (diff) | |
download | op-kernel-dev-fd1496a0fc77f955317d6ca511f66a9e788e7e02.zip op-kernel-dev-fd1496a0fc77f955317d6ca511f66a9e788e7e02.tar.gz |
drm/nouveau: map pages using DMA API
The DMA API is the recommended way to map pages no matter what the
underlying bus is. Use the DMA functions for page mapping and remove
currently existing wrappers.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/device')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/base.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c index 466dda2..6c16dab 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c @@ -487,31 +487,6 @@ nv_device_resource_len(struct nouveau_device *device, unsigned int bar) } } -dma_addr_t -nv_device_map_page(struct nouveau_device *device, struct page *page) -{ - dma_addr_t ret; - - if (nv_device_is_pci(device)) { - ret = pci_map_page(device->pdev, page, 0, PAGE_SIZE, - PCI_DMA_BIDIRECTIONAL); - if (pci_dma_mapping_error(device->pdev, ret)) - ret = 0; - } else { - ret = page_to_phys(page); - } - - return ret; -} - -void -nv_device_unmap_page(struct nouveau_device *device, dma_addr_t addr) -{ - if (nv_device_is_pci(device)) - pci_unmap_page(device->pdev, addr, PAGE_SIZE, - PCI_DMA_BIDIRECTIONAL); -} - int nv_device_get_irq(struct nouveau_device *device, bool stall) { |