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_RVE_FENCE_H_ 9 #define __LINUX_RVE_FENCE_H_ 10 11 #ifdef CONFIG_SYNC_FILE 12 13 #include "rve_drv.h" 14 15 struct rve_fence_context *rve_fence_context_alloc(void); 16 17 void rve_fence_context_free(struct rve_fence_context *fence_ctx); 18 19 int rve_out_fence_alloc(struct rve_job *job); 20 21 int rve_out_fence_get_fd(struct rve_job *job); 22 23 struct dma_fence *rve_get_input_fence(int in_fence_fd); 24 25 int rve_wait_input_fence(struct dma_fence *in_fence); 26 27 int rve_add_dma_fence_callback(struct rve_job *job, 28 struct dma_fence *in_fence, dma_fence_func_t func); 29 30 #endif 31 32 #endif /* __LINUX_RVE_FENCE_H_ */ 33