1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright 2020-2021 NXP
4  */
5 
6 #ifndef _AMPHION_VPU_WINDSOR_H
7 #define _AMPHION_VPU_WINDSOR_H
8 
9 u32 vpu_windsor_get_data_size(void);
10 void vpu_windsor_init_rpc(struct vpu_shared_addr *shared,
11 			  struct vpu_buffer *rpc, dma_addr_t boot_addr);
12 void vpu_windsor_set_log_buf(struct vpu_shared_addr *shared, struct vpu_buffer *log);
13 void vpu_windsor_set_system_cfg(struct vpu_shared_addr *shared,
14 				u32 regs_base, void __iomem *regs, u32 core_id);
15 int vpu_windsor_get_stream_buffer_size(struct vpu_shared_addr *shared);
16 int vpu_windsor_pack_cmd(struct vpu_rpc_event *pkt, u32 index, u32 id, void *data);
17 int vpu_windsor_convert_msg_id(u32 msg_id);
18 int vpu_windsor_unpack_msg_data(struct vpu_rpc_event *pkt, void *data);
19 int vpu_windsor_config_memory_resource(struct vpu_shared_addr *shared,
20 				       u32 instance, u32 type, u32 index,
21 				       struct vpu_buffer *buf);
22 int vpu_windsor_config_stream_buffer(struct vpu_shared_addr *shared,
23 				     u32 instance, struct vpu_buffer *buf);
24 int vpu_windsor_update_stream_buffer(struct vpu_shared_addr *shared,
25 				     u32 instance, u32 ptr, bool write);
26 int vpu_windsor_get_stream_buffer_desc(struct vpu_shared_addr *shared,
27 				       u32 instance, struct vpu_rpc_buffer_desc *desc);
28 u32 vpu_windsor_get_version(struct vpu_shared_addr *shared);
29 int vpu_windsor_set_encode_params(struct vpu_shared_addr *shared,
30 				  u32 instance,
31 				  struct vpu_encode_params *params,
32 				  u32 update);
33 int vpu_windsor_input_frame(struct vpu_shared_addr *shared,
34 			    struct vpu_inst *inst, struct vb2_buffer *vb);
35 u32 vpu_windsor_get_max_instance_count(struct vpu_shared_addr *shared);
36 
37 #endif
38