Lines Matching full:release
54 return "release"; in qxl_get_timeline_name()
61 struct qxl_release *release; in qxl_fence_wait() local
67 release = container_of(fence, struct qxl_release, base); in qxl_fence_wait()
68 have_drawable_releases = release->type == QXL_RELEASE_DRAWABLE; in qxl_fence_wait()
98 DMA_FENCE_WARN(fence, "failed to wait on release %llu " in qxl_fence_wait()
127 struct qxl_release *release; in qxl_release_alloc() local
129 size_t size = sizeof(*release); in qxl_release_alloc()
131 release = kmalloc(size, GFP_KERNEL); in qxl_release_alloc()
132 if (!release) { in qxl_release_alloc()
136 release->base.ops = NULL; in qxl_release_alloc()
137 release->type = type; in qxl_release_alloc()
138 release->release_offset = 0; in qxl_release_alloc()
139 release->surface_release_id = 0; in qxl_release_alloc()
140 INIT_LIST_HEAD(&release->bos); in qxl_release_alloc()
144 handle = idr_alloc(&qdev->release_idr, release, 1, 0, GFP_NOWAIT); in qxl_release_alloc()
145 release->base.seqno = ++qdev->release_seqno; in qxl_release_alloc()
149 kfree(release); in qxl_release_alloc()
153 *ret = release; in qxl_release_alloc()
154 DRM_DEBUG_DRIVER("allocated release %d\n", handle); in qxl_release_alloc()
155 release->id = handle; in qxl_release_alloc()
160 qxl_release_free_list(struct qxl_release *release) in qxl_release_free_list() argument
162 while (!list_empty(&release->bos)) { in qxl_release_free_list()
166 entry = container_of(release->bos.next, in qxl_release_free_list()
173 release->release_bo = NULL; in qxl_release_free_list()
178 struct qxl_release *release) in qxl_release_free() argument
180 DRM_DEBUG_DRIVER("release %d, type %d\n", release->id, release->type); in qxl_release_free()
182 if (release->surface_release_id) in qxl_release_free()
183 qxl_surface_id_dealloc(qdev, release->surface_release_id); in qxl_release_free()
186 idr_remove(&qdev->release_idr, release->id); in qxl_release_free()
189 if (release->base.ops) { in qxl_release_free()
190 WARN_ON(list_empty(&release->bos)); in qxl_release_free()
191 qxl_release_free_list(release); in qxl_release_free()
193 dma_fence_signal(&release->base); in qxl_release_free()
194 dma_fence_put(&release->base); in qxl_release_free()
196 qxl_release_free_list(release); in qxl_release_free()
197 kfree(release); in qxl_release_free()
209 int qxl_release_list_add(struct qxl_release *release, struct qxl_bo *bo) in qxl_release_list_add() argument
213 list_for_each_entry(entry, &release->bos, tv.head) { in qxl_release_list_add()
225 list_add_tail(&entry->tv.head, &release->bos); in qxl_release_list_add()
252 int qxl_release_reserve_list(struct qxl_release *release, bool no_intr) in qxl_release_reserve_list() argument
257 /* if only one object on the release its the release itself in qxl_release_reserve_list()
259 if (list_is_singular(&release->bos)) in qxl_release_reserve_list()
262 ret = ttm_eu_reserve_buffers(&release->ticket, &release->bos, in qxl_release_reserve_list()
267 list_for_each_entry(entry, &release->bos, tv.head) { in qxl_release_reserve_list()
272 ttm_eu_backoff_reservation(&release->ticket, &release->bos); in qxl_release_reserve_list()
279 void qxl_release_backoff_reserve_list(struct qxl_release *release) in qxl_release_backoff_reserve_list() argument
281 /* if only one object on the release its the release itself in qxl_release_backoff_reserve_list()
283 if (list_is_singular(&release->bos)) in qxl_release_backoff_reserve_list()
286 ttm_eu_backoff_reservation(&release->ticket, &release->bos); in qxl_release_backoff_reserve_list()
292 struct qxl_release **release) in qxl_alloc_surface_release_reserved() argument
299 /* stash the release after the create command */ in qxl_alloc_surface_release_reserved()
300 idr_ret = qxl_release_alloc(qdev, QXL_RELEASE_SURFACE_CMD, release); in qxl_alloc_surface_release_reserved()
305 (*release)->release_bo = bo; in qxl_alloc_surface_release_reserved()
306 (*release)->release_offset = create_rel->release_offset + 64; in qxl_alloc_surface_release_reserved()
308 qxl_release_list_add(*release, bo); in qxl_alloc_surface_release_reserved()
310 info = qxl_release_map(qdev, *release); in qxl_alloc_surface_release_reserved()
312 qxl_release_unmap(qdev, *release, info); in qxl_alloc_surface_release_reserved()
317 QXL_RELEASE_SURFACE_CMD, release, NULL); in qxl_alloc_surface_release_reserved()
321 int type, struct qxl_release **release, in qxl_alloc_release_reserved() argument
341 idr_ret = qxl_release_alloc(qdev, type, release); in qxl_alloc_release_reserved()
358 qxl_release_free(qdev, *release); in qxl_alloc_release_reserved()
365 (*release)->release_bo = bo; in qxl_alloc_release_reserved()
366 …(*release)->release_offset = qdev->current_release_bo_offset[cur_idx] * release_size_per_bo[cur_id… in qxl_alloc_release_reserved()
374 ret = qxl_release_list_add(*release, bo); in qxl_alloc_release_reserved()
377 qxl_release_free(qdev, *release); in qxl_alloc_release_reserved()
381 info = qxl_release_map(qdev, *release); in qxl_alloc_release_reserved()
383 qxl_release_unmap(qdev, *release, info); in qxl_alloc_release_reserved()
391 struct qxl_release *release; in qxl_release_from_id_locked() local
394 release = idr_find(&qdev->release_idr, id); in qxl_release_from_id_locked()
396 if (!release) { in qxl_release_from_id_locked()
401 return release; in qxl_release_from_id_locked()
405 struct qxl_release *release) in qxl_release_map() argument
409 struct qxl_bo *bo = release->release_bo; in qxl_release_map()
411 ptr = qxl_bo_kmap_atomic_page(qdev, bo, release->release_offset & PAGE_MASK); in qxl_release_map()
414 info = ptr + (release->release_offset & ~PAGE_MASK); in qxl_release_map()
419 struct qxl_release *release, in qxl_release_unmap() argument
422 struct qxl_bo *bo = release->release_bo; in qxl_release_unmap()
425 ptr = ((void *)info) - (release->release_offset & ~PAGE_MASK); in qxl_release_unmap()
429 void qxl_release_fence_buffer_objects(struct qxl_release *release) in qxl_release_fence_buffer_objects() argument
436 /* if only one object on the release its the release itself in qxl_release_fence_buffer_objects()
438 if (list_is_singular(&release->bos) || list_empty(&release->bos)) in qxl_release_fence_buffer_objects()
441 bo = list_first_entry(&release->bos, struct ttm_validate_buffer, head)->bo; in qxl_release_fence_buffer_objects()
449 dma_fence_init(&release->base, &qxl_fence_ops, &qdev->release_lock, in qxl_release_fence_buffer_objects()
450 release->id | 0xf0000000, release->base.seqno); in qxl_release_fence_buffer_objects()
451 trace_dma_fence_emit(&release->base); in qxl_release_fence_buffer_objects()
455 list_for_each_entry(entry, &release->bos, head) { in qxl_release_fence_buffer_objects()
458 dma_resv_add_shared_fence(bo->base.resv, &release->base); in qxl_release_fence_buffer_objects()
463 ww_acquire_fini(&release->ticket); in qxl_release_fence_buffer_objects()