Lines Matching refs:bufs
1216 drm_buf_map_t bufs; in drmMapBufs() local
1220 bufs.count = 0; in drmMapBufs()
1221 bufs.list = NULL; in drmMapBufs()
1222 bufs.virtual = NULL; in drmMapBufs()
1223 if (drmIoctl(fd, DRM_IOCTL_MAP_BUFS, &bufs)) in drmMapBufs()
1226 if (!bufs.count) in drmMapBufs()
1229 if (!(bufs.list = drmMalloc(bufs.count * sizeof(*bufs.list)))) in drmMapBufs()
1232 if (drmIoctl(fd, DRM_IOCTL_MAP_BUFS, &bufs)) { in drmMapBufs()
1233 drmFree(bufs.list); in drmMapBufs()
1238 retval->count = bufs.count; in drmMapBufs()
1239 retval->list = drmMalloc(bufs.count * sizeof(*retval->list)); in drmMapBufs()
1240 for (i = 0; i < bufs.count; i++) { in drmMapBufs()
1241 retval->list[i].idx = bufs.list[i].idx; in drmMapBufs()
1242 retval->list[i].total = bufs.list[i].total; in drmMapBufs()
1244 retval->list[i].address = bufs.list[i].address; in drmMapBufs()
1247 drmFree(bufs.list); in drmMapBufs()
1262 int drmUnmapBufs(drmBufMapPtr bufs) in drmUnmapBufs() argument
1266 for (i = 0; i < bufs->count; i++) { in drmUnmapBufs()
1267 drm_munmap(bufs->list[i].address, bufs->list[i].total); in drmUnmapBufs()
1270 drmFree(bufs->list); in drmUnmapBufs()
1271 drmFree(bufs); in drmUnmapBufs()