1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #ifndef __DC_MCIF_WB_H__
26 #define __DC_MCIF_WB_H__
27
28 #include "dc_hw_types.h"
29
30
31 enum mmhubbub_wbif_mode {
32 PACKED_444 = 0,
33 PACKED_444_FP16 = 1,
34 PLANAR_420_8BPC = 2,
35 PLANAR_420_10BPC = 3
36 };
37
38 struct mcif_arb_params {
39
40 unsigned int time_per_pixel;
41 unsigned int cli_watermark[4];
42 unsigned int pstate_watermark[4];
43 unsigned int arbitration_slice;
44 unsigned int slice_lines;
45 unsigned int max_scaled_time;
46 };
47
48 struct mcif_irq_params {
49 unsigned int sw_int_en;
50 unsigned int sw_slice_int_en;
51 unsigned int sw_overrun_int_en;
52 unsigned int vce_int_en;
53 unsigned int vce_slice_int_en;
54 };
55
56
57
58 struct mcif_wb_frame_dump_info {
59 unsigned int size;
60 unsigned int width;
61 unsigned int height;
62 unsigned int luma_pitch;
63 unsigned int chroma_pitch;
64 enum dwb_scaler_mode format;
65 };
66
67 struct mcif_wb {
68 const struct mcif_wb_funcs *funcs;
69 struct dc_context *ctx;
70 int inst;
71 };
72
73 struct mcif_wb_funcs {
74
75 void (*enable_mcif)(struct mcif_wb *mcif_wb);
76
77 void (*disable_mcif)(struct mcif_wb *mcif_wb);
78
79 void (*config_mcif_buf)(
80 struct mcif_wb *mcif_wb,
81 struct mcif_buf_params *params,
82 unsigned int dest_height);
83
84 void (*config_mcif_arb)(
85 struct mcif_wb *mcif_wb,
86 struct mcif_arb_params *params);
87
88 void (*config_mcif_irq)(
89 struct mcif_wb *mcif_wb,
90 struct mcif_irq_params *params);
91
92 void (*dump_frame)(
93 struct mcif_wb *mcif_wb,
94 struct mcif_buf_params *mcif_params,
95 enum dwb_scaler_mode out_format,
96 unsigned int dest_width,
97 unsigned int dest_height,
98 struct mcif_wb_frame_dump_info *dump_info,
99 unsigned char *luma_buffer,
100 unsigned char *chroma_buffer,
101 unsigned char *dest_luma_buffer,
102 unsigned char *dest_chroma_buffer);
103 };
104
105 #endif