1*b843c749SSergey Zigachev /*
2*b843c749SSergey Zigachev  * Copyright 2017 Advanced Micro Devices, Inc.
3*b843c749SSergey Zigachev  *
4*b843c749SSergey Zigachev  * Permission is hereby granted, free of charge, to any person obtaining a
5*b843c749SSergey Zigachev  * copy of this software and associated documentation files (the "Software"),
6*b843c749SSergey Zigachev  * to deal in the Software without restriction, including without limitation
7*b843c749SSergey Zigachev  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*b843c749SSergey Zigachev  * and/or sell copies of the Software, and to permit persons to whom the
9*b843c749SSergey Zigachev  * Software is furnished to do so, subject to the following conditions:
10*b843c749SSergey Zigachev  *
11*b843c749SSergey Zigachev  * The above copyright notice and this permission notice shall be included in
12*b843c749SSergey Zigachev  * all copies or substantial portions of the Software.
13*b843c749SSergey Zigachev  *
14*b843c749SSergey Zigachev  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*b843c749SSergey Zigachev  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*b843c749SSergey Zigachev  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*b843c749SSergey Zigachev  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*b843c749SSergey Zigachev  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*b843c749SSergey Zigachev  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*b843c749SSergey Zigachev  * OTHER DEALINGS IN THE SOFTWARE.
21*b843c749SSergey Zigachev  *
22*b843c749SSergey Zigachev  * Authors: AMD
23*b843c749SSergey Zigachev  *
24*b843c749SSergey Zigachev  */
25*b843c749SSergey Zigachev #ifndef __DISPLAY_MODE_STRUCTS_H__
26*b843c749SSergey Zigachev #define __DISPLAY_MODE_STRUCTS_H__
27*b843c749SSergey Zigachev 
28*b843c749SSergey Zigachev typedef struct _vcs_dpi_voltage_scaling_st voltage_scaling_st;
29*b843c749SSergey Zigachev typedef struct _vcs_dpi_soc_bounding_box_st soc_bounding_box_st;
30*b843c749SSergey Zigachev typedef struct _vcs_dpi_ip_params_st ip_params_st;
31*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_pipe_source_params_st display_pipe_source_params_st;
32*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_output_params_st display_output_params_st;
33*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_bandwidth_st display_bandwidth_st;
34*b843c749SSergey Zigachev typedef struct _vcs_dpi_scaler_ratio_depth_st scaler_ratio_depth_st;
35*b843c749SSergey Zigachev typedef struct _vcs_dpi_scaler_taps_st scaler_taps_st;
36*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_pipe_dest_params_st display_pipe_dest_params_st;
37*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_pipe_params_st display_pipe_params_st;
38*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_clocks_and_cfg_st display_clocks_and_cfg_st;
39*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_e2e_pipe_params_st display_e2e_pipe_params_st;
40*b843c749SSergey Zigachev typedef struct _vcs_dpi_dchub_buffer_sizing_st dchub_buffer_sizing_st;
41*b843c749SSergey Zigachev typedef struct _vcs_dpi_watermarks_perf_st watermarks_perf_st;
42*b843c749SSergey Zigachev typedef struct _vcs_dpi_cstate_pstate_watermarks_st cstate_pstate_watermarks_st;
43*b843c749SSergey Zigachev typedef struct _vcs_dpi_wm_calc_pipe_params_st wm_calc_pipe_params_st;
44*b843c749SSergey Zigachev typedef struct _vcs_dpi_vratio_pre_st vratio_pre_st;
45*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_data_rq_misc_params_st display_data_rq_misc_params_st;
46*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_data_rq_sizing_params_st display_data_rq_sizing_params_st;
47*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_data_rq_dlg_params_st display_data_rq_dlg_params_st;
48*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_cur_rq_dlg_params_st display_cur_rq_dlg_params_st;
49*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_rq_dlg_params_st display_rq_dlg_params_st;
50*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_rq_sizing_params_st display_rq_sizing_params_st;
51*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_rq_misc_params_st display_rq_misc_params_st;
52*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_rq_params_st display_rq_params_st;
53*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_dlg_regs_st display_dlg_regs_st;
54*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_ttu_regs_st display_ttu_regs_st;
55*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_data_rq_regs_st display_data_rq_regs_st;
56*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_rq_regs_st display_rq_regs_st;
57*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_dlg_sys_params_st display_dlg_sys_params_st;
58*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_dlg_prefetch_param_st display_dlg_prefetch_param_st;
59*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_pipe_clock_st display_pipe_clock_st;
60*b843c749SSergey Zigachev typedef struct _vcs_dpi_display_arb_params_st display_arb_params_st;
61*b843c749SSergey Zigachev 
62*b843c749SSergey Zigachev struct _vcs_dpi_voltage_scaling_st {
63*b843c749SSergey Zigachev 	int state;
64*b843c749SSergey Zigachev 	double dscclk_mhz;
65*b843c749SSergey Zigachev 	double dcfclk_mhz;
66*b843c749SSergey Zigachev 	double socclk_mhz;
67*b843c749SSergey Zigachev 	double dram_speed_mts;
68*b843c749SSergey Zigachev 	double fabricclk_mhz;
69*b843c749SSergey Zigachev 	double dispclk_mhz;
70*b843c749SSergey Zigachev 	double phyclk_mhz;
71*b843c749SSergey Zigachev 	double dppclk_mhz;
72*b843c749SSergey Zigachev };
73*b843c749SSergey Zigachev 
74*b843c749SSergey Zigachev struct _vcs_dpi_soc_bounding_box_st {
75*b843c749SSergey Zigachev 	double sr_exit_time_us;
76*b843c749SSergey Zigachev 	double sr_enter_plus_exit_time_us;
77*b843c749SSergey Zigachev 	double urgent_latency_us;
78*b843c749SSergey Zigachev 	double urgent_latency_pixel_data_only_us;
79*b843c749SSergey Zigachev 	double urgent_latency_pixel_mixed_with_vm_data_us;
80*b843c749SSergey Zigachev 	double urgent_latency_vm_data_only_us;
81*b843c749SSergey Zigachev 	double writeback_latency_us;
82*b843c749SSergey Zigachev 	double ideal_dram_bw_after_urgent_percent;
83*b843c749SSergey Zigachev 	double pct_ideal_dram_sdp_bw_after_urgent_pixel_only; // PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly
84*b843c749SSergey Zigachev 	double pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm;
85*b843c749SSergey Zigachev 	double pct_ideal_dram_sdp_bw_after_urgent_vm_only;
86*b843c749SSergey Zigachev 	double max_avg_sdp_bw_use_normal_percent;
87*b843c749SSergey Zigachev 	double max_avg_dram_bw_use_normal_percent;
88*b843c749SSergey Zigachev 	unsigned int max_request_size_bytes;
89*b843c749SSergey Zigachev 	double downspread_percent;
90*b843c749SSergey Zigachev 	double dram_page_open_time_ns;
91*b843c749SSergey Zigachev 	double dram_rw_turnaround_time_ns;
92*b843c749SSergey Zigachev 	double dram_return_buffer_per_channel_bytes;
93*b843c749SSergey Zigachev 	double dram_channel_width_bytes;
94*b843c749SSergey Zigachev 	double fabric_datapath_to_dcn_data_return_bytes;
95*b843c749SSergey Zigachev 	double dcn_downspread_percent;
96*b843c749SSergey Zigachev 	double dispclk_dppclk_vco_speed_mhz;
97*b843c749SSergey Zigachev 	double dfs_vco_period_ps;
98*b843c749SSergey Zigachev 	unsigned int urgent_out_of_order_return_per_channel_pixel_only_bytes;
99*b843c749SSergey Zigachev 	unsigned int urgent_out_of_order_return_per_channel_pixel_and_vm_bytes;
100*b843c749SSergey Zigachev 	unsigned int urgent_out_of_order_return_per_channel_vm_only_bytes;
101*b843c749SSergey Zigachev 	unsigned int round_trip_ping_latency_dcfclk_cycles;
102*b843c749SSergey Zigachev 	unsigned int urgent_out_of_order_return_per_channel_bytes;
103*b843c749SSergey Zigachev 	unsigned int channel_interleave_bytes;
104*b843c749SSergey Zigachev 	unsigned int num_banks;
105*b843c749SSergey Zigachev 	unsigned int num_chans;
106*b843c749SSergey Zigachev 	unsigned int vmm_page_size_bytes;
107*b843c749SSergey Zigachev 	double dram_clock_change_latency_us;
108*b843c749SSergey Zigachev 	double writeback_dram_clock_change_latency_us;
109*b843c749SSergey Zigachev 	unsigned int return_bus_width_bytes;
110*b843c749SSergey Zigachev 	unsigned int voltage_override;
111*b843c749SSergey Zigachev 	double xfc_bus_transport_time_us;
112*b843c749SSergey Zigachev 	double xfc_xbuf_latency_tolerance_us;
113*b843c749SSergey Zigachev 	int use_urgent_burst_bw;
114*b843c749SSergey Zigachev 	double max_hscl_ratio;
115*b843c749SSergey Zigachev 	double max_vscl_ratio;
116*b843c749SSergey Zigachev 	struct _vcs_dpi_voltage_scaling_st clock_limits[7];
117*b843c749SSergey Zigachev };
118*b843c749SSergey Zigachev 
119*b843c749SSergey Zigachev struct _vcs_dpi_ip_params_st {
120*b843c749SSergey Zigachev 	bool gpuvm_enable;
121*b843c749SSergey Zigachev 	bool hostvm_enable;
122*b843c749SSergey Zigachev 	unsigned int gpuvm_max_page_table_levels;
123*b843c749SSergey Zigachev 	unsigned int hostvm_max_page_table_levels;
124*b843c749SSergey Zigachev 	unsigned int hostvm_cached_page_table_levels;
125*b843c749SSergey Zigachev 	unsigned int pte_group_size_bytes;
126*b843c749SSergey Zigachev 	unsigned int max_inter_dcn_tile_repeaters;
127*b843c749SSergey Zigachev 	unsigned int num_dsc;
128*b843c749SSergey Zigachev 	unsigned int odm_capable;
129*b843c749SSergey Zigachev 	unsigned int rob_buffer_size_kbytes;
130*b843c749SSergey Zigachev 	unsigned int det_buffer_size_kbytes;
131*b843c749SSergey Zigachev 	unsigned int dpte_buffer_size_in_pte_reqs;
132*b843c749SSergey Zigachev 	unsigned int pde_proc_buffer_size_64k_reqs;
133*b843c749SSergey Zigachev 	unsigned int dpp_output_buffer_pixels;
134*b843c749SSergey Zigachev 	unsigned int opp_output_buffer_lines;
135*b843c749SSergey Zigachev 	unsigned int pixel_chunk_size_kbytes;
136*b843c749SSergey Zigachev 	unsigned char pte_enable;
137*b843c749SSergey Zigachev 	unsigned int pte_chunk_size_kbytes;
138*b843c749SSergey Zigachev 	unsigned int meta_chunk_size_kbytes;
139*b843c749SSergey Zigachev 	unsigned int writeback_chunk_size_kbytes;
140*b843c749SSergey Zigachev 	unsigned int line_buffer_size_bits;
141*b843c749SSergey Zigachev 	unsigned int max_line_buffer_lines;
142*b843c749SSergey Zigachev 	unsigned int writeback_luma_buffer_size_kbytes;
143*b843c749SSergey Zigachev 	unsigned int writeback_chroma_buffer_size_kbytes;
144*b843c749SSergey Zigachev 	unsigned int writeback_chroma_line_buffer_width_pixels;
145*b843c749SSergey Zigachev 	unsigned int max_page_table_levels;
146*b843c749SSergey Zigachev 	unsigned int max_num_dpp;
147*b843c749SSergey Zigachev 	unsigned int max_num_otg;
148*b843c749SSergey Zigachev 	unsigned int cursor_chunk_size;
149*b843c749SSergey Zigachev 	unsigned int cursor_buffer_size;
150*b843c749SSergey Zigachev 	unsigned int max_num_wb;
151*b843c749SSergey Zigachev 	unsigned int max_dchub_pscl_bw_pix_per_clk;
152*b843c749SSergey Zigachev 	unsigned int max_pscl_lb_bw_pix_per_clk;
153*b843c749SSergey Zigachev 	unsigned int max_lb_vscl_bw_pix_per_clk;
154*b843c749SSergey Zigachev 	unsigned int max_vscl_hscl_bw_pix_per_clk;
155*b843c749SSergey Zigachev 	double max_hscl_ratio;
156*b843c749SSergey Zigachev 	double max_vscl_ratio;
157*b843c749SSergey Zigachev 	unsigned int hscl_mults;
158*b843c749SSergey Zigachev 	unsigned int vscl_mults;
159*b843c749SSergey Zigachev 	unsigned int max_hscl_taps;
160*b843c749SSergey Zigachev 	unsigned int max_vscl_taps;
161*b843c749SSergey Zigachev 	unsigned int xfc_supported;
162*b843c749SSergey Zigachev 	unsigned int xfc_fill_constant_bytes;
163*b843c749SSergey Zigachev 	double dispclk_ramp_margin_percent;
164*b843c749SSergey Zigachev 	double xfc_fill_bw_overhead_percent;
165*b843c749SSergey Zigachev 	double underscan_factor;
166*b843c749SSergey Zigachev 	unsigned int min_vblank_lines;
167*b843c749SSergey Zigachev 	unsigned int dppclk_delay_subtotal;
168*b843c749SSergey Zigachev 	unsigned int dispclk_delay_subtotal;
169*b843c749SSergey Zigachev 	unsigned int dcfclk_cstate_latency;
170*b843c749SSergey Zigachev 	unsigned int dppclk_delay_scl;
171*b843c749SSergey Zigachev 	unsigned int dppclk_delay_scl_lb_only;
172*b843c749SSergey Zigachev 	unsigned int dppclk_delay_cnvc_formatter;
173*b843c749SSergey Zigachev 	unsigned int dppclk_delay_cnvc_cursor;
174*b843c749SSergey Zigachev 	unsigned int is_line_buffer_bpp_fixed;
175*b843c749SSergey Zigachev 	unsigned int line_buffer_fixed_bpp;
176*b843c749SSergey Zigachev 	unsigned int dcc_supported;
177*b843c749SSergey Zigachev 
178*b843c749SSergey Zigachev 	unsigned int IsLineBufferBppFixed;
179*b843c749SSergey Zigachev 	unsigned int LineBufferFixedBpp;
180*b843c749SSergey Zigachev 	unsigned int can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one;
181*b843c749SSergey Zigachev 	unsigned int bug_forcing_LC_req_same_size_fixed;
182*b843c749SSergey Zigachev };
183*b843c749SSergey Zigachev 
184*b843c749SSergey Zigachev struct _vcs_dpi_display_xfc_params_st {
185*b843c749SSergey Zigachev 	double xfc_tslv_vready_offset_us;
186*b843c749SSergey Zigachev 	double xfc_tslv_vupdate_width_us;
187*b843c749SSergey Zigachev 	double xfc_tslv_vupdate_offset_us;
188*b843c749SSergey Zigachev 	int xfc_slv_chunk_size_bytes;
189*b843c749SSergey Zigachev };
190*b843c749SSergey Zigachev 
191*b843c749SSergey Zigachev struct _vcs_dpi_display_pipe_source_params_st {
192*b843c749SSergey Zigachev 	int source_format;
193*b843c749SSergey Zigachev 	unsigned char dcc;
194*b843c749SSergey Zigachev 	unsigned int dcc_override;
195*b843c749SSergey Zigachev 	unsigned int dcc_rate;
196*b843c749SSergey Zigachev 	unsigned char dcc_use_global;
197*b843c749SSergey Zigachev 	unsigned char vm;
198*b843c749SSergey Zigachev 	bool gpuvm;    // gpuvm enabled
199*b843c749SSergey Zigachev 	bool hostvm;    // hostvm enabled
200*b843c749SSergey Zigachev 	bool gpuvm_levels_force_en;
201*b843c749SSergey Zigachev 	unsigned int gpuvm_levels_force;
202*b843c749SSergey Zigachev 	bool hostvm_levels_force_en;
203*b843c749SSergey Zigachev 	unsigned int hostvm_levels_force;
204*b843c749SSergey Zigachev 	int source_scan;
205*b843c749SSergey Zigachev 	int sw_mode;
206*b843c749SSergey Zigachev 	int macro_tile_size;
207*b843c749SSergey Zigachev 	unsigned char is_display_sw;
208*b843c749SSergey Zigachev 	unsigned int viewport_width;
209*b843c749SSergey Zigachev 	unsigned int viewport_height;
210*b843c749SSergey Zigachev 	unsigned int viewport_y_y;
211*b843c749SSergey Zigachev 	unsigned int viewport_y_c;
212*b843c749SSergey Zigachev 	unsigned int viewport_width_c;
213*b843c749SSergey Zigachev 	unsigned int viewport_height_c;
214*b843c749SSergey Zigachev 	unsigned int data_pitch;
215*b843c749SSergey Zigachev 	unsigned int data_pitch_c;
216*b843c749SSergey Zigachev 	unsigned int meta_pitch;
217*b843c749SSergey Zigachev 	unsigned int meta_pitch_c;
218*b843c749SSergey Zigachev 	unsigned int cur0_src_width;
219*b843c749SSergey Zigachev 	int cur0_bpp;
220*b843c749SSergey Zigachev 	unsigned int cur1_src_width;
221*b843c749SSergey Zigachev 	int cur1_bpp;
222*b843c749SSergey Zigachev 	int num_cursors;
223*b843c749SSergey Zigachev 	unsigned char is_hsplit;
224*b843c749SSergey Zigachev 	unsigned char dynamic_metadata_enable;
225*b843c749SSergey Zigachev 	unsigned int dynamic_metadata_lines_before_active;
226*b843c749SSergey Zigachev 	unsigned int dynamic_metadata_xmit_bytes;
227*b843c749SSergey Zigachev 	unsigned int hsplit_grp;
228*b843c749SSergey Zigachev 	unsigned char xfc_enable;
229*b843c749SSergey Zigachev 	unsigned char xfc_slave;
230*b843c749SSergey Zigachev 	struct _vcs_dpi_display_xfc_params_st xfc_params;
231*b843c749SSergey Zigachev };
232*b843c749SSergey Zigachev struct writeback_st {
233*b843c749SSergey Zigachev 	int wb_src_height;
234*b843c749SSergey Zigachev 	int wb_dst_width;
235*b843c749SSergey Zigachev 	int wb_dst_height;
236*b843c749SSergey Zigachev 	int wb_pixel_format;
237*b843c749SSergey Zigachev 	int wb_htaps_luma;
238*b843c749SSergey Zigachev 	int wb_vtaps_luma;
239*b843c749SSergey Zigachev 	int wb_htaps_chroma;
240*b843c749SSergey Zigachev 	int wb_vtaps_chroma;
241*b843c749SSergey Zigachev 	double wb_hratio;
242*b843c749SSergey Zigachev 	double wb_vratio;
243*b843c749SSergey Zigachev };
244*b843c749SSergey Zigachev 
245*b843c749SSergey Zigachev struct _vcs_dpi_display_output_params_st {
246*b843c749SSergey Zigachev 	int dp_lanes;
247*b843c749SSergey Zigachev 	int output_bpp;
248*b843c749SSergey Zigachev 	int dsc_enable;
249*b843c749SSergey Zigachev 	int wb_enable;
250*b843c749SSergey Zigachev 	int num_active_wb;
251*b843c749SSergey Zigachev 	int output_bpc;
252*b843c749SSergey Zigachev 	int output_type;
253*b843c749SSergey Zigachev 	int output_format;
254*b843c749SSergey Zigachev 	int output_standard;
255*b843c749SSergey Zigachev 	int dsc_slices;
256*b843c749SSergey Zigachev 	struct writeback_st wb;
257*b843c749SSergey Zigachev };
258*b843c749SSergey Zigachev 
259*b843c749SSergey Zigachev struct _vcs_dpi_display_bandwidth_st {
260*b843c749SSergey Zigachev 	double total_bw_consumed_gbps;
261*b843c749SSergey Zigachev 	double guaranteed_urgent_return_bw_gbps;
262*b843c749SSergey Zigachev };
263*b843c749SSergey Zigachev 
264*b843c749SSergey Zigachev struct _vcs_dpi_scaler_ratio_depth_st {
265*b843c749SSergey Zigachev 	double hscl_ratio;
266*b843c749SSergey Zigachev 	double vscl_ratio;
267*b843c749SSergey Zigachev 	double hscl_ratio_c;
268*b843c749SSergey Zigachev 	double vscl_ratio_c;
269*b843c749SSergey Zigachev 	double vinit;
270*b843c749SSergey Zigachev 	double vinit_c;
271*b843c749SSergey Zigachev 	double vinit_bot;
272*b843c749SSergey Zigachev 	double vinit_bot_c;
273*b843c749SSergey Zigachev 	int lb_depth;
274*b843c749SSergey Zigachev 	int scl_enable;
275*b843c749SSergey Zigachev };
276*b843c749SSergey Zigachev 
277*b843c749SSergey Zigachev struct _vcs_dpi_scaler_taps_st {
278*b843c749SSergey Zigachev 	unsigned int htaps;
279*b843c749SSergey Zigachev 	unsigned int vtaps;
280*b843c749SSergey Zigachev 	unsigned int htaps_c;
281*b843c749SSergey Zigachev 	unsigned int vtaps_c;
282*b843c749SSergey Zigachev };
283*b843c749SSergey Zigachev 
284*b843c749SSergey Zigachev struct _vcs_dpi_display_pipe_dest_params_st {
285*b843c749SSergey Zigachev 	unsigned int recout_width;
286*b843c749SSergey Zigachev 	unsigned int recout_height;
287*b843c749SSergey Zigachev 	unsigned int full_recout_width;
288*b843c749SSergey Zigachev 	unsigned int full_recout_height;
289*b843c749SSergey Zigachev 	unsigned int hblank_start;
290*b843c749SSergey Zigachev 	unsigned int hblank_end;
291*b843c749SSergey Zigachev 	unsigned int vblank_start;
292*b843c749SSergey Zigachev 	unsigned int vblank_end;
293*b843c749SSergey Zigachev 	unsigned int htotal;
294*b843c749SSergey Zigachev 	unsigned int vtotal;
295*b843c749SSergey Zigachev 	unsigned int vactive;
296*b843c749SSergey Zigachev 	unsigned int hactive;
297*b843c749SSergey Zigachev 	unsigned int vstartup_start;
298*b843c749SSergey Zigachev 	unsigned int vupdate_offset;
299*b843c749SSergey Zigachev 	unsigned int vupdate_width;
300*b843c749SSergey Zigachev 	unsigned int vready_offset;
301*b843c749SSergey Zigachev 	unsigned char interlaced;
302*b843c749SSergey Zigachev 	unsigned char underscan;
303*b843c749SSergey Zigachev 	double pixel_rate_mhz;
304*b843c749SSergey Zigachev 	unsigned char synchronized_vblank_all_planes;
305*b843c749SSergey Zigachev 	unsigned char otg_inst;
306*b843c749SSergey Zigachev 	unsigned char odm_split_cnt;
307*b843c749SSergey Zigachev 	unsigned char odm_combine;
308*b843c749SSergey Zigachev 	unsigned char use_maximum_vstartup;
309*b843c749SSergey Zigachev };
310*b843c749SSergey Zigachev 
311*b843c749SSergey Zigachev struct _vcs_dpi_display_pipe_params_st {
312*b843c749SSergey Zigachev 	display_pipe_source_params_st src;
313*b843c749SSergey Zigachev 	display_pipe_dest_params_st dest;
314*b843c749SSergey Zigachev 	scaler_ratio_depth_st scale_ratio_depth;
315*b843c749SSergey Zigachev 	scaler_taps_st scale_taps;
316*b843c749SSergey Zigachev };
317*b843c749SSergey Zigachev 
318*b843c749SSergey Zigachev struct _vcs_dpi_display_clocks_and_cfg_st {
319*b843c749SSergey Zigachev 	int voltage;
320*b843c749SSergey Zigachev 	double dppclk_mhz;
321*b843c749SSergey Zigachev 	double refclk_mhz;
322*b843c749SSergey Zigachev 	double dispclk_mhz;
323*b843c749SSergey Zigachev 	double dcfclk_mhz;
324*b843c749SSergey Zigachev 	double socclk_mhz;
325*b843c749SSergey Zigachev };
326*b843c749SSergey Zigachev 
327*b843c749SSergey Zigachev struct _vcs_dpi_display_e2e_pipe_params_st {
328*b843c749SSergey Zigachev 	display_pipe_params_st pipe;
329*b843c749SSergey Zigachev 	display_output_params_st dout;
330*b843c749SSergey Zigachev 	display_clocks_and_cfg_st clks_cfg;
331*b843c749SSergey Zigachev };
332*b843c749SSergey Zigachev 
333*b843c749SSergey Zigachev struct _vcs_dpi_dchub_buffer_sizing_st {
334*b843c749SSergey Zigachev 	unsigned int swath_width_y;
335*b843c749SSergey Zigachev 	unsigned int swath_height_y;
336*b843c749SSergey Zigachev 	unsigned int swath_height_c;
337*b843c749SSergey Zigachev 	unsigned int detail_buffer_size_y;
338*b843c749SSergey Zigachev };
339*b843c749SSergey Zigachev 
340*b843c749SSergey Zigachev struct _vcs_dpi_watermarks_perf_st {
341*b843c749SSergey Zigachev 	double stutter_eff_in_active_region_percent;
342*b843c749SSergey Zigachev 	double urgent_latency_supported_us;
343*b843c749SSergey Zigachev 	double non_urgent_latency_supported_us;
344*b843c749SSergey Zigachev 	double dram_clock_change_margin_us;
345*b843c749SSergey Zigachev 	double dram_access_eff_percent;
346*b843c749SSergey Zigachev };
347*b843c749SSergey Zigachev 
348*b843c749SSergey Zigachev struct _vcs_dpi_cstate_pstate_watermarks_st {
349*b843c749SSergey Zigachev 	double cstate_exit_us;
350*b843c749SSergey Zigachev 	double cstate_enter_plus_exit_us;
351*b843c749SSergey Zigachev 	double pstate_change_us;
352*b843c749SSergey Zigachev };
353*b843c749SSergey Zigachev 
354*b843c749SSergey Zigachev struct _vcs_dpi_wm_calc_pipe_params_st {
355*b843c749SSergey Zigachev 	unsigned int num_dpp;
356*b843c749SSergey Zigachev 	int voltage;
357*b843c749SSergey Zigachev 	int output_type;
358*b843c749SSergey Zigachev 	double dcfclk_mhz;
359*b843c749SSergey Zigachev 	double socclk_mhz;
360*b843c749SSergey Zigachev 	double dppclk_mhz;
361*b843c749SSergey Zigachev 	double pixclk_mhz;
362*b843c749SSergey Zigachev 	unsigned char interlace_en;
363*b843c749SSergey Zigachev 	unsigned char pte_enable;
364*b843c749SSergey Zigachev 	unsigned char dcc_enable;
365*b843c749SSergey Zigachev 	double dcc_rate;
366*b843c749SSergey Zigachev 	double bytes_per_pixel_c;
367*b843c749SSergey Zigachev 	double bytes_per_pixel_y;
368*b843c749SSergey Zigachev 	unsigned int swath_width_y;
369*b843c749SSergey Zigachev 	unsigned int swath_height_y;
370*b843c749SSergey Zigachev 	unsigned int swath_height_c;
371*b843c749SSergey Zigachev 	unsigned int det_buffer_size_y;
372*b843c749SSergey Zigachev 	double h_ratio;
373*b843c749SSergey Zigachev 	double v_ratio;
374*b843c749SSergey Zigachev 	unsigned int h_taps;
375*b843c749SSergey Zigachev 	unsigned int h_total;
376*b843c749SSergey Zigachev 	unsigned int v_total;
377*b843c749SSergey Zigachev 	unsigned int v_active;
378*b843c749SSergey Zigachev 	unsigned int e2e_index;
379*b843c749SSergey Zigachev 	double display_pipe_line_delivery_time;
380*b843c749SSergey Zigachev 	double read_bw;
381*b843c749SSergey Zigachev 	unsigned int lines_in_det_y;
382*b843c749SSergey Zigachev 	unsigned int lines_in_det_y_rounded_down_to_swath;
383*b843c749SSergey Zigachev 	double full_det_buffering_time;
384*b843c749SSergey Zigachev 	double dcfclk_deepsleep_mhz_per_plane;
385*b843c749SSergey Zigachev };
386*b843c749SSergey Zigachev 
387*b843c749SSergey Zigachev struct _vcs_dpi_vratio_pre_st {
388*b843c749SSergey Zigachev 	double vratio_pre_l;
389*b843c749SSergey Zigachev 	double vratio_pre_c;
390*b843c749SSergey Zigachev };
391*b843c749SSergey Zigachev 
392*b843c749SSergey Zigachev struct _vcs_dpi_display_data_rq_misc_params_st {
393*b843c749SSergey Zigachev 	unsigned int full_swath_bytes;
394*b843c749SSergey Zigachev 	unsigned int stored_swath_bytes;
395*b843c749SSergey Zigachev 	unsigned int blk256_height;
396*b843c749SSergey Zigachev 	unsigned int blk256_width;
397*b843c749SSergey Zigachev 	unsigned int req_height;
398*b843c749SSergey Zigachev 	unsigned int req_width;
399*b843c749SSergey Zigachev };
400*b843c749SSergey Zigachev 
401*b843c749SSergey Zigachev struct _vcs_dpi_display_data_rq_sizing_params_st {
402*b843c749SSergey Zigachev 	unsigned int chunk_bytes;
403*b843c749SSergey Zigachev 	unsigned int min_chunk_bytes;
404*b843c749SSergey Zigachev 	unsigned int meta_chunk_bytes;
405*b843c749SSergey Zigachev 	unsigned int min_meta_chunk_bytes;
406*b843c749SSergey Zigachev 	unsigned int mpte_group_bytes;
407*b843c749SSergey Zigachev 	unsigned int dpte_group_bytes;
408*b843c749SSergey Zigachev };
409*b843c749SSergey Zigachev 
410*b843c749SSergey Zigachev struct _vcs_dpi_display_data_rq_dlg_params_st {
411*b843c749SSergey Zigachev 	unsigned int swath_width_ub;
412*b843c749SSergey Zigachev 	unsigned int swath_height;
413*b843c749SSergey Zigachev 	unsigned int req_per_swath_ub;
414*b843c749SSergey Zigachev 	unsigned int meta_pte_bytes_per_frame_ub;
415*b843c749SSergey Zigachev 	unsigned int dpte_req_per_row_ub;
416*b843c749SSergey Zigachev 	unsigned int dpte_groups_per_row_ub;
417*b843c749SSergey Zigachev 	unsigned int dpte_row_height;
418*b843c749SSergey Zigachev 	unsigned int dpte_bytes_per_row_ub;
419*b843c749SSergey Zigachev 	unsigned int meta_chunks_per_row_ub;
420*b843c749SSergey Zigachev 	unsigned int meta_req_per_row_ub;
421*b843c749SSergey Zigachev 	unsigned int meta_row_height;
422*b843c749SSergey Zigachev 	unsigned int meta_bytes_per_row_ub;
423*b843c749SSergey Zigachev };
424*b843c749SSergey Zigachev 
425*b843c749SSergey Zigachev struct _vcs_dpi_display_cur_rq_dlg_params_st {
426*b843c749SSergey Zigachev 	unsigned char enable;
427*b843c749SSergey Zigachev 	unsigned int swath_height;
428*b843c749SSergey Zigachev 	unsigned int req_per_line;
429*b843c749SSergey Zigachev };
430*b843c749SSergey Zigachev 
431*b843c749SSergey Zigachev struct _vcs_dpi_display_rq_dlg_params_st {
432*b843c749SSergey Zigachev 	display_data_rq_dlg_params_st rq_l;
433*b843c749SSergey Zigachev 	display_data_rq_dlg_params_st rq_c;
434*b843c749SSergey Zigachev 	display_cur_rq_dlg_params_st rq_cur0;
435*b843c749SSergey Zigachev };
436*b843c749SSergey Zigachev 
437*b843c749SSergey Zigachev struct _vcs_dpi_display_rq_sizing_params_st {
438*b843c749SSergey Zigachev 	display_data_rq_sizing_params_st rq_l;
439*b843c749SSergey Zigachev 	display_data_rq_sizing_params_st rq_c;
440*b843c749SSergey Zigachev };
441*b843c749SSergey Zigachev 
442*b843c749SSergey Zigachev struct _vcs_dpi_display_rq_misc_params_st {
443*b843c749SSergey Zigachev 	display_data_rq_misc_params_st rq_l;
444*b843c749SSergey Zigachev 	display_data_rq_misc_params_st rq_c;
445*b843c749SSergey Zigachev };
446*b843c749SSergey Zigachev 
447*b843c749SSergey Zigachev struct _vcs_dpi_display_rq_params_st {
448*b843c749SSergey Zigachev 	unsigned char yuv420;
449*b843c749SSergey Zigachev 	unsigned char yuv420_10bpc;
450*b843c749SSergey Zigachev 	display_rq_misc_params_st misc;
451*b843c749SSergey Zigachev 	display_rq_sizing_params_st sizing;
452*b843c749SSergey Zigachev 	display_rq_dlg_params_st dlg;
453*b843c749SSergey Zigachev };
454*b843c749SSergey Zigachev 
455*b843c749SSergey Zigachev struct _vcs_dpi_display_dlg_regs_st {
456*b843c749SSergey Zigachev 	unsigned int refcyc_h_blank_end;
457*b843c749SSergey Zigachev 	unsigned int dlg_vblank_end;
458*b843c749SSergey Zigachev 	unsigned int min_dst_y_next_start;
459*b843c749SSergey Zigachev 	unsigned int refcyc_per_htotal;
460*b843c749SSergey Zigachev 	unsigned int refcyc_x_after_scaler;
461*b843c749SSergey Zigachev 	unsigned int dst_y_after_scaler;
462*b843c749SSergey Zigachev 	unsigned int dst_y_prefetch;
463*b843c749SSergey Zigachev 	unsigned int dst_y_per_vm_vblank;
464*b843c749SSergey Zigachev 	unsigned int dst_y_per_row_vblank;
465*b843c749SSergey Zigachev 	unsigned int dst_y_per_vm_flip;
466*b843c749SSergey Zigachev 	unsigned int dst_y_per_row_flip;
467*b843c749SSergey Zigachev 	unsigned int ref_freq_to_pix_freq;
468*b843c749SSergey Zigachev 	unsigned int vratio_prefetch;
469*b843c749SSergey Zigachev 	unsigned int vratio_prefetch_c;
470*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_vblank_l;
471*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_vblank_c;
472*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_vblank_l;
473*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_vblank_c;
474*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_flip_l;
475*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_flip_c;
476*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_flip_l;
477*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_flip_c;
478*b843c749SSergey Zigachev 	unsigned int dst_y_per_pte_row_nom_l;
479*b843c749SSergey Zigachev 	unsigned int dst_y_per_pte_row_nom_c;
480*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_nom_l;
481*b843c749SSergey Zigachev 	unsigned int refcyc_per_pte_group_nom_c;
482*b843c749SSergey Zigachev 	unsigned int dst_y_per_meta_row_nom_l;
483*b843c749SSergey Zigachev 	unsigned int dst_y_per_meta_row_nom_c;
484*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_nom_l;
485*b843c749SSergey Zigachev 	unsigned int refcyc_per_meta_chunk_nom_c;
486*b843c749SSergey Zigachev 	unsigned int refcyc_per_line_delivery_pre_l;
487*b843c749SSergey Zigachev 	unsigned int refcyc_per_line_delivery_pre_c;
488*b843c749SSergey Zigachev 	unsigned int refcyc_per_line_delivery_l;
489*b843c749SSergey Zigachev 	unsigned int refcyc_per_line_delivery_c;
490*b843c749SSergey Zigachev 	unsigned int chunk_hdl_adjust_cur0;
491*b843c749SSergey Zigachev 	unsigned int chunk_hdl_adjust_cur1;
492*b843c749SSergey Zigachev 	unsigned int vready_after_vcount0;
493*b843c749SSergey Zigachev 	unsigned int dst_y_offset_cur0;
494*b843c749SSergey Zigachev 	unsigned int dst_y_offset_cur1;
495*b843c749SSergey Zigachev 	unsigned int xfc_reg_transfer_delay;
496*b843c749SSergey Zigachev 	unsigned int xfc_reg_precharge_delay;
497*b843c749SSergey Zigachev 	unsigned int xfc_reg_remote_surface_flip_latency;
498*b843c749SSergey Zigachev 	unsigned int xfc_reg_prefetch_margin;
499*b843c749SSergey Zigachev 	unsigned int dst_y_delta_drq_limit;
500*b843c749SSergey Zigachev };
501*b843c749SSergey Zigachev 
502*b843c749SSergey Zigachev struct _vcs_dpi_display_ttu_regs_st {
503*b843c749SSergey Zigachev 	unsigned int qos_level_low_wm;
504*b843c749SSergey Zigachev 	unsigned int qos_level_high_wm;
505*b843c749SSergey Zigachev 	unsigned int min_ttu_vblank;
506*b843c749SSergey Zigachev 	unsigned int qos_level_flip;
507*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_l;
508*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_c;
509*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_cur0;
510*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_cur1;
511*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_pre_l;
512*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_pre_c;
513*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_pre_cur0;
514*b843c749SSergey Zigachev 	unsigned int refcyc_per_req_delivery_pre_cur1;
515*b843c749SSergey Zigachev 	unsigned int qos_level_fixed_l;
516*b843c749SSergey Zigachev 	unsigned int qos_level_fixed_c;
517*b843c749SSergey Zigachev 	unsigned int qos_level_fixed_cur0;
518*b843c749SSergey Zigachev 	unsigned int qos_level_fixed_cur1;
519*b843c749SSergey Zigachev 	unsigned int qos_ramp_disable_l;
520*b843c749SSergey Zigachev 	unsigned int qos_ramp_disable_c;
521*b843c749SSergey Zigachev 	unsigned int qos_ramp_disable_cur0;
522*b843c749SSergey Zigachev 	unsigned int qos_ramp_disable_cur1;
523*b843c749SSergey Zigachev };
524*b843c749SSergey Zigachev 
525*b843c749SSergey Zigachev struct _vcs_dpi_display_data_rq_regs_st {
526*b843c749SSergey Zigachev 	unsigned int chunk_size;
527*b843c749SSergey Zigachev 	unsigned int min_chunk_size;
528*b843c749SSergey Zigachev 	unsigned int meta_chunk_size;
529*b843c749SSergey Zigachev 	unsigned int min_meta_chunk_size;
530*b843c749SSergey Zigachev 	unsigned int dpte_group_size;
531*b843c749SSergey Zigachev 	unsigned int mpte_group_size;
532*b843c749SSergey Zigachev 	unsigned int swath_height;
533*b843c749SSergey Zigachev 	unsigned int pte_row_height_linear;
534*b843c749SSergey Zigachev };
535*b843c749SSergey Zigachev 
536*b843c749SSergey Zigachev struct _vcs_dpi_display_rq_regs_st {
537*b843c749SSergey Zigachev 	display_data_rq_regs_st rq_regs_l;
538*b843c749SSergey Zigachev 	display_data_rq_regs_st rq_regs_c;
539*b843c749SSergey Zigachev 	unsigned int drq_expansion_mode;
540*b843c749SSergey Zigachev 	unsigned int prq_expansion_mode;
541*b843c749SSergey Zigachev 	unsigned int mrq_expansion_mode;
542*b843c749SSergey Zigachev 	unsigned int crq_expansion_mode;
543*b843c749SSergey Zigachev 	unsigned int plane1_base_address;
544*b843c749SSergey Zigachev };
545*b843c749SSergey Zigachev 
546*b843c749SSergey Zigachev struct _vcs_dpi_display_dlg_sys_params_st {
547*b843c749SSergey Zigachev 	double t_mclk_wm_us;
548*b843c749SSergey Zigachev 	double t_urg_wm_us;
549*b843c749SSergey Zigachev 	double t_sr_wm_us;
550*b843c749SSergey Zigachev 	double t_extra_us;
551*b843c749SSergey Zigachev 	double mem_trip_us;
552*b843c749SSergey Zigachev 	double t_srx_delay_us;
553*b843c749SSergey Zigachev 	double deepsleep_dcfclk_mhz;
554*b843c749SSergey Zigachev 	double total_flip_bw;
555*b843c749SSergey Zigachev 	unsigned int total_flip_bytes;
556*b843c749SSergey Zigachev };
557*b843c749SSergey Zigachev 
558*b843c749SSergey Zigachev struct _vcs_dpi_display_dlg_prefetch_param_st {
559*b843c749SSergey Zigachev 	double prefetch_bw;
560*b843c749SSergey Zigachev 	unsigned int flip_bytes;
561*b843c749SSergey Zigachev };
562*b843c749SSergey Zigachev 
563*b843c749SSergey Zigachev struct _vcs_dpi_display_pipe_clock_st {
564*b843c749SSergey Zigachev 	double dcfclk_mhz;
565*b843c749SSergey Zigachev 	double dispclk_mhz;
566*b843c749SSergey Zigachev 	double socclk_mhz;
567*b843c749SSergey Zigachev 	double dscclk_mhz[6];
568*b843c749SSergey Zigachev 	double dppclk_mhz[6];
569*b843c749SSergey Zigachev };
570*b843c749SSergey Zigachev 
571*b843c749SSergey Zigachev struct _vcs_dpi_display_arb_params_st {
572*b843c749SSergey Zigachev 	int max_req_outstanding;
573*b843c749SSergey Zigachev 	int min_req_outstanding;
574*b843c749SSergey Zigachev 	int sat_level_us;
575*b843c749SSergey Zigachev };
576*b843c749SSergey Zigachev 
577*b843c749SSergey Zigachev #endif /*__DISPLAY_MODE_STRUCTS_H__*/
578