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;
379 /* Find the list entry for the map and remove it */
491 * \param entry buffer entry where the error occurred.
493 * Frees any pages and buffers associated with the given entry.
497 struct drm_buf_entry * entry)
501 if (entry->seg_count) {
502 for (i = 0; i < entry->seg_count; i++) {
503 if (entry->seglist[i]) {
508 kfree(entry->seglist, entry->seg_count * sizeof (*entry->seglist));
510 entry->seg_count = 0;
513 if (entry->buf_count) {
514 for (i = 0; i < entry->buf_count; i++) {
515 if (entry->buflist[i].dev_private) {
516 kfree(entry->buflist[i].dev_private,
517 entry->buflist[i].dev_priv_size);
520 kfree(entry->buflist, entry->buf_count * sizeof (*entry->buflist));
522 entry->buf_count = 0;
541 struct drm_buf_entry *entry;
590 entry = &dma->bufs[order];
591 if (entry->buf_count) {
603 entry->buflist = kmalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
604 if (!entry->buflist) {
609 (void) memset(entry->buflist, 0, count * sizeof(*entry->buflist));
611 entry->buf_size = size;
612 entry->page_order = page_order;
616 while (entry->buf_count < count) {
617 buf = &entry->buflist[entry->buf_count];
618 buf->idx = dma->buf_count + entry->buf_count;
634 entry->buf_count = count;
635 drm_cleanup_buf_error(dev, entry);
642 DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
645 entry->buf_count++;
652 (dma->buf_count + entry->buf_count) *
655 /* Free the entry because it isn't valid */
656 drm_cleanup_buf_error(dev, entry);
666 for (i = 0; i < entry->buf_count; i++) {
667 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
670 dma->buf_count += entry->buf_count;
671 dma->seg_count += entry->seg_count;
676 DRM_DEBUG("entry->buf_count : %d\n", entry->buf_count);
680 request->count = entry->buf_count;
692 struct drm_buf_entry *entry;
747 entry = &dma->bufs[order];
748 if (entry->buf_count) {
760 entry->buflist = kmalloc(count * sizeof(*entry->buflist),
762 if (!entry->buflist) {
767 (void) memset(entry->buflist, 0, count * sizeof(*entry->buflist));
769 entry->buf_size = size;
770 entry->page_order = page_order;
774 while (entry->buf_count < count) {
775 buf = &entry->buflist[entry->buf_count];
776 buf->idx = dma->buf_count + entry->buf_count;
792 entry->buf_count = count;
793 drm_cleanup_buf_error(dev, entry);
801 DRM_DEBUG("buffer %d @ %p\n", entry->buf_count, buf->address);
804 entry->buf_count++;
812 (dma->buf_count + entry->buf_count)
815 /* Free the entry because it isn't valid */
816 drm_cleanup_buf_error(dev, entry);
823 for (i = 0; i < entry->buf_count; i++) {
824 dma->buflist[i + dma->buf_count] = &entry->buflist[i];
827 dma->buf_count += entry->buf_count;
831 DRM_DEBUG("entry->buf_count : %d\n", entry->buf_count);
835 request->count = entry->buf_count;
968 * updates the respective drm_device_dma::bufs entry low and high water mark.
978 struct drm_buf_entry *entry;
991 entry = &dma->bufs[order];
993 if (request->low_mark < 0 || request->low_mark > entry->buf_count)
995 if (request->high_mark < 0 || request->high_mark > entry->buf_count)
998 entry->freelist.low_mark = request->low_mark;
999 entry->freelist.high_mark = request->high_mark;