Lines Matching defs:dma
397 drm_device_dma_t *dma = dev->dma;
411 if (!dma)
425 entry = &dma->bufs[order];
444 buf->idx = dma->buf_count + entry->buf_count;
449 buf->offset = (dma->byte_count + offset);
471 (dma->buf_count + entry->buf_count) * sizeof (*dma->buflist),
481 bcopy(temp_buflist, dma->buflist,
482 dma->buf_count * sizeof (*dma->buflist));
483 kmem_free(dma->buflist, dma->buf_count *sizeof (*dma->buflist));
484 dma->buflist = temp_buflist;
487 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
490 dma->buf_count += entry->buf_count;
491 dma->byte_count += byte_count;
492 dma->seg_count += entry->seg_count;
493 dma->page_count += byte_count >> PAGE_SHIFT;
498 dma->flags = _DRM_DMA_USE_AGP;
506 drm_device_dma_t *dma = dev->dma;
530 entry = &dma->bufs[order];
544 buf->idx = dma->buf_count + entry->buf_count;
549 buf->offset = (dma->byte_count + offset);
571 temp_buflist = drm_realloc(dma->buflist,
572 dma->buf_count * sizeof (*dma->buflist),
573 (dma->buf_count + entry->buf_count)
574 * sizeof (*dma->buflist), DRM_MEM_BUFS);
579 dma->buflist = temp_buflist;
582 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
585 dma->buf_count += entry->buf_count;
586 dma->byte_count += byte_count;
589 dma->flags = _DRM_DMA_USE_SG;
618 if (dev->dma->bufs[order].buf_count != 0) {
655 if (dev->dma->bufs[order].buf_count != 0) {
718 drm_device_dma_t *dma = dev->dma;
742 if (idx < 0 || idx >= dma->buf_count) {
744 idx, dma->buf_count - 1);
748 buf = dma->buflist[idx];
784 drm_device_dma_t *dma = dev->dma;
809 if (request.count < dma->buf_count)
812 if ((dev->driver->use_agp && (dma->flags & _DRM_DMA_USE_AGP)) ||
813 (dev->driver->use_sg && (dma->flags & _DRM_DMA_USE_SG))) {
820 size = round_page(dma->byte_count);
834 for (i = 0; i < dma->buf_count; i++) {
836 &dma->buflist[i]->idx, sizeof (list32[0].idx))) {
840 &dma->buflist[i]->total,
848 address32 = vaddr + dma->buflist[i]->offset; /* *** */
859 for (i = 0; i < dma->buf_count; i++) {
861 &dma->buflist[i]->idx, sizeof (request.list[0].idx))) {
865 &dma->buflist[i]->total, sizeof (request.list[0].total))) {
872 address = vaddr + dma->buflist[i]->offset; /* *** */
884 request32.count = dma->buf_count;
890 request.count = dma->buf_count;