Lines Matching defs:fence

8 #include <linux/dma-fence.h>
9 #include <linux/dma-fence-chain.h>
62 struct dma_fence *fence,
71 dma_fence_chain_init(f, dma_fence_get(prev), dma_fence_get(fence),
184 struct dma_fence *fence;
192 fence = dma_fence_get(fc.tail);
193 err = dma_fence_chain_find_seqno(&fence, 0);
194 dma_fence_put(fence);
201 fence = dma_fence_get(fc.tail);
202 err = dma_fence_chain_find_seqno(&fence, i + 1);
203 dma_fence_put(fence);
209 if (fence != fc.chains[i]) {
210 pr_err("Incorrect fence reported by find_seqno(%d:%d)\n",
216 dma_fence_get(fence);
217 err = dma_fence_chain_find_seqno(&fence, i + 1);
218 dma_fence_put(fence);
223 if (fence != fc.chains[i]) {
224 pr_err("Incorrect fence reported by find self\n");
229 dma_fence_get(fence);
230 err = dma_fence_chain_find_seqno(&fence, i + 2);
231 dma_fence_put(fence);
233 pr_err("Error not reported for future fence: find_seqno(%d:%d)!\n",
239 dma_fence_get(fence);
240 err = dma_fence_chain_find_seqno(&fence, i);
241 dma_fence_put(fence);
243 pr_err("Error reported for previous fence!\n");
246 if (i > 0 && fence != fc.chains[i - 1]) {
247 pr_err("Incorrect fence reported by find_seqno(%d:%d)\n",
262 struct dma_fence *fence;
271 fence = dma_fence_get(fc.tail);
272 err = dma_fence_chain_find_seqno(&fence, 1);
273 dma_fence_put(fence);
279 if (fence && fence != fc.chains[0]) {
280 pr_err("Incorrect chain-fence.seqno:%lld reported for completed seqno:1\n",
281 fence->seqno);
283 dma_fence_get(fence);
284 err = dma_fence_chain_find_seqno(&fence, 1);
285 dma_fence_put(fence);
300 struct dma_fence *fence;
309 fence = dma_fence_get(fc.tail);
310 err = dma_fence_chain_find_seqno(&fence, 2);
311 dma_fence_put(fence);
318 * We signaled the middle fence (2) of the 1-2-3 chain. The behavior
319 * of the dma-fence-chain is to make us wait for all the fences up to
320 * the point we want. Since fence 1 is still not signaled, this what
321 * we should get as fence to wait upon (fence 2 being garbage
324 if (fence != fc.chains[0]) {
325 pr_err("Incorrect chain-fence.seqno:%lld reported for completed seqno:2\n",
326 fence ? fence->seqno : 0);
344 struct dma_fence *fence;
353 fence = dma_fence_get(fc.tail);
354 err = dma_fence_chain_find_seqno(&fence, 2 * i + 1);
355 dma_fence_put(fence);
361 if (fence != fc.chains[i]) {
362 pr_err("Incorrect fence.seqno:%lld reported by find_seqno(%d:%d)\n",
363 fence->seqno,
370 dma_fence_get(fence);
371 err = dma_fence_chain_find_seqno(&fence, 2 * i + 2);
372 dma_fence_put(fence);
377 if (fence != fc.chains[i]) {
378 pr_err("Incorrect fence reported by find self\n");
400 struct dma_fence *fence = dma_fence_get(data->fc.tail);
405 err = dma_fence_chain_find_seqno(&fence, seqno);
407 pr_err("Failed to find fence seqno:%d\n",
409 dma_fence_put(fence);
412 if (!fence)
416 * We can only find ourselves if we are on fence we were
419 if (fence->seqno == seqno) {
420 err = dma_fence_chain_find_seqno(&fence, seqno);
422 pr_err("Reported an invalid fence for find-self:%d\n",
424 dma_fence_put(fence);
429 dma_fence_put(fence);