xref: /dragonfly/sys/dev/drm/amd/display/dc/inc/dcn_calcs.h (revision b843c749)
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 
26*b843c749SSergey Zigachev /**
27*b843c749SSergey Zigachev  * Bandwidth and Watermark calculations interface.
28*b843c749SSergey Zigachev  * (Refer to "DCEx_mode_support.xlsm" from Perforce.)
29*b843c749SSergey Zigachev  */
30*b843c749SSergey Zigachev #ifndef __DCN_CALCS_H__
31*b843c749SSergey Zigachev #define __DCN_CALCS_H__
32*b843c749SSergey Zigachev 
33*b843c749SSergey Zigachev #include "bw_fixed.h"
34*b843c749SSergey Zigachev #include "display_clock.h"
35*b843c749SSergey Zigachev #include "../dml/display_mode_lib.h"
36*b843c749SSergey Zigachev 
37*b843c749SSergey Zigachev struct dc;
38*b843c749SSergey Zigachev struct dc_state;
39*b843c749SSergey Zigachev 
40*b843c749SSergey Zigachev /*******************************************************************************
41*b843c749SSergey Zigachev  * DCN data structures.
42*b843c749SSergey Zigachev  ******************************************************************************/
43*b843c749SSergey Zigachev 
44*b843c749SSergey Zigachev #define number_of_planes   6
45*b843c749SSergey Zigachev #define number_of_planes_minus_one   5
46*b843c749SSergey Zigachev #define number_of_states   4
47*b843c749SSergey Zigachev #define number_of_states_plus_one   5
48*b843c749SSergey Zigachev 
49*b843c749SSergey Zigachev #define ddr4_dram_width   64
50*b843c749SSergey Zigachev #define ddr4_dram_factor_single_Channel   16
51*b843c749SSergey Zigachev enum dcn_bw_defs {
52*b843c749SSergey Zigachev 	dcn_bw_v_min0p65,
53*b843c749SSergey Zigachev 	dcn_bw_v_mid0p72,
54*b843c749SSergey Zigachev 	dcn_bw_v_nom0p8,
55*b843c749SSergey Zigachev 	dcn_bw_v_max0p9,
56*b843c749SSergey Zigachev 	dcn_bw_v_max0p91,
57*b843c749SSergey Zigachev 	dcn_bw_no_support = 5,
58*b843c749SSergey Zigachev 	dcn_bw_yes,
59*b843c749SSergey Zigachev 	dcn_bw_hor,
60*b843c749SSergey Zigachev 	dcn_bw_vert,
61*b843c749SSergey Zigachev 	dcn_bw_override,
62*b843c749SSergey Zigachev 	dcn_bw_rgb_sub_64,
63*b843c749SSergey Zigachev 	dcn_bw_rgb_sub_32,
64*b843c749SSergey Zigachev 	dcn_bw_rgb_sub_16,
65*b843c749SSergey Zigachev 	dcn_bw_no,
66*b843c749SSergey Zigachev 	dcn_bw_sw_linear,
67*b843c749SSergey Zigachev 	dcn_bw_sw_4_kb_d,
68*b843c749SSergey Zigachev 	dcn_bw_sw_4_kb_d_x,
69*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_d,
70*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_d_t,
71*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_d_x,
72*b843c749SSergey Zigachev 	dcn_bw_sw_var_d,
73*b843c749SSergey Zigachev 	dcn_bw_sw_var_d_x,
74*b843c749SSergey Zigachev 	dcn_bw_yuv420_sub_8,
75*b843c749SSergey Zigachev 	dcn_bw_sw_4_kb_s,
76*b843c749SSergey Zigachev 	dcn_bw_sw_4_kb_s_x,
77*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_s,
78*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_s_t,
79*b843c749SSergey Zigachev 	dcn_bw_sw_64_kb_s_x,
80*b843c749SSergey Zigachev 	dcn_bw_writeback,
81*b843c749SSergey Zigachev 	dcn_bw_444,
82*b843c749SSergey Zigachev 	dcn_bw_dp,
83*b843c749SSergey Zigachev 	dcn_bw_420,
84*b843c749SSergey Zigachev 	dcn_bw_hdmi,
85*b843c749SSergey Zigachev 	dcn_bw_sw_var_s,
86*b843c749SSergey Zigachev 	dcn_bw_sw_var_s_x,
87*b843c749SSergey Zigachev 	dcn_bw_yuv420_sub_10,
88*b843c749SSergey Zigachev 	dcn_bw_supported_in_v_active,
89*b843c749SSergey Zigachev 	dcn_bw_supported_in_v_blank,
90*b843c749SSergey Zigachev 	dcn_bw_not_supported,
91*b843c749SSergey Zigachev 	dcn_bw_na,
92*b843c749SSergey Zigachev 	dcn_bw_encoder_8bpc,
93*b843c749SSergey Zigachev 	dcn_bw_encoder_10bpc,
94*b843c749SSergey Zigachev 	dcn_bw_encoder_12bpc,
95*b843c749SSergey Zigachev 	dcn_bw_encoder_16bpc,
96*b843c749SSergey Zigachev };
97*b843c749SSergey Zigachev 
98*b843c749SSergey Zigachev /*bounding box parameters*/
99*b843c749SSergey Zigachev /*mode parameters*/
100*b843c749SSergey Zigachev /*system configuration*/
101*b843c749SSergey Zigachev /* display configuration*/
102*b843c749SSergey Zigachev struct dcn_bw_internal_vars {
103*b843c749SSergey Zigachev 	float voltage[number_of_states_plus_one + 1];
104*b843c749SSergey Zigachev 	float max_dispclk[number_of_states_plus_one + 1];
105*b843c749SSergey Zigachev 	float max_dppclk[number_of_states_plus_one + 1];
106*b843c749SSergey Zigachev 	float dcfclk_per_state[number_of_states_plus_one + 1];
107*b843c749SSergey Zigachev 	float phyclk_per_state[number_of_states_plus_one + 1];
108*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_per_state[number_of_states_plus_one + 1];
109*b843c749SSergey Zigachev 	float sr_exit_time;
110*b843c749SSergey Zigachev 	float sr_enter_plus_exit_time;
111*b843c749SSergey Zigachev 	float dram_clock_change_latency;
112*b843c749SSergey Zigachev 	float urgent_latency;
113*b843c749SSergey Zigachev 	float write_back_latency;
114*b843c749SSergey Zigachev 	float percent_of_ideal_drambw_received_after_urg_latency;
115*b843c749SSergey Zigachev 	float dcfclkv_max0p9;
116*b843c749SSergey Zigachev 	float dcfclkv_nom0p8;
117*b843c749SSergey Zigachev 	float dcfclkv_mid0p72;
118*b843c749SSergey Zigachev 	float dcfclkv_min0p65;
119*b843c749SSergey Zigachev 	float max_dispclk_vmax0p9;
120*b843c749SSergey Zigachev 	float max_dppclk_vmax0p9;
121*b843c749SSergey Zigachev 	float max_dispclk_vnom0p8;
122*b843c749SSergey Zigachev 	float max_dppclk_vnom0p8;
123*b843c749SSergey Zigachev 	float max_dispclk_vmid0p72;
124*b843c749SSergey Zigachev 	float max_dppclk_vmid0p72;
125*b843c749SSergey Zigachev 	float max_dispclk_vmin0p65;
126*b843c749SSergey Zigachev 	float max_dppclk_vmin0p65;
127*b843c749SSergey Zigachev 	float socclk;
128*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmax0p9;
129*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vnom0p8;
130*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmid0p72;
131*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmin0p65;
132*b843c749SSergey Zigachev 	float round_trip_ping_latency_cycles;
133*b843c749SSergey Zigachev 	float urgent_out_of_order_return_per_channel;
134*b843c749SSergey Zigachev 	float number_of_channels;
135*b843c749SSergey Zigachev 	float vmm_page_size;
136*b843c749SSergey Zigachev 	float return_bus_width;
137*b843c749SSergey Zigachev 	float rob_buffer_size_in_kbyte;
138*b843c749SSergey Zigachev 	float det_buffer_size_in_kbyte;
139*b843c749SSergey Zigachev 	float dpp_output_buffer_pixels;
140*b843c749SSergey Zigachev 	float opp_output_buffer_lines;
141*b843c749SSergey Zigachev 	float pixel_chunk_size_in_kbyte;
142*b843c749SSergey Zigachev 	float pte_chunk_size;
143*b843c749SSergey Zigachev 	float meta_chunk_size;
144*b843c749SSergey Zigachev 	float writeback_chunk_size;
145*b843c749SSergey Zigachev 	enum dcn_bw_defs odm_capability;
146*b843c749SSergey Zigachev 	enum dcn_bw_defs dsc_capability;
147*b843c749SSergey Zigachev 	float line_buffer_size;
148*b843c749SSergey Zigachev 	enum dcn_bw_defs is_line_buffer_bpp_fixed;
149*b843c749SSergey Zigachev 	float line_buffer_fixed_bpp;
150*b843c749SSergey Zigachev 	float max_line_buffer_lines;
151*b843c749SSergey Zigachev 	float writeback_luma_buffer_size;
152*b843c749SSergey Zigachev 	float writeback_chroma_buffer_size;
153*b843c749SSergey Zigachev 	float max_num_dpp;
154*b843c749SSergey Zigachev 	float max_num_writeback;
155*b843c749SSergey Zigachev 	float max_dchub_topscl_throughput;
156*b843c749SSergey Zigachev 	float max_pscl_tolb_throughput;
157*b843c749SSergey Zigachev 	float max_lb_tovscl_throughput;
158*b843c749SSergey Zigachev 	float max_vscl_tohscl_throughput;
159*b843c749SSergey Zigachev 	float max_hscl_ratio;
160*b843c749SSergey Zigachev 	float max_vscl_ratio;
161*b843c749SSergey Zigachev 	float max_hscl_taps;
162*b843c749SSergey Zigachev 	float max_vscl_taps;
163*b843c749SSergey Zigachev 	float under_scan_factor;
164*b843c749SSergey Zigachev 	float phyclkv_max0p9;
165*b843c749SSergey Zigachev 	float phyclkv_nom0p8;
166*b843c749SSergey Zigachev 	float phyclkv_mid0p72;
167*b843c749SSergey Zigachev 	float phyclkv_min0p65;
168*b843c749SSergey Zigachev 	float pte_buffer_size_in_requests;
169*b843c749SSergey Zigachev 	float dispclk_ramping_margin;
170*b843c749SSergey Zigachev 	float downspreading;
171*b843c749SSergey Zigachev 	float max_inter_dcn_tile_repeaters;
172*b843c749SSergey Zigachev 	enum dcn_bw_defs can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one;
173*b843c749SSergey Zigachev 	enum dcn_bw_defs bug_forcing_luma_and_chroma_request_to_same_size_fixed;
174*b843c749SSergey Zigachev 	int mode;
175*b843c749SSergey Zigachev 	float viewport_width[number_of_planes_minus_one + 1];
176*b843c749SSergey Zigachev 	float htotal[number_of_planes_minus_one + 1];
177*b843c749SSergey Zigachev 	float vtotal[number_of_planes_minus_one + 1];
178*b843c749SSergey Zigachev 	float v_sync_plus_back_porch[number_of_planes_minus_one + 1];
179*b843c749SSergey Zigachev 	float vactive[number_of_planes_minus_one + 1];
180*b843c749SSergey Zigachev 	float pixel_clock[number_of_planes_minus_one + 1]; /*MHz*/
181*b843c749SSergey Zigachev 	float viewport_height[number_of_planes_minus_one + 1];
182*b843c749SSergey Zigachev 	enum dcn_bw_defs dcc_enable[number_of_planes_minus_one + 1];
183*b843c749SSergey Zigachev 	float dcc_rate[number_of_planes_minus_one + 1];
184*b843c749SSergey Zigachev 	enum dcn_bw_defs source_scan[number_of_planes_minus_one + 1];
185*b843c749SSergey Zigachev 	float lb_bit_per_pixel[number_of_planes_minus_one + 1];
186*b843c749SSergey Zigachev 	enum dcn_bw_defs source_pixel_format[number_of_planes_minus_one + 1];
187*b843c749SSergey Zigachev 	enum dcn_bw_defs source_surface_mode[number_of_planes_minus_one + 1];
188*b843c749SSergey Zigachev 	enum dcn_bw_defs output_format[number_of_planes_minus_one + 1];
189*b843c749SSergey Zigachev 	enum dcn_bw_defs output_deep_color[number_of_planes_minus_one + 1];
190*b843c749SSergey Zigachev 	enum dcn_bw_defs output[number_of_planes_minus_one + 1];
191*b843c749SSergey Zigachev 	float scaler_rec_out_width[number_of_planes_minus_one + 1];
192*b843c749SSergey Zigachev 	float scaler_recout_height[number_of_planes_minus_one + 1];
193*b843c749SSergey Zigachev 	float underscan_output[number_of_planes_minus_one + 1];
194*b843c749SSergey Zigachev 	float interlace_output[number_of_planes_minus_one + 1];
195*b843c749SSergey Zigachev 	float override_hta_ps[number_of_planes_minus_one + 1];
196*b843c749SSergey Zigachev 	float override_vta_ps[number_of_planes_minus_one + 1];
197*b843c749SSergey Zigachev 	float override_hta_pschroma[number_of_planes_minus_one + 1];
198*b843c749SSergey Zigachev 	float override_vta_pschroma[number_of_planes_minus_one + 1];
199*b843c749SSergey Zigachev 	float urgent_latency_support_us[number_of_planes_minus_one + 1];
200*b843c749SSergey Zigachev 	float h_ratio[number_of_planes_minus_one + 1];
201*b843c749SSergey Zigachev 	float v_ratio[number_of_planes_minus_one + 1];
202*b843c749SSergey Zigachev 	float htaps[number_of_planes_minus_one + 1];
203*b843c749SSergey Zigachev 	float vtaps[number_of_planes_minus_one + 1];
204*b843c749SSergey Zigachev 	float hta_pschroma[number_of_planes_minus_one + 1];
205*b843c749SSergey Zigachev 	float vta_pschroma[number_of_planes_minus_one + 1];
206*b843c749SSergey Zigachev 	enum dcn_bw_defs pte_enable;
207*b843c749SSergey Zigachev 	enum dcn_bw_defs synchronized_vblank;
208*b843c749SSergey Zigachev 	enum dcn_bw_defs ta_pscalculation;
209*b843c749SSergey Zigachev 	int voltage_override_level;
210*b843c749SSergey Zigachev 	int number_of_active_planes;
211*b843c749SSergey Zigachev 	int voltage_level;
212*b843c749SSergey Zigachev 	enum dcn_bw_defs immediate_flip_supported;
213*b843c749SSergey Zigachev 	float dcfclk;
214*b843c749SSergey Zigachev 	float max_phyclk;
215*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth;
216*b843c749SSergey Zigachev 	float dpp_per_plane_per_ratio[1 + 1][number_of_planes_minus_one + 1];
217*b843c749SSergey Zigachev 	enum dcn_bw_defs dispclk_dppclk_support_per_ratio[1 + 1];
218*b843c749SSergey Zigachev 	float required_dispclk_per_ratio[1 + 1];
219*b843c749SSergey Zigachev 	enum dcn_bw_defs error_message[1 + 1];
220*b843c749SSergey Zigachev 	int dispclk_dppclk_ratio;
221*b843c749SSergey Zigachev 	float dpp_per_plane[number_of_planes_minus_one + 1];
222*b843c749SSergey Zigachev 	float det_buffer_size_y[number_of_planes_minus_one + 1];
223*b843c749SSergey Zigachev 	float det_buffer_size_c[number_of_planes_minus_one + 1];
224*b843c749SSergey Zigachev 	float swath_height_y[number_of_planes_minus_one + 1];
225*b843c749SSergey Zigachev 	float swath_height_c[number_of_planes_minus_one + 1];
226*b843c749SSergey Zigachev 	enum dcn_bw_defs final_error_message;
227*b843c749SSergey Zigachev 	float frequency;
228*b843c749SSergey Zigachev 	float header_line;
229*b843c749SSergey Zigachev 	float header;
230*b843c749SSergey Zigachev 	enum dcn_bw_defs voltage_override;
231*b843c749SSergey Zigachev 	enum dcn_bw_defs allow_different_hratio_vratio;
232*b843c749SSergey Zigachev 	float acceptable_quality_hta_ps;
233*b843c749SSergey Zigachev 	float acceptable_quality_vta_ps;
234*b843c749SSergey Zigachev 	float no_of_dpp[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
235*b843c749SSergey Zigachev 	float swath_width_yper_state[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
236*b843c749SSergey Zigachev 	float swath_height_yper_state[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
237*b843c749SSergey Zigachev 	float swath_height_cper_state[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
238*b843c749SSergey Zigachev 	float urgent_latency_support_us_per_state[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
239*b843c749SSergey Zigachev 	float v_ratio_pre_ywith_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
240*b843c749SSergey Zigachev 	float v_ratio_pre_cwith_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
241*b843c749SSergey Zigachev 	float required_prefetch_pixel_data_bw_with_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
242*b843c749SSergey Zigachev 	float v_ratio_pre_ywithout_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
243*b843c749SSergey Zigachev 	float v_ratio_pre_cwithout_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
244*b843c749SSergey Zigachev 	float required_prefetch_pixel_data_bw_without_immediate_flip[number_of_states_plus_one + 1][1 + 1][number_of_planes_minus_one + 1];
245*b843c749SSergey Zigachev 	enum dcn_bw_defs prefetch_supported_with_immediate_flip[number_of_states_plus_one + 1][1 + 1];
246*b843c749SSergey Zigachev 	enum dcn_bw_defs prefetch_supported_without_immediate_flip[number_of_states_plus_one + 1][1 + 1];
247*b843c749SSergey Zigachev 	enum dcn_bw_defs v_ratio_in_prefetch_supported_with_immediate_flip[number_of_states_plus_one + 1][1 + 1];
248*b843c749SSergey Zigachev 	enum dcn_bw_defs v_ratio_in_prefetch_supported_without_immediate_flip[number_of_states_plus_one + 1][1 + 1];
249*b843c749SSergey Zigachev 	float required_dispclk[number_of_states_plus_one + 1][1 + 1];
250*b843c749SSergey Zigachev 	enum dcn_bw_defs dispclk_dppclk_support[number_of_states_plus_one + 1][1 + 1];
251*b843c749SSergey Zigachev 	enum dcn_bw_defs total_available_pipes_support[number_of_states_plus_one + 1][1 + 1];
252*b843c749SSergey Zigachev 	float total_number_of_active_dpp[number_of_states_plus_one + 1][1 + 1];
253*b843c749SSergey Zigachev 	float total_number_of_dcc_active_dpp[number_of_states_plus_one + 1][1 + 1];
254*b843c749SSergey Zigachev 	enum dcn_bw_defs urgent_latency_support[number_of_states_plus_one + 1][1 + 1];
255*b843c749SSergey Zigachev 	enum dcn_bw_defs mode_support_with_immediate_flip[number_of_states_plus_one + 1][1 + 1];
256*b843c749SSergey Zigachev 	enum dcn_bw_defs mode_support_without_immediate_flip[number_of_states_plus_one + 1][1 + 1];
257*b843c749SSergey Zigachev 	float return_bw_per_state[number_of_states_plus_one + 1];
258*b843c749SSergey Zigachev 	enum dcn_bw_defs dio_support[number_of_states_plus_one + 1];
259*b843c749SSergey Zigachev 	float urgent_round_trip_and_out_of_order_latency_per_state[number_of_states_plus_one + 1];
260*b843c749SSergey Zigachev 	enum dcn_bw_defs rob_support[number_of_states_plus_one + 1];
261*b843c749SSergey Zigachev 	enum dcn_bw_defs bandwidth_support[number_of_states_plus_one + 1];
262*b843c749SSergey Zigachev 	float prefetch_bw[number_of_planes_minus_one + 1];
263*b843c749SSergey Zigachev 	float meta_pte_bytes_per_frame[number_of_planes_minus_one + 1];
264*b843c749SSergey Zigachev 	float meta_row_bytes[number_of_planes_minus_one + 1];
265*b843c749SSergey Zigachev 	float dpte_bytes_per_row[number_of_planes_minus_one + 1];
266*b843c749SSergey Zigachev 	float prefetch_lines_y[number_of_planes_minus_one + 1];
267*b843c749SSergey Zigachev 	float prefetch_lines_c[number_of_planes_minus_one + 1];
268*b843c749SSergey Zigachev 	float max_num_sw_y[number_of_planes_minus_one + 1];
269*b843c749SSergey Zigachev 	float max_num_sw_c[number_of_planes_minus_one + 1];
270*b843c749SSergey Zigachev 	float line_times_for_prefetch[number_of_planes_minus_one + 1];
271*b843c749SSergey Zigachev 	float lines_for_meta_pte_with_immediate_flip[number_of_planes_minus_one + 1];
272*b843c749SSergey Zigachev 	float lines_for_meta_pte_without_immediate_flip[number_of_planes_minus_one + 1];
273*b843c749SSergey Zigachev 	float lines_for_meta_and_dpte_row_with_immediate_flip[number_of_planes_minus_one + 1];
274*b843c749SSergey Zigachev 	float lines_for_meta_and_dpte_row_without_immediate_flip[number_of_planes_minus_one + 1];
275*b843c749SSergey Zigachev 	float min_dppclk_using_single_dpp[number_of_planes_minus_one + 1];
276*b843c749SSergey Zigachev 	float swath_width_ysingle_dpp[number_of_planes_minus_one + 1];
277*b843c749SSergey Zigachev 	float byte_per_pixel_in_dety[number_of_planes_minus_one + 1];
278*b843c749SSergey Zigachev 	float byte_per_pixel_in_detc[number_of_planes_minus_one + 1];
279*b843c749SSergey Zigachev 	float number_of_dpp_required_for_det_and_lb_size[number_of_planes_minus_one + 1];
280*b843c749SSergey Zigachev 	float required_phyclk[number_of_planes_minus_one + 1];
281*b843c749SSergey Zigachev 	float read256_block_height_y[number_of_planes_minus_one + 1];
282*b843c749SSergey Zigachev 	float read256_block_width_y[number_of_planes_minus_one + 1];
283*b843c749SSergey Zigachev 	float read256_block_height_c[number_of_planes_minus_one + 1];
284*b843c749SSergey Zigachev 	float read256_block_width_c[number_of_planes_minus_one + 1];
285*b843c749SSergey Zigachev 	float max_swath_height_y[number_of_planes_minus_one + 1];
286*b843c749SSergey Zigachev 	float max_swath_height_c[number_of_planes_minus_one + 1];
287*b843c749SSergey Zigachev 	float min_swath_height_y[number_of_planes_minus_one + 1];
288*b843c749SSergey Zigachev 	float min_swath_height_c[number_of_planes_minus_one + 1];
289*b843c749SSergey Zigachev 	float read_bandwidth[number_of_planes_minus_one + 1];
290*b843c749SSergey Zigachev 	float write_bandwidth[number_of_planes_minus_one + 1];
291*b843c749SSergey Zigachev 	float pscl_factor[number_of_planes_minus_one + 1];
292*b843c749SSergey Zigachev 	float pscl_factor_chroma[number_of_planes_minus_one + 1];
293*b843c749SSergey Zigachev 	enum dcn_bw_defs scale_ratio_support;
294*b843c749SSergey Zigachev 	enum dcn_bw_defs source_format_pixel_and_scan_support;
295*b843c749SSergey Zigachev 	float total_read_bandwidth_consumed_gbyte_per_second;
296*b843c749SSergey Zigachev 	float total_write_bandwidth_consumed_gbyte_per_second;
297*b843c749SSergey Zigachev 	float total_bandwidth_consumed_gbyte_per_second;
298*b843c749SSergey Zigachev 	enum dcn_bw_defs dcc_enabled_in_any_plane;
299*b843c749SSergey Zigachev 	float return_bw_todcn_per_state;
300*b843c749SSergey Zigachev 	float critical_point;
301*b843c749SSergey Zigachev 	enum dcn_bw_defs writeback_latency_support;
302*b843c749SSergey Zigachev 	float required_output_bw;
303*b843c749SSergey Zigachev 	float total_number_of_active_writeback;
304*b843c749SSergey Zigachev 	enum dcn_bw_defs total_available_writeback_support;
305*b843c749SSergey Zigachev 	float maximum_swath_width;
306*b843c749SSergey Zigachev 	float number_of_dpp_required_for_det_size;
307*b843c749SSergey Zigachev 	float number_of_dpp_required_for_lb_size;
308*b843c749SSergey Zigachev 	float min_dispclk_using_single_dpp;
309*b843c749SSergey Zigachev 	float min_dispclk_using_dual_dpp;
310*b843c749SSergey Zigachev 	enum dcn_bw_defs viewport_size_support;
311*b843c749SSergey Zigachev 	float swath_width_granularity_y;
312*b843c749SSergey Zigachev 	float rounded_up_max_swath_size_bytes_y;
313*b843c749SSergey Zigachev 	float swath_width_granularity_c;
314*b843c749SSergey Zigachev 	float rounded_up_max_swath_size_bytes_c;
315*b843c749SSergey Zigachev 	float lines_in_det_luma;
316*b843c749SSergey Zigachev 	float lines_in_det_chroma;
317*b843c749SSergey Zigachev 	float effective_lb_latency_hiding_source_lines_luma;
318*b843c749SSergey Zigachev 	float effective_lb_latency_hiding_source_lines_chroma;
319*b843c749SSergey Zigachev 	float effective_detlb_lines_luma;
320*b843c749SSergey Zigachev 	float effective_detlb_lines_chroma;
321*b843c749SSergey Zigachev 	float projected_dcfclk_deep_sleep;
322*b843c749SSergey Zigachev 	float meta_req_height_y;
323*b843c749SSergey Zigachev 	float meta_req_width_y;
324*b843c749SSergey Zigachev 	float meta_surface_width_y;
325*b843c749SSergey Zigachev 	float meta_surface_height_y;
326*b843c749SSergey Zigachev 	float meta_pte_bytes_per_frame_y;
327*b843c749SSergey Zigachev 	float meta_row_bytes_y;
328*b843c749SSergey Zigachev 	float macro_tile_block_size_bytes_y;
329*b843c749SSergey Zigachev 	float macro_tile_block_height_y;
330*b843c749SSergey Zigachev 	float data_pte_req_height_y;
331*b843c749SSergey Zigachev 	float data_pte_req_width_y;
332*b843c749SSergey Zigachev 	float dpte_bytes_per_row_y;
333*b843c749SSergey Zigachev 	float meta_req_height_c;
334*b843c749SSergey Zigachev 	float meta_req_width_c;
335*b843c749SSergey Zigachev 	float meta_surface_width_c;
336*b843c749SSergey Zigachev 	float meta_surface_height_c;
337*b843c749SSergey Zigachev 	float meta_pte_bytes_per_frame_c;
338*b843c749SSergey Zigachev 	float meta_row_bytes_c;
339*b843c749SSergey Zigachev 	float macro_tile_block_size_bytes_c;
340*b843c749SSergey Zigachev 	float macro_tile_block_height_c;
341*b843c749SSergey Zigachev 	float macro_tile_block_width_c;
342*b843c749SSergey Zigachev 	float data_pte_req_height_c;
343*b843c749SSergey Zigachev 	float data_pte_req_width_c;
344*b843c749SSergey Zigachev 	float dpte_bytes_per_row_c;
345*b843c749SSergey Zigachev 	float v_init_y;
346*b843c749SSergey Zigachev 	float max_partial_sw_y;
347*b843c749SSergey Zigachev 	float v_init_c;
348*b843c749SSergey Zigachev 	float max_partial_sw_c;
349*b843c749SSergey Zigachev 	float dst_x_after_scaler;
350*b843c749SSergey Zigachev 	float dst_y_after_scaler;
351*b843c749SSergey Zigachev 	float time_calc;
352*b843c749SSergey Zigachev 	float v_update_offset[number_of_planes_minus_one + 1][2];
353*b843c749SSergey Zigachev 	float total_repeater_delay;
354*b843c749SSergey Zigachev 	float v_update_width[number_of_planes_minus_one + 1][2];
355*b843c749SSergey Zigachev 	float v_ready_offset[number_of_planes_minus_one + 1][2];
356*b843c749SSergey Zigachev 	float time_setup;
357*b843c749SSergey Zigachev 	float extra_latency;
358*b843c749SSergey Zigachev 	float maximum_vstartup;
359*b843c749SSergey Zigachev 	float bw_available_for_immediate_flip;
360*b843c749SSergey Zigachev 	float total_immediate_flip_bytes[number_of_planes_minus_one + 1];
361*b843c749SSergey Zigachev 	float time_for_meta_pte_with_immediate_flip;
362*b843c749SSergey Zigachev 	float time_for_meta_pte_without_immediate_flip;
363*b843c749SSergey Zigachev 	float time_for_meta_and_dpte_row_with_immediate_flip;
364*b843c749SSergey Zigachev 	float time_for_meta_and_dpte_row_without_immediate_flip;
365*b843c749SSergey Zigachev 	float line_times_to_request_prefetch_pixel_data_with_immediate_flip;
366*b843c749SSergey Zigachev 	float line_times_to_request_prefetch_pixel_data_without_immediate_flip;
367*b843c749SSergey Zigachev 	float maximum_read_bandwidth_with_prefetch_with_immediate_flip;
368*b843c749SSergey Zigachev 	float maximum_read_bandwidth_with_prefetch_without_immediate_flip;
369*b843c749SSergey Zigachev 	float voltage_level_with_immediate_flip;
370*b843c749SSergey Zigachev 	float voltage_level_without_immediate_flip;
371*b843c749SSergey Zigachev 	float total_number_of_active_dpp_per_ratio[1 + 1];
372*b843c749SSergey Zigachev 	float byte_per_pix_dety;
373*b843c749SSergey Zigachev 	float byte_per_pix_detc;
374*b843c749SSergey Zigachev 	float read256_bytes_block_height_y;
375*b843c749SSergey Zigachev 	float read256_bytes_block_width_y;
376*b843c749SSergey Zigachev 	float read256_bytes_block_height_c;
377*b843c749SSergey Zigachev 	float read256_bytes_block_width_c;
378*b843c749SSergey Zigachev 	float maximum_swath_height_y;
379*b843c749SSergey Zigachev 	float maximum_swath_height_c;
380*b843c749SSergey Zigachev 	float minimum_swath_height_y;
381*b843c749SSergey Zigachev 	float minimum_swath_height_c;
382*b843c749SSergey Zigachev 	float swath_width;
383*b843c749SSergey Zigachev 	float prefetch_bandwidth[number_of_planes_minus_one + 1];
384*b843c749SSergey Zigachev 	float v_init_pre_fill_y[number_of_planes_minus_one + 1];
385*b843c749SSergey Zigachev 	float v_init_pre_fill_c[number_of_planes_minus_one + 1];
386*b843c749SSergey Zigachev 	float max_num_swath_y[number_of_planes_minus_one + 1];
387*b843c749SSergey Zigachev 	float max_num_swath_c[number_of_planes_minus_one + 1];
388*b843c749SSergey Zigachev 	float prefill_y[number_of_planes_minus_one + 1];
389*b843c749SSergey Zigachev 	float prefill_c[number_of_planes_minus_one + 1];
390*b843c749SSergey Zigachev 	float v_startup[number_of_planes_minus_one + 1];
391*b843c749SSergey Zigachev 	enum dcn_bw_defs allow_dram_clock_change_during_vblank[number_of_planes_minus_one + 1];
392*b843c749SSergey Zigachev 	float allow_dram_self_refresh_during_vblank[number_of_planes_minus_one + 1];
393*b843c749SSergey Zigachev 	float v_ratio_prefetch_y[number_of_planes_minus_one + 1];
394*b843c749SSergey Zigachev 	float v_ratio_prefetch_c[number_of_planes_minus_one + 1];
395*b843c749SSergey Zigachev 	float destination_lines_for_prefetch[number_of_planes_minus_one + 1];
396*b843c749SSergey Zigachev 	float destination_lines_to_request_vm_inv_blank[number_of_planes_minus_one + 1];
397*b843c749SSergey Zigachev 	float destination_lines_to_request_row_in_vblank[number_of_planes_minus_one + 1];
398*b843c749SSergey Zigachev 	float min_ttuv_blank[number_of_planes_minus_one + 1];
399*b843c749SSergey Zigachev 	float byte_per_pixel_dety[number_of_planes_minus_one + 1];
400*b843c749SSergey Zigachev 	float byte_per_pixel_detc[number_of_planes_minus_one + 1];
401*b843c749SSergey Zigachev 	float swath_width_y[number_of_planes_minus_one + 1];
402*b843c749SSergey Zigachev 	float lines_in_dety[number_of_planes_minus_one + 1];
403*b843c749SSergey Zigachev 	float lines_in_dety_rounded_down_to_swath[number_of_planes_minus_one + 1];
404*b843c749SSergey Zigachev 	float lines_in_detc[number_of_planes_minus_one + 1];
405*b843c749SSergey Zigachev 	float lines_in_detc_rounded_down_to_swath[number_of_planes_minus_one + 1];
406*b843c749SSergey Zigachev 	float full_det_buffering_time_y[number_of_planes_minus_one + 1];
407*b843c749SSergey Zigachev 	float full_det_buffering_time_c[number_of_planes_minus_one + 1];
408*b843c749SSergey Zigachev 	float active_dram_clock_change_latency_margin[number_of_planes_minus_one + 1];
409*b843c749SSergey Zigachev 	float v_blank_dram_clock_change_latency_margin[number_of_planes_minus_one + 1];
410*b843c749SSergey Zigachev 	float dcfclk_deep_sleep_per_plane[number_of_planes_minus_one + 1];
411*b843c749SSergey Zigachev 	float read_bandwidth_plane_luma[number_of_planes_minus_one + 1];
412*b843c749SSergey Zigachev 	float read_bandwidth_plane_chroma[number_of_planes_minus_one + 1];
413*b843c749SSergey Zigachev 	float display_pipe_line_delivery_time_luma[number_of_planes_minus_one + 1];
414*b843c749SSergey Zigachev 	float display_pipe_line_delivery_time_chroma[number_of_planes_minus_one + 1];
415*b843c749SSergey Zigachev 	float display_pipe_line_delivery_time_luma_prefetch[number_of_planes_minus_one + 1];
416*b843c749SSergey Zigachev 	float display_pipe_line_delivery_time_chroma_prefetch[number_of_planes_minus_one + 1];
417*b843c749SSergey Zigachev 	float pixel_pte_bytes_per_row[number_of_planes_minus_one + 1];
418*b843c749SSergey Zigachev 	float meta_pte_bytes_frame[number_of_planes_minus_one + 1];
419*b843c749SSergey Zigachev 	float meta_row_byte[number_of_planes_minus_one + 1];
420*b843c749SSergey Zigachev 	float prefetch_source_lines_y[number_of_planes_minus_one + 1];
421*b843c749SSergey Zigachev 	float prefetch_source_lines_c[number_of_planes_minus_one + 1];
422*b843c749SSergey Zigachev 	float pscl_throughput[number_of_planes_minus_one + 1];
423*b843c749SSergey Zigachev 	float pscl_throughput_chroma[number_of_planes_minus_one + 1];
424*b843c749SSergey Zigachev 	float output_bpphdmi[number_of_planes_minus_one + 1];
425*b843c749SSergey Zigachev 	float output_bppdp4_lane_hbr[number_of_planes_minus_one + 1];
426*b843c749SSergey Zigachev 	float output_bppdp4_lane_hbr2[number_of_planes_minus_one + 1];
427*b843c749SSergey Zigachev 	float output_bppdp4_lane_hbr3[number_of_planes_minus_one + 1];
428*b843c749SSergey Zigachev 	float max_vstartup_lines[number_of_planes_minus_one + 1];
429*b843c749SSergey Zigachev 	float dispclk_with_ramping;
430*b843c749SSergey Zigachev 	float dispclk_without_ramping;
431*b843c749SSergey Zigachev 	float dppclk_using_single_dpp_luma;
432*b843c749SSergey Zigachev 	float dppclk_using_single_dpp;
433*b843c749SSergey Zigachev 	float dppclk_using_single_dpp_chroma;
434*b843c749SSergey Zigachev 	enum dcn_bw_defs odm_capable;
435*b843c749SSergey Zigachev 	float dispclk;
436*b843c749SSergey Zigachev 	float dppclk;
437*b843c749SSergey Zigachev 	float return_bandwidth_to_dcn;
438*b843c749SSergey Zigachev 	enum dcn_bw_defs dcc_enabled_any_plane;
439*b843c749SSergey Zigachev 	float return_bw;
440*b843c749SSergey Zigachev 	float critical_compression;
441*b843c749SSergey Zigachev 	float total_data_read_bandwidth;
442*b843c749SSergey Zigachev 	float total_active_dpp;
443*b843c749SSergey Zigachev 	float total_dcc_active_dpp;
444*b843c749SSergey Zigachev 	float urgent_round_trip_and_out_of_order_latency;
445*b843c749SSergey Zigachev 	float last_pixel_of_line_extra_watermark;
446*b843c749SSergey Zigachev 	float data_fabric_line_delivery_time_luma;
447*b843c749SSergey Zigachev 	float data_fabric_line_delivery_time_chroma;
448*b843c749SSergey Zigachev 	float urgent_extra_latency;
449*b843c749SSergey Zigachev 	float urgent_watermark;
450*b843c749SSergey Zigachev 	float ptemeta_urgent_watermark;
451*b843c749SSergey Zigachev 	float dram_clock_change_watermark;
452*b843c749SSergey Zigachev 	float total_active_writeback;
453*b843c749SSergey Zigachev 	float writeback_dram_clock_change_watermark;
454*b843c749SSergey Zigachev 	float min_full_det_buffering_time;
455*b843c749SSergey Zigachev 	float frame_time_for_min_full_det_buffering_time;
456*b843c749SSergey Zigachev 	float average_read_bandwidth_gbyte_per_second;
457*b843c749SSergey Zigachev 	float part_of_burst_that_fits_in_rob;
458*b843c749SSergey Zigachev 	float stutter_burst_time;
459*b843c749SSergey Zigachev 	float stutter_efficiency_not_including_vblank;
460*b843c749SSergey Zigachev 	float smallest_vblank;
461*b843c749SSergey Zigachev 	float v_blank_time;
462*b843c749SSergey Zigachev 	float stutter_efficiency;
463*b843c749SSergey Zigachev 	float dcf_clk_deep_sleep;
464*b843c749SSergey Zigachev 	float stutter_exit_watermark;
465*b843c749SSergey Zigachev 	float stutter_enter_plus_exit_watermark;
466*b843c749SSergey Zigachev 	float effective_det_plus_lb_lines_luma;
467*b843c749SSergey Zigachev 	float urgent_latency_support_us_luma;
468*b843c749SSergey Zigachev 	float effective_det_plus_lb_lines_chroma;
469*b843c749SSergey Zigachev 	float urgent_latency_support_us_chroma;
470*b843c749SSergey Zigachev 	float min_urgent_latency_support_us;
471*b843c749SSergey Zigachev 	float non_urgent_latency_tolerance;
472*b843c749SSergey Zigachev 	float block_height256_bytes_y;
473*b843c749SSergey Zigachev 	float block_height256_bytes_c;
474*b843c749SSergey Zigachev 	float meta_request_width_y;
475*b843c749SSergey Zigachev 	float meta_surf_width_y;
476*b843c749SSergey Zigachev 	float meta_surf_height_y;
477*b843c749SSergey Zigachev 	float meta_pte_bytes_frame_y;
478*b843c749SSergey Zigachev 	float meta_row_byte_y;
479*b843c749SSergey Zigachev 	float macro_tile_size_byte_y;
480*b843c749SSergey Zigachev 	float macro_tile_height_y;
481*b843c749SSergey Zigachev 	float pixel_pte_req_height_y;
482*b843c749SSergey Zigachev 	float pixel_pte_req_width_y;
483*b843c749SSergey Zigachev 	float pixel_pte_bytes_per_row_y;
484*b843c749SSergey Zigachev 	float meta_request_width_c;
485*b843c749SSergey Zigachev 	float meta_surf_width_c;
486*b843c749SSergey Zigachev 	float meta_surf_height_c;
487*b843c749SSergey Zigachev 	float meta_pte_bytes_frame_c;
488*b843c749SSergey Zigachev 	float meta_row_byte_c;
489*b843c749SSergey Zigachev 	float macro_tile_size_bytes_c;
490*b843c749SSergey Zigachev 	float macro_tile_height_c;
491*b843c749SSergey Zigachev 	float pixel_pte_req_height_c;
492*b843c749SSergey Zigachev 	float pixel_pte_req_width_c;
493*b843c749SSergey Zigachev 	float pixel_pte_bytes_per_row_c;
494*b843c749SSergey Zigachev 	float max_partial_swath_y;
495*b843c749SSergey Zigachev 	float max_partial_swath_c;
496*b843c749SSergey Zigachev 	float t_calc;
497*b843c749SSergey Zigachev 	float next_prefetch_mode;
498*b843c749SSergey Zigachev 	float v_startup_lines;
499*b843c749SSergey Zigachev 	enum dcn_bw_defs planes_with_room_to_increase_vstartup_prefetch_bw_less_than_active_bw;
500*b843c749SSergey Zigachev 	enum dcn_bw_defs planes_with_room_to_increase_vstartup_vratio_prefetch_more_than4;
501*b843c749SSergey Zigachev 	enum dcn_bw_defs planes_with_room_to_increase_vstartup_destination_line_times_for_prefetch_less_than2;
502*b843c749SSergey Zigachev 	enum dcn_bw_defs v_ratio_prefetch_more_than4;
503*b843c749SSergey Zigachev 	enum dcn_bw_defs destination_line_times_for_prefetch_less_than2;
504*b843c749SSergey Zigachev 	float prefetch_mode;
505*b843c749SSergey Zigachev 	float dstx_after_scaler;
506*b843c749SSergey Zigachev 	float dsty_after_scaler;
507*b843c749SSergey Zigachev 	float v_update_offset_pix;
508*b843c749SSergey Zigachev 	float total_repeater_delay_time;
509*b843c749SSergey Zigachev 	float v_update_width_pix;
510*b843c749SSergey Zigachev 	float v_ready_offset_pix;
511*b843c749SSergey Zigachev 	float t_setup;
512*b843c749SSergey Zigachev 	float t_wait;
513*b843c749SSergey Zigachev 	float bandwidth_available_for_immediate_flip;
514*b843c749SSergey Zigachev 	float tot_immediate_flip_bytes;
515*b843c749SSergey Zigachev 	float max_rd_bandwidth;
516*b843c749SSergey Zigachev 	float time_for_fetching_meta_pte;
517*b843c749SSergey Zigachev 	float time_for_fetching_row_in_vblank;
518*b843c749SSergey Zigachev 	float lines_to_request_prefetch_pixel_data;
519*b843c749SSergey Zigachev 	float required_prefetch_pix_data_bw;
520*b843c749SSergey Zigachev 	enum dcn_bw_defs prefetch_mode_supported;
521*b843c749SSergey Zigachev 	float active_dp_ps;
522*b843c749SSergey Zigachev 	float lb_latency_hiding_source_lines_y;
523*b843c749SSergey Zigachev 	float lb_latency_hiding_source_lines_c;
524*b843c749SSergey Zigachev 	float effective_lb_latency_hiding_y;
525*b843c749SSergey Zigachev 	float effective_lb_latency_hiding_c;
526*b843c749SSergey Zigachev 	float dpp_output_buffer_lines_y;
527*b843c749SSergey Zigachev 	float dpp_output_buffer_lines_c;
528*b843c749SSergey Zigachev 	float dppopp_buffering_y;
529*b843c749SSergey Zigachev 	float max_det_buffering_time_y;
530*b843c749SSergey Zigachev 	float active_dram_clock_change_latency_margin_y;
531*b843c749SSergey Zigachev 	float dppopp_buffering_c;
532*b843c749SSergey Zigachev 	float max_det_buffering_time_c;
533*b843c749SSergey Zigachev 	float active_dram_clock_change_latency_margin_c;
534*b843c749SSergey Zigachev 	float writeback_dram_clock_change_latency_margin;
535*b843c749SSergey Zigachev 	float min_active_dram_clock_change_margin;
536*b843c749SSergey Zigachev 	float v_blank_of_min_active_dram_clock_change_margin;
537*b843c749SSergey Zigachev 	float second_min_active_dram_clock_change_margin;
538*b843c749SSergey Zigachev 	float min_vblank_dram_clock_change_margin;
539*b843c749SSergey Zigachev 	float dram_clock_change_margin;
540*b843c749SSergey Zigachev 	float dram_clock_change_support;
541*b843c749SSergey Zigachev 	float wr_bandwidth;
542*b843c749SSergey Zigachev 	float max_used_bw;
543*b843c749SSergey Zigachev };
544*b843c749SSergey Zigachev 
545*b843c749SSergey Zigachev struct dcn_soc_bounding_box {
546*b843c749SSergey Zigachev 	float sr_exit_time; /*us*/
547*b843c749SSergey Zigachev 	float sr_enter_plus_exit_time; /*us*/
548*b843c749SSergey Zigachev 	float urgent_latency; /*us*/
549*b843c749SSergey Zigachev 	float write_back_latency; /*us*/
550*b843c749SSergey Zigachev 	float percent_of_ideal_drambw_received_after_urg_latency; /*%*/
551*b843c749SSergey Zigachev 	int max_request_size; /*bytes*/
552*b843c749SSergey Zigachev 	float dcfclkv_max0p9; /*MHz*/
553*b843c749SSergey Zigachev 	float dcfclkv_nom0p8; /*MHz*/
554*b843c749SSergey Zigachev 	float dcfclkv_mid0p72; /*MHz*/
555*b843c749SSergey Zigachev 	float dcfclkv_min0p65; /*MHz*/
556*b843c749SSergey Zigachev 	float max_dispclk_vmax0p9; /*MHz*/
557*b843c749SSergey Zigachev 	float max_dispclk_vmid0p72; /*MHz*/
558*b843c749SSergey Zigachev 	float max_dispclk_vnom0p8; /*MHz*/
559*b843c749SSergey Zigachev 	float max_dispclk_vmin0p65; /*MHz*/
560*b843c749SSergey Zigachev 	float max_dppclk_vmax0p9; /*MHz*/
561*b843c749SSergey Zigachev 	float max_dppclk_vnom0p8; /*MHz*/
562*b843c749SSergey Zigachev 	float max_dppclk_vmid0p72; /*MHz*/
563*b843c749SSergey Zigachev 	float max_dppclk_vmin0p65; /*MHz*/
564*b843c749SSergey Zigachev 	float socclk; /*MHz*/
565*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmax0p9; /*GB/s*/
566*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vnom0p8; /*GB/s*/
567*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmid0p72; /*GB/s*/
568*b843c749SSergey Zigachev 	float fabric_and_dram_bandwidth_vmin0p65; /*GB/s*/
569*b843c749SSergey Zigachev 	float phyclkv_max0p9; /*MHz*/
570*b843c749SSergey Zigachev 	float phyclkv_nom0p8; /*MHz*/
571*b843c749SSergey Zigachev 	float phyclkv_mid0p72; /*MHz*/
572*b843c749SSergey Zigachev 	float phyclkv_min0p65; /*MHz*/
573*b843c749SSergey Zigachev 	float downspreading; /*%*/
574*b843c749SSergey Zigachev 	int round_trip_ping_latency_cycles; /*DCFCLK Cycles*/
575*b843c749SSergey Zigachev 	int urgent_out_of_order_return_per_channel; /*bytes*/
576*b843c749SSergey Zigachev 	int number_of_channels;
577*b843c749SSergey Zigachev 	int vmm_page_size; /*bytes*/
578*b843c749SSergey Zigachev 	float dram_clock_change_latency; /*us*/
579*b843c749SSergey Zigachev 	int return_bus_width; /*bytes*/
580*b843c749SSergey Zigachev 	float percent_disp_bw_limit; /*%*/
581*b843c749SSergey Zigachev };
582*b843c749SSergey Zigachev extern const struct dcn_soc_bounding_box dcn10_soc_defaults;
583*b843c749SSergey Zigachev 
584*b843c749SSergey Zigachev struct dcn_ip_params {
585*b843c749SSergey Zigachev 	float rob_buffer_size_in_kbyte;
586*b843c749SSergey Zigachev 	float det_buffer_size_in_kbyte;
587*b843c749SSergey Zigachev 	float dpp_output_buffer_pixels;
588*b843c749SSergey Zigachev 	float opp_output_buffer_lines;
589*b843c749SSergey Zigachev 	float pixel_chunk_size_in_kbyte;
590*b843c749SSergey Zigachev 	enum dcn_bw_defs pte_enable;
591*b843c749SSergey Zigachev 	int pte_chunk_size; /*kbytes*/
592*b843c749SSergey Zigachev 	int meta_chunk_size; /*kbytes*/
593*b843c749SSergey Zigachev 	int writeback_chunk_size; /*kbytes*/
594*b843c749SSergey Zigachev 	enum dcn_bw_defs odm_capability;
595*b843c749SSergey Zigachev 	enum dcn_bw_defs dsc_capability;
596*b843c749SSergey Zigachev 	int line_buffer_size; /*bit*/
597*b843c749SSergey Zigachev 	int max_line_buffer_lines;
598*b843c749SSergey Zigachev 	enum dcn_bw_defs is_line_buffer_bpp_fixed;
599*b843c749SSergey Zigachev 	int line_buffer_fixed_bpp;
600*b843c749SSergey Zigachev 	int writeback_luma_buffer_size; /*kbytes*/
601*b843c749SSergey Zigachev 	int writeback_chroma_buffer_size; /*kbytes*/
602*b843c749SSergey Zigachev 	int max_num_dpp;
603*b843c749SSergey Zigachev 	int max_num_writeback;
604*b843c749SSergey Zigachev 	int max_dchub_topscl_throughput; /*pixels/dppclk*/
605*b843c749SSergey Zigachev 	int max_pscl_tolb_throughput; /*pixels/dppclk*/
606*b843c749SSergey Zigachev 	int max_lb_tovscl_throughput; /*pixels/dppclk*/
607*b843c749SSergey Zigachev 	int max_vscl_tohscl_throughput; /*pixels/dppclk*/
608*b843c749SSergey Zigachev 	float max_hscl_ratio;
609*b843c749SSergey Zigachev 	float max_vscl_ratio;
610*b843c749SSergey Zigachev 	int max_hscl_taps;
611*b843c749SSergey Zigachev 	int max_vscl_taps;
612*b843c749SSergey Zigachev 	int pte_buffer_size_in_requests;
613*b843c749SSergey Zigachev 	float dispclk_ramping_margin; /*%*/
614*b843c749SSergey Zigachev 	float under_scan_factor;
615*b843c749SSergey Zigachev 	int max_inter_dcn_tile_repeaters;
616*b843c749SSergey Zigachev 	enum dcn_bw_defs can_vstartup_lines_exceed_vsync_plus_back_porch_lines_minus_one;
617*b843c749SSergey Zigachev 	enum dcn_bw_defs bug_forcing_luma_and_chroma_request_to_same_size_fixed;
618*b843c749SSergey Zigachev 	int dcfclk_cstate_latency;
619*b843c749SSergey Zigachev };
620*b843c749SSergey Zigachev extern const struct dcn_ip_params dcn10_ip_defaults;
621*b843c749SSergey Zigachev 
622*b843c749SSergey Zigachev bool dcn_validate_bandwidth(
623*b843c749SSergey Zigachev 		struct dc *dc,
624*b843c749SSergey Zigachev 		struct dc_state *context);
625*b843c749SSergey Zigachev 
626*b843c749SSergey Zigachev unsigned int dcn_find_dcfclk_suits_all(
627*b843c749SSergey Zigachev 	const struct dc *dc,
628*b843c749SSergey Zigachev 	struct dc_clocks *clocks);
629*b843c749SSergey Zigachev 
630*b843c749SSergey Zigachev void dcn_bw_update_from_pplib(struct dc *dc);
631*b843c749SSergey Zigachev void dcn_bw_notify_pplib_of_wm_ranges(struct dc *dc);
632*b843c749SSergey Zigachev void dcn_bw_sync_calcs_and_dml(struct dc *dc);
633*b843c749SSergey Zigachev 
634*b843c749SSergey Zigachev #endif /* __DCN_CALCS_H__ */
635*b843c749SSergey Zigachev 
636