1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) Rockchip Electronics Co., Ltd.
4  *
5  * Author: Huang Lee <Putin.li@rock-chips.com>
6  */
7 
8 #ifndef __LINUX_RGA_FENCE_H_
9 #define __LINUX_RGA_FENCE_H_
10 
11 #include "rga_drv.h"
12 
13 struct rga_fence_context *rga_fence_context_alloc(void);
14 
15 void rga_fence_context_free(struct rga_fence_context *fence_ctx);
16 
17 int rga_out_fence_alloc(struct rga_job *job);
18 
19 int rga_out_fence_get_fd(struct rga_job *job);
20 
21 struct dma_fence *rga_get_input_fence(int in_fence_fd);
22 
23 int rga_wait_input_fence(struct dma_fence *in_fence);
24 
25 int rga_add_dma_fence_callback(struct rga_job *job,
26 	struct dma_fence *in_fence, dma_fence_func_t func);
27 
28 #endif /* __LINUX_RGA_FENCE_H_ */
29