36 #include <linux/export.h>
51 dev->dma = kzalloc(
sizeof(*dev->dma),
GFP_KERNEL);
56 memset(&dev->dma->bufs[i], 0,
sizeof(dev->dma->bufs[0]));
71 struct drm_device_dma *
dma = dev->dma;
79 if (dma->bufs[i].seg_count) {
80 DRM_DEBUG(
"order %d: buf_count = %d,"
83 dma->bufs[i].buf_count,
84 dma->bufs[i].seg_count);
85 for (j = 0; j < dma->bufs[
i].seg_count; j++) {
86 if (dma->bufs[i].seglist[j]) {
90 kfree(dma->bufs[i].seglist);
92 if (dma->bufs[i].buf_count) {
93 for (j = 0; j < dma->bufs[
i].buf_count; j++) {
94 kfree(dma->bufs[i].buflist[j].dev_private);
96 kfree(dma->bufs[i].buflist);
101 kfree(dma->pagelist);
121 buf->file_priv =
NULL;
133 struct drm_file *file_priv)
135 struct drm_device_dma *
dma = dev->dma;
140 for (i = 0; i < dma->buf_count; i++) {
141 if (dma->buflist[i]->file_priv == file_priv) {
142 switch (dma->buflist[i]->list) {
147 dma->buflist[
i]->list = DRM_LIST_RECLAIM;