Lines Matching refs:fctx

17 	struct msm_fence_context *fctx;  in msm_fence_context_alloc()  local
20 fctx = kzalloc(sizeof(*fctx), GFP_KERNEL); in msm_fence_context_alloc()
21 if (!fctx) in msm_fence_context_alloc()
24 fctx->dev = dev; in msm_fence_context_alloc()
25 strncpy(fctx->name, name, sizeof(fctx->name)); in msm_fence_context_alloc()
26 fctx->context = dma_fence_context_alloc(1); in msm_fence_context_alloc()
27 fctx->index = index++; in msm_fence_context_alloc()
28 fctx->fenceptr = fenceptr; in msm_fence_context_alloc()
29 spin_lock_init(&fctx->spinlock); in msm_fence_context_alloc()
35 fctx->last_fence = 0xffffff00; in msm_fence_context_alloc()
36 fctx->completed_fence = fctx->last_fence; in msm_fence_context_alloc()
37 *fctx->fenceptr = fctx->last_fence; in msm_fence_context_alloc()
39 return fctx; in msm_fence_context_alloc()
42 void msm_fence_context_free(struct msm_fence_context *fctx) in msm_fence_context_free() argument
44 kfree(fctx); in msm_fence_context_free()
47 bool msm_fence_completed(struct msm_fence_context *fctx, uint32_t fence) in msm_fence_completed() argument
53 return (int32_t)(fctx->completed_fence - fence) >= 0 || in msm_fence_completed()
54 (int32_t)(*fctx->fenceptr - fence) >= 0; in msm_fence_completed()
58 void msm_update_fence(struct msm_fence_context *fctx, uint32_t fence) in msm_update_fence() argument
62 spin_lock_irqsave(&fctx->spinlock, flags); in msm_update_fence()
63 if (fence_after(fence, fctx->completed_fence)) in msm_update_fence()
64 fctx->completed_fence = fence; in msm_update_fence()
65 spin_unlock_irqrestore(&fctx->spinlock, flags); in msm_update_fence()
70 struct msm_fence_context *fctx; member
86 return f->fctx->name; in msm_fence_get_timeline_name()
92 return msm_fence_completed(f->fctx, f->base.seqno); in msm_fence_signaled()
102 msm_fence_alloc(struct msm_fence_context *fctx) in msm_fence_alloc() argument
110 f->fctx = fctx; in msm_fence_alloc()
112 dma_fence_init(&f->base, &msm_fence_ops, &fctx->spinlock, in msm_fence_alloc()
113 fctx->context, ++fctx->last_fence); in msm_fence_alloc()