Lines Matching refs:entry
60 struct drm_map_list *entry;
61 list_for_each_entry(entry, struct drm_map_list, &dev->maplist, head) {
69 if (!entry->map ||
70 map->type != entry->map->type ||
71 entry->master != dev->primary->master)
77 return entry;
80 if ((entry->map->offset & 0xffffffff) ==
82 return entry;
86 if (entry->map->offset == map->offset)
87 return entry;
382 /* Find the list entry for the map and remove it */
494 * \param entry buffer entry where the error occurred.
496 * Frees any pages and buffers associated with the given entry.
500 struct drm_buf_entry * entry)
504 if (entry->seg_count) {
505 for (i = 0; i < entry->seg_count; i++) {
506 if (entry->seglist[i]) {
511 kfree(entry->seglist, entry->seg_count * sizeof (*entry->seglist));
513 entry->seg_count = 0;
516 if (entry->buf_count) {
517 for (i = 0; i < entry->buf_count; i++) {
518 if (entry->buflist[i].dev_private) {
519 kfree(entry->buflist[i].dev_private,
520 entry->buflist[i].dev_priv_size);
523 kfree(entry->buflist, entry->buf_count * sizeof (*entry->buflist));
525 entry->buf_count = 0;
544 struct drm_buf_entry *entry;
593 entry = &dma->bufs[order];
594 if (entry->buf_count) {
606 entry->buflist = kmalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
607 if (!entry->buflist) {
612 (void) memset(entry->buflist, 0, count * sizeof(*entry->buflist));
614 entry->buf_size = size;
615 entry->page_order = page_order;
619 while (entry->buf_count < count) {
620 buf = &entry->buflist[entry->buf_count];
621 buf->idx = dma->buf_count + entry->buf_count;
637 entry->buf_count = count;
638 drm_cleanup_buf_error(dev, entry);
645 DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
648 entry->buf_count++;
655 (dma->buf_count + entry->buf_count) *
658 /* Free the entry because it isn't valid */
659 drm_cleanup_buf_error(dev, entry);
669 for (i = 0; i < entry->buf_count; i++) {
670 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
673 dma->buf_count += entry->buf_count;
674 dma->seg_count += entry->seg_count;
679 DRM_DEBUG("entry->buf_count : %d\n", entry->buf_count);
683 request->count = entry->buf_count;
695 struct drm_buf_entry *entry;
750 entry = &dma->bufs[order];
751 if (entry->buf_count) {
763 entry->buflist = kmalloc(count * sizeof(*entry->buflist),
765 if (!entry->buflist) {
770 (void) memset(entry->buflist, 0, count * sizeof(*entry->buflist));
772 entry->buf_size = size;
773 entry->page_order = page_order;
777 while (entry->buf_count < count) {
778 buf = &entry->buflist[entry->buf_count];
779 buf->idx = dma->buf_count + entry->buf_count;
795 entry->buf_count = count;
796 drm_cleanup_buf_error(dev, entry);
804 DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
807 entry->buf_count++;
815 (dma->buf_count + entry->buf_count)
818 /* Free the entry because it isn't valid */
819 drm_cleanup_buf_error(dev, entry);
826 for (i = 0; i < entry->buf_count; i++) {
827 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
830 dma->buf_count += entry->buf_count;
834 DRM_DEBUG("entry->buf_count : %d\n", entry->buf_count);
838 request->count = entry->buf_count;
971 * updates the respective drm_device_dma::bufs entry low and high water mark.
981 struct drm_buf_entry *entry;
994 entry = &dma->bufs[order];
996 if (request->low_mark < 0 || request->low_mark > entry->buf_count)
998 if (request->high_mark < 0 || request->high_mark > entry->buf_count)
1001 entry->freelist.low_mark = request->low_mark;
1002 entry->freelist.high_mark = request->high_mark;