xref: /linux/drivers/media/platform/qcom/venus/hfi_plat_bufs.h (revision 58d416351e6df1a41d415958ccdd8eb9c2173fed)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef __HFI_PLATFORM_BUFFERS_H__
7 #define __HFI_PLATFORM_BUFFERS_H__
8 
9 #include <linux/types.h>
10 #include "hfi_helper.h"
11 
12 struct hfi_plat_buffers_params {
13 	u32 width;
14 	u32 height;
15 	u32 codec;
16 	u32 hfi_color_fmt;
17 	enum hfi_version version;
18 	u32 num_vpp_pipes;
19 	union {
20 		struct {
21 			u32 max_mbs_per_frame;
22 			u32 buffer_size_limit;
23 			bool is_secondary_output;
24 			bool is_interlaced;
25 		} dec;
26 		struct {
27 			u32 work_mode;
28 			u32 rc_type;
29 			u32 num_b_frames;
30 			bool is_tenbit;
31 		} enc;
32 	};
33 };
34 
35 int hfi_plat_bufreq_v6(struct hfi_plat_buffers_params *params, u32 session_type,
36 		       u32 buftype, struct hfi_buffer_requirements *bufreq);
37 
38 #endif
39