Lines Matching defs:entry
51 drm_sg_cleanup(drm_device_t *dev, drm_sg_mem_t *entry)
53 int pages = entry->pages;
55 if (entry->busaddr) {
56 kmem_free(entry->busaddr, sizeof (*entry->busaddr) * pages);
57 entry->busaddr = NULL;
60 ASSERT(entry->umem_cookie == NULL);
62 if (entry->dmah_sg) {
63 drm_pci_free(dev, entry->dmah_sg);
64 entry->dmah_sg = NULL;
67 if (entry->dmah_gart) {
68 drm_pci_free(dev, entry->dmah_gart);
69 entry->dmah_gart = NULL;
72 if (entry) {
73 drm_free(entry, sizeof (drm_sg_mem_t), DRM_MEM_SGLISTS);
74 entry = NULL;
84 drm_sg_mem_t *entry;
108 entry = kmem_zalloc(sizeof (*entry), KM_SLEEP);
109 entry->pages = (int)pages;
113 entry->busaddr = (void *)kmem_zalloc(sizeof (*entry->busaddr) *
116 entry->handle = ScatterHandle((unsigned long)dmah->vaddr);
117 entry->virtual = (void *)dmah->vaddr;
118 request.handle = entry->handle;
119 entry->dmah_sg = dmah;
137 drm_sg_cleanup(dev, entry);
140 dev->sg = entry;
146 drm_sg_cleanup(dev, entry);
156 drm_sg_mem_t *entry;
172 entry = dev->sg;
176 if (!entry || entry->handle != request.handle)
179 drm_sg_cleanup(dev, entry);