Lines Matching refs:entry
55 drm_sg_cleanup(drm_device_t *dev, drm_sg_mem_t *entry)
57 int pages = entry->pages;
59 if (entry->busaddr) {
60 kmem_free(entry->busaddr, sizeof (*entry->busaddr) * pages);
61 entry->busaddr = NULL;
64 ASSERT(entry->umem_cookie == NULL);
66 if (entry->dmah_sg) {
67 drm_pci_free(dev, entry->dmah_sg);
68 entry->dmah_sg = NULL;
71 if (entry->dmah_gart) {
72 drm_pci_free(dev, entry->dmah_gart);
73 entry->dmah_gart = NULL;
76 if (entry) {
77 drm_free(entry, sizeof (drm_sg_mem_t), DRM_MEM_SGLISTS);
78 entry = NULL;
88 drm_sg_mem_t *entry;
112 entry = kmem_zalloc(sizeof (*entry), KM_SLEEP);
113 entry->pages = (int)pages;
117 entry->busaddr = (void *)kmem_zalloc(sizeof (*entry->busaddr) *
120 entry->handle = ScatterHandle((unsigned long)dmah->vaddr);
121 entry->virtual = (void *)dmah->vaddr;
122 request.handle = entry->handle;
123 entry->dmah_sg = dmah;
141 drm_sg_cleanup(dev, entry);
144 dev->sg = entry;
150 drm_sg_cleanup(dev, entry);
160 drm_sg_mem_t *entry;
176 entry = dev->sg;
180 if (!entry || entry->handle != request.handle)
183 drm_sg_cleanup(dev, entry);