/drivers/dma-buf/ |
H A D | seqno-fence.c | 2 * seqno-fence, using a dma-buf to synchronize fencing 22 #include <linux/seqno-fence.h> 24 static const char *seqno_fence_get_driver_name(struct fence *fence) argument 26 struct seqno_fence *seqno_fence = to_seqno_fence(fence); 27 return seqno_fence->ops->get_driver_name(fence); 30 static const char *seqno_fence_get_timeline_name(struct fence *fence) argument 32 struct seqno_fence *seqno_fence = to_seqno_fence(fence); 33 return seqno_fence->ops->get_timeline_name(fence); 36 seqno_enable_signaling(struct fence *fence) argument 42 seqno_signaled(struct fence *fence) argument 48 seqno_release(struct fence *fence) argument 59 seqno_wait(struct fence *fence, bool intr, signed long timeout) argument [all...] |
H A D | fence.c | 24 #include <linux/fence.h> 27 #include <trace/events/fence.h> 33 * fence context counter: each execution context should have its own 34 * fence context, this allows checking if fences belong to the same 41 * fence_context_alloc - allocate an array of fence contexts 45 * The fence context is used for setting fence->context to a unique number. 55 * fence_signal_locked - signal completion of a fence 56 * @fence: the fence t 66 fence_signal_locked(struct fence *fence) argument 107 fence_signal(struct fence *fence) argument 155 fence_wait_timeout(struct fence *fence, bool intr, signed long timeout) argument 171 struct fence *fence = local 185 fence_free(struct fence *fence) argument 198 fence_enable_sw_signaling(struct fence *fence) argument 239 fence_add_callback(struct fence *fence, struct fence_cb *cb, fence_func_t func) argument 296 fence_remove_callback(struct fence *fence, struct fence_cb *cb) argument 319 fence_default_wait_cb(struct fence *fence, struct fence_cb *cb) argument 338 fence_default_wait(struct fence *fence, bool intr, signed long timeout) argument 414 fence_init(struct fence *fence, const struct fence_ops *ops, spinlock_t *lock, unsigned context, unsigned seqno) argument [all...] |
H A D | Makefile | 1 obj-y := dma-buf.o fence.o reservation.o seqno-fence.o
|
H A D | reservation.c | 47 * Reserve space to add a shared fence to a reservation_object, 86 struct fence *fence) 90 fence_get(fence); 96 struct fence *old_fence; 101 if (old_fence->context == fence->context) { 103 RCU_INIT_POINTER(fobj->shared[i], fence); 116 RCU_INIT_POINTER(fobj->shared[fobj->shared_count], fence); 127 struct fence *fence) 84 reservation_object_add_shared_inplace(struct reservation_object *obj, struct reservation_object_list *fobj, struct fence *fence) argument 124 reservation_object_add_shared_replace(struct reservation_object *obj, struct reservation_object_list *old, struct reservation_object_list *fobj, struct fence *fence) argument 187 reservation_object_add_shared_fence(struct reservation_object *obj, struct fence *fence) argument 203 reservation_object_add_excl_fence(struct reservation_object *obj, struct fence *fence) argument 326 struct fence *fence; local 401 struct fence *fence, *lfence = passed_fence; local 440 struct fence *fence = rcu_dereference(fobj->shared[i]); local [all...] |
/drivers/gpu/drm/nouveau/ |
H A D | nouveau_fence.c | 31 #include <trace/events/fence.h> 44 from_fence(struct fence *fence) argument 46 return container_of(fence, struct nouveau_fence, base); 50 nouveau_fctx(struct nouveau_fence *fence) argument 52 return container_of(fence->base.lock, struct nouveau_fence_chan, lock); 56 nouveau_fence_signal(struct nouveau_fence *fence) argument 60 fence_signal_locked(&fence->base); 61 list_del(&fence->head); 62 rcu_assign_pointer(fence 76 nouveau_local_fence(struct fence *fence, struct nouveau_drm *drm) argument 93 struct nouveau_fence *fence; local 129 struct nouveau_fence *fence; local 155 struct nouveau_fence *fence; local 217 nouveau_fence_work_cb(struct fence *fence, struct fence_cb *cb) argument 225 nouveau_fence_work(struct fence *fence, void (*func)(void *), void *data) argument 259 nouveau_fence_emit(struct nouveau_fence *fence, struct nouveau_channel *chan) argument 293 nouveau_fence_done(struct nouveau_fence *fence) argument 316 struct nouveau_fence *fence = from_fence(f); local 349 nouveau_fence_wait_busy(struct nouveau_fence *fence, bool intr) argument 374 nouveau_fence_wait(struct nouveau_fence *fence, bool lazy, bool intr) argument 394 struct fence *fence; local 467 struct nouveau_fence *fence; local 487 nouveau_fence_get_get_driver_name(struct fence *fence) argument 494 struct nouveau_fence *fence = from_fence(f); local 508 struct nouveau_fence *fence = from_fence(f); local 524 struct nouveau_fence *fence = from_fence(f); local 549 struct nouveau_fence *fence = from_fence(f); local 567 struct nouveau_fence *fence = from_fence(f); local [all...] |
H A D | nv04_fence.c | 38 nv04_fence_emit(struct nouveau_fence *fence) argument 40 struct nouveau_channel *chan = fence->channel; 44 OUT_RING (chan, fence->base.seqno); 51 nv04_fence_sync(struct nouveau_fence *fence, argument 67 struct nv04_fence_chan *fctx = chan->fence; 69 chan->fence = NULL; 82 chan->fence = fctx; 91 struct nv04_fence_priv *priv = drm->fence; 92 drm->fence = NULL; 101 priv = drm->fence [all...] |
H A D | nv10_fence.c | 30 nv10_fence_emit(struct nouveau_fence *fence) argument 32 struct nouveau_channel *chan = fence->channel; 36 OUT_RING (chan, fence->base.seqno); 44 nv10_fence_sync(struct nouveau_fence *fence, argument 59 struct nv10_fence_chan *fctx = chan->fence; 65 chan->fence = NULL; 74 fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL); 88 struct nv10_fence_priv *priv = drm->fence; 93 drm->fence = NULL; 102 priv = drm->fence [all...] |
H A D | nv84_fence.c | 34 struct nv84_fence_chan *fctx = chan->fence; 74 nv84_fence_emit(struct nouveau_fence *fence) argument 76 struct nouveau_channel *chan = fence->channel; 77 struct nv84_fence_chan *fctx = chan->fence; 80 if (fence->sysmem) 85 return fctx->base.emit32(chan, addr, fence->base.seqno); 89 nv84_fence_sync(struct nouveau_fence *fence, argument 92 struct nv84_fence_chan *fctx = chan->fence; 95 if (fence->sysmem) 100 return fctx->base.sync32(chan, addr, fence [all...] |
H A D | nouveau_fence.h | 4 #include <linux/fence.h> 11 struct fence base; 27 void nouveau_fence_work(struct fence *, void (*)(void *), void *); 64 #define nouveau_fence(drm) ((struct nouveau_fence_priv *)(drm)->fence)
|
H A D | nv17_fence.c | 33 nv17_fence_sync(struct nouveau_fence *fence, argument 37 struct nv10_fence_priv *priv = chan->drm->fence; 38 struct nv10_fence_chan *fctx = chan->fence; 76 struct nv10_fence_priv *priv = chan->drm->fence; 83 fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL); 108 struct nv10_fence_priv *priv = drm->fence; 119 priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
|
/drivers/staging/android/ |
H A D | sync.c | 155 struct sync_fence *fence; local 157 fence = kzalloc(size, GFP_KERNEL); 158 if (fence == NULL) 161 fence->file = anon_inode_getfile("sync_fence", &sync_fence_fops, 162 fence, 0); 163 if (IS_ERR(fence->file)) 166 kref_init(&fence->kref); 167 strlcpy(fence->name, name, sizeof(fence->name)); 169 init_waitqueue_head(&fence 181 struct sync_fence *fence; local 193 struct sync_fence *fence; local 232 sync_fence_put(struct sync_fence *fence) argument 238 sync_fence_install(struct sync_fence *fence, int fd) argument 244 sync_fence_add_pt(struct sync_fence *fence, int *i, struct fence *pt) argument 260 struct sync_fence *fence; local 327 sync_fence_wait_async(struct sync_fence *fence, struct sync_fence_waiter *waiter) argument 355 sync_fence_cancel_async(struct sync_fence *fence, struct sync_fence_waiter *waiter) argument 371 sync_fence_wait(struct sync_fence *fence, long timeout) argument 409 android_fence_get_driver_name(struct fence *fence) argument 417 android_fence_get_timeline_name(struct fence *fence) argument 425 android_fence_release(struct fence *fence) argument 444 android_fence_signaled(struct fence *fence) argument 456 android_fence_enable_signaling(struct fence *fence) argument 468 android_fence_fill_driver_data(struct fence *fence, void *data, int size) argument 479 android_fence_value_str(struct fence *fence, char *str, int size) argument 493 android_fence_timeline_value_str(struct fence *fence, char *str, int size) argument 521 struct sync_fence *fence = container_of(kref, struct sync_fence, kref); local 536 struct sync_fence *fence = file->private_data; local 546 struct sync_fence *fence = file->private_data; local 560 sync_fence_ioctl_wait(struct sync_fence *fence, unsigned long arg) argument 570 sync_fence_ioctl_merge(struct sync_fence *fence, unsigned long arg) argument 619 sync_fill_pt_info(struct fence *fence, void *data, int size) argument 651 sync_fence_ioctl_fence_info(struct sync_fence *fence, unsigned long arg) argument 706 struct sync_fence *fence = file->private_data; local [all...] |
H A D | sync.h | 22 #include <linux/fence.h> 82 * @kref: reference count on fence. 113 * @fence: base fence class 117 * @fence: sync_fence to which the sync_pt belongs 124 struct fence base; 138 struct fence *sync_pt; 139 struct sync_fence *fence; member in struct:sync_fence_cb 143 * struct sync_fence - sync fence 144 * @file: file representing this fence [all...] |
H A D | sync_debug.c | 55 void sync_fence_debug_add(struct sync_fence *fence) argument 60 list_add_tail(&fence->sync_fence_list, &sync_fence_list_head); 64 void sync_fence_debug_remove(struct sync_fence *fence) argument 69 list_del(&fence->sync_fence_list); 84 static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence) argument 93 fence ? parent->name : "", 94 fence ? "_" : "", 109 if (fence) { 144 static void sync_print_fence(struct seq_file *s, struct sync_fence *fence) argument 150 seq_printf(s, "[%p] %s: %s\n", fence, fenc 197 struct sync_fence *fence = local [all...] |
/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_fence.h | 30 #include <linux/fence.h> 55 struct fence base; 59 void (*destroy)(struct vmw_fence_obj *fence); 70 struct vmw_fence_obj *fence = *fence_p; local 73 if (fence) 74 fence_put(&fence->base); 78 vmw_fence_obj_reference(struct vmw_fence_obj *fence) argument 80 if (fence) 81 fence_get(&fence->base); 82 return fence; [all...] |
H A D | vmwgfx_fence.c | 54 struct vmw_fence_obj fence; member in struct:vmw_user_fence 58 * struct vmw_event_fence_action - fence action that delivers a drm event. 61 * @action: A struct vmw_fence_action to hook up to a fence. 62 * @fence: A referenced pointer to the fence to keep it alive while @action 68 * current time tv_sec val when the fence signals. 70 * be assigned the current time tv_usec val when the fence signals. 77 struct vmw_fence_obj *fence; member in struct:vmw_event_fence_action 85 fman_from_fence(struct vmw_fence_obj *fence) argument 87 return container_of(fence 114 struct vmw_fence_obj *fence = local 147 struct vmw_fence_obj *fence = local 173 vmwgfx_wait_cb(struct fence *fence, struct fence_cb *cb) argument 185 struct vmw_fence_obj *fence = local 337 vmw_fence_obj_init(struct vmw_fence_manager *fman, struct vmw_fence_obj *fence, u32 seqno, void (*destroy) (struct vmw_fence_obj *fence)) argument 404 struct vmw_fence_obj *fence; local 443 vmw_fence_goal_check_locked(struct vmw_fence_obj *fence) argument 466 struct vmw_fence_obj *fence, *next_fence; local 514 vmw_fence_obj_signaled(struct vmw_fence_obj *fence) argument 526 vmw_fence_obj_wait(struct vmw_fence_obj *fence, bool lazy, bool interruptible, unsigned long timeout) argument 539 vmw_fence_obj_flush(struct vmw_fence_obj *fence) argument 546 vmw_fence_destroy(struct vmw_fence_obj *fence) argument 564 struct vmw_fence_obj *fence; local 594 vmw_user_fence_destroy(struct vmw_fence_obj *fence) argument 613 struct vmw_fence_obj *fence = &ufence->fence; local 702 struct vmw_fence_obj *fence = local 744 struct vmw_fence_obj *fence; local 802 struct vmw_fence_obj *fence; local 955 vmw_fence_obj_add_action(struct vmw_fence_obj *fence, struct vmw_fence_action *action) argument 1010 vmw_event_fence_action_queue(struct drm_file *file_priv, struct vmw_fence_obj *fence, struct drm_pending_event *event, uint32_t *tv_sec, uint32_t *tv_usec, bool interruptible) argument 1051 vmw_event_fence_action_create(struct drm_file *file_priv, struct vmw_fence_obj *fence, uint32_t flags, uint64_t user_data, bool interruptible) argument 1124 struct vmw_fence_obj *fence = NULL; local [all...] |
H A D | vmwgfx_reg.h | 47 __le32 fence; member in struct:svga_fifo_cmd_fence
|
/drivers/gpu/drm/radeon/ |
H A D | radeon_fence.c | 45 * for GPU/CPU synchronization. When the fence is written, 46 * it is expected that all buffers associated with that fence 54 * radeon_fence_write - write a fence value 58 * @ring: ring index the fence is associated with 60 * Writes a fence value to memory or a scratch register (all asics). 75 * radeon_fence_read - read a fence value 78 * @ring: ring index the fence is associated with 80 * Reads a fence value from memory or a scratch register (all asics). 81 * Returns the value of the fence read from memory or register. 120 * radeon_fence_emit - emit a fence o 129 radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring) argument 160 struct radeon_fence *fence; local 355 struct radeon_fence *fence = to_radeon_fence(f); local 385 struct radeon_fence *fence = to_radeon_fence(f); local 430 radeon_fence_signaled(struct radeon_fence *fence) argument 539 radeon_fence_wait(struct radeon_fence *fence, bool intr) argument 673 radeon_fence_ref(struct radeon_fence *fence) argument 686 radeon_fence_unref(struct radeon_fence **fence) argument 734 radeon_fence_need_sync(struct radeon_fence *fence, int dst_ring) argument 764 radeon_fence_note_sync(struct radeon_fence *fence, int dst_ring) argument 1006 radeon_fence_get_driver_name(struct fence *fence) argument 1013 struct radeon_fence *fence = to_radeon_fence(f); local 1027 radeon_test_signaled(struct radeon_fence *fence) argument 1035 struct radeon_fence *fence = to_radeon_fence(f); local [all...] |
H A D | radeon_semaphore.c | 99 * radeon_semaphore_sync_fence - use the semaphore to sync to a fence 101 * @semaphore: semaphore object to add fence to 102 * @fence: fence to sync to 104 * Sync to the fence using this semaphore object 107 struct radeon_fence *fence) 111 if (!fence) 114 other = semaphore->sync_to[fence->ring]; 115 semaphore->sync_to[fence->ring] = radeon_fence_later(fence, othe 106 radeon_semaphore_sync_fence(struct radeon_semaphore *semaphore, struct radeon_fence *fence) argument 134 struct radeon_fence *fence; local 183 struct radeon_fence *fence = semaphore->sync_to[i]; local 238 radeon_semaphore_free(struct radeon_device *rdev, struct radeon_semaphore **semaphore, struct radeon_fence *fence) argument [all...] |
H A D | evergreen_dma.c | 32 * evergreen_dma_fence_ring_emit - emit a fence on the DMA ring 35 * @fence: radeon fence object 37 * Add a DMA fence packet to the ring to write 38 * the fence seq number and DMA trap packet to generate 42 struct radeon_fence *fence) 44 struct radeon_ring *ring = &rdev->ring[fence->ring]; 45 u64 addr = rdev->fence_drv[fence->ring].gpu_addr; 46 /* write the fence */ 50 radeon_ring_write(ring, fence 41 evergreen_dma_fence_ring_emit(struct radeon_device *rdev, struct radeon_fence *fence) argument 114 struct radeon_fence *fence; local [all...] |
H A D | radeon_sa.c | 41 * If we are asked to block we wait on all the oldest fence of all 42 * rings. We just wait for any of those fence to complete. 150 radeon_fence_unref(&sa_bo->fence); 163 if (sa_bo->fence == NULL || !radeon_fence_signaled(sa_bo->fence)) { 221 * Check if either there is a fence we can wait for or 264 /* go over all fence list and try to find the closest sa_bo 277 if (!radeon_fence_signaled(sa_bo->fence)) { 278 fences[i] = sa_bo->fence; 301 ++tries[best_bo->fence 371 radeon_sa_bo_free(struct radeon_device *rdev, struct radeon_sa_bo **sa_bo, struct radeon_fence *fence) argument [all...] |
H A D | rv770_dma.c | 48 struct radeon_fence *fence; local 87 r = radeon_fence_emit(rdev, &fence, ring->idx); 95 radeon_semaphore_free(rdev, &sem, fence); 97 return fence;
|
H A D | radeon_test.c | 87 struct radeon_fence *fence = NULL; local 120 fence = radeon_copy_dma(rdev, gtt_addr, vram_addr, 124 fence = radeon_copy_blit(rdev, gtt_addr, vram_addr, 127 if (IS_ERR(fence)) { 129 r = PTR_ERR(fence); 133 r = radeon_fence_wait(fence, false); 135 DRM_ERROR("Failed to wait for GTT->VRAM fence %d\n", i); 139 radeon_fence_unref(&fence); 171 fence = radeon_copy_dma(rdev, vram_addr, gtt_addr, 175 fence 261 radeon_test_create_and_emit_fence(struct radeon_device *rdev, struct radeon_ring *ring, struct radeon_fence **fence) argument [all...] |
H A D | radeon_benchmark.c | 41 struct radeon_fence *fence = NULL; local 48 fence = radeon_copy_dma(rdev, saddr, daddr, 53 fence = radeon_copy_blit(rdev, saddr, daddr, 61 if (IS_ERR(fence)) 62 return PTR_ERR(fence); 64 r = radeon_fence_wait(fence, false); 65 radeon_fence_unref(&fence);
|
/drivers/staging/android/uapi/ |
H A D | sw_sync.h | 23 __s32 fence; /* fd of new fence */ member in struct:sw_sync_create_fence_data
|
/drivers/staging/android/trace/ |
H A D | sync.h | 36 TP_PROTO(struct sync_fence *fence, int begin), 38 TP_ARGS(fence, begin), 41 __string(name, fence->name) 47 __assign_str(name, fence->name); 48 __entry->status = atomic_read(&fence->status); 57 TP_PROTO(struct fence *pt),
|