Lines Matching refs:dmah
44 drm_dma_handle_t *dmah; in drm_pci_alloc() local
55 dmah = kmalloc(sizeof(drm_dma_handle_t), GFP_KERNEL); in drm_pci_alloc()
56 if (!dmah) in drm_pci_alloc()
59 dmah->size = size; in drm_pci_alloc()
60 dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL | __GFP_COMP); in drm_pci_alloc()
62 if (dmah->vaddr == NULL) { in drm_pci_alloc()
63 kfree(dmah); in drm_pci_alloc()
67 memset(dmah->vaddr, 0, size); in drm_pci_alloc()
71 for (addr = (unsigned long)dmah->vaddr, sz = size; in drm_pci_alloc()
76 return dmah; in drm_pci_alloc()
86 void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) in __drm_legacy_pci_free() argument
91 if (dmah->vaddr) { in __drm_legacy_pci_free()
94 for (addr = (unsigned long)dmah->vaddr, sz = dmah->size; in __drm_legacy_pci_free()
98 dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr, in __drm_legacy_pci_free()
99 dmah->busaddr); in __drm_legacy_pci_free()
108 void drm_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) in drm_pci_free() argument
110 __drm_legacy_pci_free(dev, dmah); in drm_pci_free()
111 kfree(dmah); in drm_pci_free()