Lines Matching refs:dma
311 drm_device_dma_t *dma = dev->dma; in DRM() local
327 if ( !dma ) return -EINVAL; in DRM()
365 entry = &dma->bufs[order]; in DRM()
394 buf->idx = dma->buf_count + entry->buf_count; in DRM()
399 buf->offset = (dma->byte_count + offset); in DRM()
434 temp_buflist = DRM(realloc)( dma->buflist, in DRM()
435 dma->buf_count * sizeof(*dma->buflist), in DRM()
436 (dma->buf_count + entry->buf_count) in DRM()
437 * sizeof(*dma->buflist), in DRM()
446 dma->buflist = temp_buflist; in DRM()
449 dma->buflist[i + dma->buf_count] = &entry->buflist[i]; in DRM()
452 dma->buf_count += entry->buf_count; in DRM()
453 dma->byte_count += byte_count; in DRM()
455 DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); in DRM()
472 dma->flags = _DRM_DMA_USE_AGP; in DRM()
485 drm_device_dma_t *dma = dev->dma; in DRM() local
503 if ( !dma ) return -EINVAL; in DRM()
534 entry = &dma->bufs[order]; in DRM()
568 temp_pagelist = DRM(realloc)( dma->pagelist, in DRM()
569 dma->page_count * sizeof(*dma->pagelist), in DRM()
570 (dma->page_count + (count << page_order)) in DRM()
571 * sizeof(*dma->pagelist), in DRM()
585 dma->pagelist = temp_pagelist; in DRM()
587 dma->page_count + (count << page_order) ); in DRM()
600 dma->page_count + page_count, in DRM()
602 dma->pagelist[dma->page_count + page_count++] in DRM()
609 buf->idx = dma->buf_count + entry->buf_count; in DRM()
613 buf->offset = (dma->byte_count + byte_count + offset); in DRM()
632 temp_buflist = DRM(realloc)( dma->buflist, in DRM()
633 dma->buf_count * sizeof(*dma->buflist), in DRM()
634 (dma->buf_count + entry->buf_count) in DRM()
635 * sizeof(*dma->buflist), in DRM()
644 dma->buflist = temp_buflist; in DRM()
647 dma->buflist[i + dma->buf_count] = &entry->buflist[i]; in DRM()
650 dma->buf_count += entry->buf_count; in DRM()
651 dma->seg_count += entry->seg_count; in DRM()
652 dma->page_count += entry->seg_count << page_order; in DRM()
653 dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order); in DRM()
681 drm_device_dma_t *dma = dev->dma; in DRM() local
697 if ( !dma ) return -EINVAL; in DRM()
735 entry = &dma->bufs[order]; in DRM()
764 buf->idx = dma->buf_count + entry->buf_count; in DRM()
769 buf->offset = (dma->byte_count + offset); in DRM()
808 temp_buflist = DRM(realloc)( dma->buflist, in DRM()
809 dma->buf_count * sizeof(*dma->buflist), in DRM()
810 (dma->buf_count + entry->buf_count) in DRM()
811 * sizeof(*dma->buflist), in DRM()
820 dma->buflist = temp_buflist; in DRM()
823 dma->buflist[i + dma->buf_count] = &entry->buflist[i]; in DRM()
826 dma->buf_count += entry->buf_count; in DRM()
827 dma->byte_count += byte_count; in DRM()
829 DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count ); in DRM()
846 dma->flags = _DRM_DMA_USE_SG; in DRM()
884 drm_device_dma_t *dma = dev->dma; in DRM() local
889 if ( !dma ) return -EINVAL; in DRM()
905 if ( dma->bufs[i].buf_count ) ++count; in DRM()
912 if ( dma->bufs[i].buf_count ) { in DRM()
914 drm_buf_entry_t *from = &dma->bufs[i]; in DRM()
915 drm_freelist_t *list = &dma->bufs[i].freelist; in DRM()
932 dma->bufs[i].buf_count, in DRM()
933 dma->bufs[i].buf_size, in DRM()
934 dma->bufs[i].freelist.low_mark, in DRM()
935 dma->bufs[i].freelist.high_mark ); in DRM()
955 drm_device_dma_t *dma = dev->dma; in DRM() local
960 if ( !dma ) return -EINVAL; in DRM()
971 entry = &dma->bufs[order]; in DRM()
989 drm_device_dma_t *dma = dev->dma; in DRM() local
995 if ( !dma ) return -EINVAL; in DRM()
1008 if ( idx < 0 || idx >= dma->buf_count ) { in DRM()
1010 idx, dma->buf_count - 1 ); in DRM()
1013 buf = dma->buflist[idx]; in DRM()
1030 drm_device_dma_t *dma = dev->dma; in DRM() local
1038 if ( !dma ) return -EINVAL; in DRM()
1052 if ( request.count >= dma->buf_count ) { in DRM()
1053 if ( (__HAVE_AGP && (dma->flags & _DRM_DMA_USE_AGP)) || in DRM()
1054 (__HAVE_SG && (dma->flags & _DRM_DMA_USE_SG)) ) { in DRM()
1070 virtual = do_mmap( filp, 0, dma->byte_count, in DRM()
1082 for ( i = 0 ; i < dma->buf_count ; i++ ) { in DRM()
1084 &dma->buflist[i]->idx, in DRM()
1090 &dma->buflist[i]->total, in DRM()
1101 address = virtual + dma->buflist[i]->offset; /* *** */ in DRM()
1111 request.count = dma->buf_count; in DRM()