• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) Rockchip Electronics Co., Ltd.
4  *
5  * Author:
6  *  Cerf Yu <cerf.yu@rock-chips.com>
7  *  Huang Lee <Putin.li@rock-chips.com>
8  */
9 #ifndef __RGA3_DMA_BUF_H__
10 #define __RGA3_DMA_BUF_H__
11 
12 #include "rga_drv.h"
13 
14 int rga_buf_size_cal(unsigned long yrgb_addr, unsigned long uv_addr,
15 		      unsigned long v_addr, int format, uint32_t w,
16 		      uint32_t h, unsigned long *StartAddr, unsigned long *size);
17 
18 int rga_dma_buf_get(struct rga_job *job);
19 
20 int rga_iommu_map_virt_addr(struct rga_memory_parm *memory_parm,
21 			    struct rga_dma_buffer *virt_dma_buf,
22 			    struct device *rga_dev,
23 			    struct mm_struct *mm);
24 void rga_iommu_unmap_virt_addr(struct rga_dma_buffer *virt_addr);
25 
26 int rga_dma_map_fd(int fd, struct rga_dma_buffer *rga_dma_buffer,
27 		   enum dma_data_direction dir, struct device *rga_dev);
28 void rga_dma_unmap_fd(struct rga_dma_buffer *rga_dma_buffer);
29 
30 int rga_dma_get_info(struct rga_job *job);
31 void rga_dma_put_info(struct rga_job *job);
32 
33 int rga_get_format_bits(u32 format);
34 
35 #endif /* #ifndef __RGA3_DMA_BUF_H__ */
36 
37