Lines Matching refs:dmah
48 drm_dma_handle_t *dmah; in drm_pci_alloc() local
59 dmah = kmalloc(sizeof(drm_dma_handle_t), GFP_KERNEL); in drm_pci_alloc()
60 if (!dmah) in drm_pci_alloc()
63 dmah->size = size; in drm_pci_alloc()
64 dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL | __GFP_COMP); in drm_pci_alloc()
66 if (dmah->vaddr == NULL) { in drm_pci_alloc()
67 kfree(dmah); in drm_pci_alloc()
71 memset(dmah->vaddr, 0, size); in drm_pci_alloc()
75 for (addr = (unsigned long)dmah->vaddr, sz = size; in drm_pci_alloc()
80 return dmah; in drm_pci_alloc()
90 void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) in __drm_legacy_pci_free() argument
95 if (dmah->vaddr) { in __drm_legacy_pci_free()
98 for (addr = (unsigned long)dmah->vaddr, sz = dmah->size; in __drm_legacy_pci_free()
102 dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr, in __drm_legacy_pci_free()
103 dmah->busaddr); in __drm_legacy_pci_free()
115 void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) in drm_pci_free() argument
117 __drm_legacy_pci_free(dev, dmah); in drm_pci_free()
118 kfree(dmah); in drm_pci_free()