Lines Matching defs:dma

540 	struct drm_device_dma *dma = dev->dma;
555 if (!dma)
590 entry = &dma->bufs[order];
618 buf->idx = dma->buf_count + entry->buf_count;
623 buf->offset = (dma->byte_count + offset);
652 (dma->buf_count + entry->buf_count) *
653 sizeof(*dma->buflist), GFP_KERNEL);
661 bcopy(temp_buflist, dma->buflist,
662 dma->buf_count * sizeof (*dma->buflist));
663 kmem_free(dma->buflist, dma->buf_count *sizeof (*dma->buflist));
664 dma->buflist = temp_buflist;
667 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
670 dma->buf_count += entry->buf_count;
671 dma->seg_count += entry->seg_count;
672 dma->page_count += byte_count >> PAGE_SHIFT;
673 dma->byte_count += byte_count;
675 DRM_DEBUG("dma->buf_count : %d\n", dma->buf_count);
683 dma->flags = _DRM_DMA_USE_AGP;
691 struct drm_device_dma *dma = dev->dma;
709 if (!dma)
747 entry = &dma->bufs[order];
776 buf->idx = dma->buf_count + entry->buf_count;
781 buf->offset = (dma->byte_count + offset);
810 temp_buflist = drm_realloc(dma->buflist,
811 dma->buf_count * sizeof (*dma->buflist),
812 (dma->buf_count + entry->buf_count)
813 * sizeof (*dma->buflist), DRM_MEM_BUFS);
821 dma->buflist = temp_buflist;
824 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
827 dma->buf_count += entry->buf_count;
828 dma->byte_count += byte_count;
830 DRM_DEBUG("dma->buf_count : %d\n", dma->buf_count);
838 dma->flags = _DRM_DMA_USE_SG;
896 struct drm_device_dma *dma = dev->dma;
904 if (!dma)
916 if (dma->bufs[i].buf_count)
924 if (dma->bufs[i].buf_count) {
927 struct drm_buf_entry *from = &dma->bufs[i];
928 struct drm_freelist *list = &dma->bufs[i].freelist;
945 dma->bufs[i].buf_count,
946 dma->bufs[i].buf_size,
947 dma->bufs[i].freelist.low_mark,
948 dma->bufs[i].freelist.high_mark);
975 struct drm_device_dma *dma = dev->dma;
983 if (!dma)
991 entry = &dma->bufs[order];
1019 struct drm_device_dma *dma = dev->dma;
1028 if (!dma)
1035 if (idx < 0 || idx >= dma->buf_count) {
1037 idx, dma->buf_count - 1);
1040 buf = dma->buflist[idx];
1069 struct drm_device_dma *dma = dev->dma;
1086 if (!dma)
1097 if (request->count >= dma->buf_count) {
1098 if ((drm_core_has_AGP(dev) && (dma->flags & _DRM_DMA_USE_AGP))
1100 && (dma->flags & _DRM_DMA_USE_SG))) {
1110 size = round_page(dma->byte_count);
1126 for (i = 0; i < dma->buf_count; i++) {
1128 &dma->buflist[i]->idx,
1134 &dma->buflist[i]->total,
1144 address32 = virtual + dma->buflist[i]->offset; /* *** */
1153 for (i = 0; i < dma->buf_count; i++) {
1155 &dma->buflist[i]->idx,
1161 &dma->buflist[i]->total,
1171 address = virtual + dma->buflist[i]->offset; /* *** */
1184 request->count = dma->buf_count;