7ef66e511ec8ef428c09f0cca9238f7b7f6ff7e6
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / amd / display / dc / dml / dcn301 / dcn301_fpu.c
1 /*
2  * Copyright 2019-2021 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * Authors: AMD
23  *
24  */
25 #include "resource.h"
26 #include "clk_mgr.h"
27 #include "dcn20/dcn20_resource.h"
28 #include "dcn301/dcn301_resource.h"
29
30 #include "dml/dcn20/dcn20_fpu.h"
31 #include "dcn301_fpu.h"
32
33 #define TO_DCN301_RES_POOL(pool)\
34         container_of(pool, struct dcn301_resource_pool, base)
35
36 /* Based on: //vidip/dc/dcn3/doc/architecture/DCN3x_Display_Mode.xlsm#83 */
37 struct _vcs_dpi_ip_params_st dcn3_01_ip = {
38         .odm_capable = 1,
39         .gpuvm_enable = 1,
40         .hostvm_enable = 1,
41         .gpuvm_max_page_table_levels = 1,
42         .hostvm_max_page_table_levels = 2,
43         .hostvm_cached_page_table_levels = 0,
44         .pte_group_size_bytes = 2048,
45         .num_dsc = 3,
46         .rob_buffer_size_kbytes = 184,
47         .det_buffer_size_kbytes = 184,
48         .dpte_buffer_size_in_pte_reqs_luma = 64,
49         .dpte_buffer_size_in_pte_reqs_chroma = 32,
50         .pde_proc_buffer_size_64k_reqs = 48,
51         .dpp_output_buffer_pixels = 2560,
52         .opp_output_buffer_lines = 1,
53         .pixel_chunk_size_kbytes = 8,
54         .meta_chunk_size_kbytes = 2,
55         .writeback_chunk_size_kbytes = 8,
56         .line_buffer_size_bits = 789504,
57         .is_line_buffer_bpp_fixed = 0,  // ?
58         .line_buffer_fixed_bpp = 48,     // ?
59         .dcc_supported = true,
60         .writeback_interface_buffer_size_kbytes = 90,
61         .writeback_line_buffer_buffer_size = 656640,
62         .max_line_buffer_lines = 12,
63         .writeback_luma_buffer_size_kbytes = 12,  // writeback_line_buffer_buffer_size = 656640
64         .writeback_chroma_buffer_size_kbytes = 8,
65         .writeback_chroma_line_buffer_width_pixels = 4,
66         .writeback_max_hscl_ratio = 1,
67         .writeback_max_vscl_ratio = 1,
68         .writeback_min_hscl_ratio = 1,
69         .writeback_min_vscl_ratio = 1,
70         .writeback_max_hscl_taps = 1,
71         .writeback_max_vscl_taps = 1,
72         .writeback_line_buffer_luma_buffer_size = 0,
73         .writeback_line_buffer_chroma_buffer_size = 14643,
74         .cursor_buffer_size = 8,
75         .cursor_chunk_size = 2,
76         .max_num_otg = 4,
77         .max_num_dpp = 4,
78         .max_num_wb = 1,
79         .max_dchub_pscl_bw_pix_per_clk = 4,
80         .max_pscl_lb_bw_pix_per_clk = 2,
81         .max_lb_vscl_bw_pix_per_clk = 4,
82         .max_vscl_hscl_bw_pix_per_clk = 4,
83         .max_hscl_ratio = 6,
84         .max_vscl_ratio = 6,
85         .hscl_mults = 4,
86         .vscl_mults = 4,
87         .max_hscl_taps = 8,
88         .max_vscl_taps = 8,
89         .dispclk_ramp_margin_percent = 1,
90         .underscan_factor = 1.11,
91         .min_vblank_lines = 32,
92         .dppclk_delay_subtotal = 46,
93         .dynamic_metadata_vm_enabled = true,
94         .dppclk_delay_scl_lb_only = 16,
95         .dppclk_delay_scl = 50,
96         .dppclk_delay_cnvc_formatter = 27,
97         .dppclk_delay_cnvc_cursor = 6,
98         .dispclk_delay_subtotal = 119,
99         .dcfclk_cstate_latency = 5.2, // SRExitTime
100         .max_inter_dcn_tile_repeaters = 8,
101         .max_num_hdmi_frl_outputs = 0,
102         .odm_combine_4to1_supported = true,
103
104         .xfc_supported = false,
105         .xfc_fill_bw_overhead_percent = 10.0,
106         .xfc_fill_constant_bytes = 0,
107         .gfx7_compat_tiling_supported = 0,
108         .number_of_cursors = 1,
109 };
110
111 struct _vcs_dpi_soc_bounding_box_st dcn3_01_soc = {
112         .clock_limits = {
113                 {
114                         .state = 0,
115                         .dram_speed_mts = 2400.0,
116                         .fabricclk_mhz = 600,
117                         .socclk_mhz = 278.0,
118                         .dcfclk_mhz = 400.0,
119                         .dscclk_mhz = 206.0,
120                         .dppclk_mhz = 1015.0,
121                         .dispclk_mhz = 1015.0,
122                         .phyclk_mhz = 600.0,
123                 },
124
125                 {
126                         .state = 1,
127                         .dram_speed_mts = 2400.0,
128                         .fabricclk_mhz = 688,
129                         .socclk_mhz = 278.0,
130                         .dcfclk_mhz = 400.0,
131                         .dscclk_mhz = 206.0,
132                         .dppclk_mhz = 1015.0,
133                         .dispclk_mhz = 1015.0,
134                         .phyclk_mhz = 600.0,
135                 },
136
137                 {
138                         .state = 2,
139                         .dram_speed_mts = 4267.0,
140                         .fabricclk_mhz = 1067,
141                         .socclk_mhz = 278.0,
142                         .dcfclk_mhz = 608.0,
143                         .dscclk_mhz = 296.0,
144                         .dppclk_mhz = 1015.0,
145                         .dispclk_mhz = 1015.0,
146                         .phyclk_mhz = 810.0,
147                 },
148
149                 {
150                         .state = 3,
151                         .dram_speed_mts = 4267.0,
152                         .fabricclk_mhz = 1067,
153                         .socclk_mhz = 715.0,
154                         .dcfclk_mhz = 676.0,
155                         .dscclk_mhz = 338.0,
156                         .dppclk_mhz = 1015.0,
157                         .dispclk_mhz = 1015.0,
158                         .phyclk_mhz = 810.0,
159                 },
160
161                 {
162                         .state = 4,
163                         .dram_speed_mts = 4267.0,
164                         .fabricclk_mhz = 1067,
165                         .socclk_mhz = 953.0,
166                         .dcfclk_mhz = 810.0,
167                         .dscclk_mhz = 338.0,
168                         .dppclk_mhz = 1015.0,
169                         .dispclk_mhz = 1015.0,
170                         .phyclk_mhz = 810.0,
171                 },
172         },
173
174         .sr_exit_time_us = 9.0,
175         .sr_enter_plus_exit_time_us = 11.0,
176         .urgent_latency_us = 4.0,
177         .urgent_latency_pixel_data_only_us = 4.0,
178         .urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
179         .urgent_latency_vm_data_only_us = 4.0,
180         .urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096,
181         .urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096,
182         .urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
183         .pct_ideal_dram_sdp_bw_after_urgent_pixel_only = 80.0,
184         .pct_ideal_dram_sdp_bw_after_urgent_pixel_and_vm = 75.0,
185         .pct_ideal_dram_sdp_bw_after_urgent_vm_only = 40.0,
186         .max_avg_sdp_bw_use_normal_percent = 60.0,
187         .max_avg_dram_bw_use_normal_percent = 60.0,
188         .writeback_latency_us = 12.0,
189         .max_request_size_bytes = 256,
190         .dram_channel_width_bytes = 4,
191         .fabric_datapath_to_dcn_data_return_bytes = 32,
192         .dcn_downspread_percent = 0.5,
193         .downspread_percent = 0.38,
194         .dram_page_open_time_ns = 50.0,
195         .dram_rw_turnaround_time_ns = 17.5,
196         .dram_return_buffer_per_channel_bytes = 8192,
197         .round_trip_ping_latency_dcfclk_cycles = 191,
198         .urgent_out_of_order_return_per_channel_bytes = 4096,
199         .channel_interleave_bytes = 256,
200         .num_banks = 8,
201         .num_chans = 4,
202         .gpuvm_min_page_size_bytes = 4096,
203         .hostvm_min_page_size_bytes = 4096,
204         .dram_clock_change_latency_us = 23.84,
205         .writeback_dram_clock_change_latency_us = 23.0,
206         .return_bus_width_bytes = 64,
207         .dispclk_dppclk_vco_speed_mhz = 3550,
208         .xfc_bus_transport_time_us = 20,      // ?
209         .xfc_xbuf_latency_tolerance_us = 4,  // ?
210         .use_urgent_burst_bw = 1,            // ?
211         .num_states = 5,
212         .do_urgent_latency_adjustment = false,
213         .urgent_latency_adjustment_fabric_clock_component_us = 0,
214         .urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
215 };
216
217 struct wm_table ddr4_wm_table = {
218         .entries = {
219                 {
220                         .wm_inst = WM_A,
221                         .wm_type = WM_TYPE_PSTATE_CHG,
222                         .pstate_latency_us = 11.72,
223                         .sr_exit_time_us = 6.09,
224                         .sr_enter_plus_exit_time_us = 7.14,
225                         .valid = true,
226                 },
227                 {
228                         .wm_inst = WM_B,
229                         .wm_type = WM_TYPE_PSTATE_CHG,
230                         .pstate_latency_us = 11.72,
231                         .sr_exit_time_us = 10.12,
232                         .sr_enter_plus_exit_time_us = 11.48,
233                         .valid = true,
234                 },
235                 {
236                         .wm_inst = WM_C,
237                         .wm_type = WM_TYPE_PSTATE_CHG,
238                         .pstate_latency_us = 11.72,
239                         .sr_exit_time_us = 10.12,
240                         .sr_enter_plus_exit_time_us = 11.48,
241                         .valid = true,
242                 },
243                 {
244                         .wm_inst = WM_D,
245                         .wm_type = WM_TYPE_PSTATE_CHG,
246                         .pstate_latency_us = 11.72,
247                         .sr_exit_time_us = 10.12,
248                         .sr_enter_plus_exit_time_us = 11.48,
249                         .valid = true,
250                 },
251         }
252 };
253
254 struct wm_table lpddr5_wm_table = {
255         .entries = {
256                 {
257                         .wm_inst = WM_A,
258                         .wm_type = WM_TYPE_PSTATE_CHG,
259                         .pstate_latency_us = 11.65333,
260                         .sr_exit_time_us = 13.5,
261                         .sr_enter_plus_exit_time_us = 16.5,
262                         .valid = true,
263                 },
264                 {
265                         .wm_inst = WM_B,
266                         .wm_type = WM_TYPE_PSTATE_CHG,
267                         .pstate_latency_us = 11.65333,
268                         .sr_exit_time_us = 13.5,
269                         .sr_enter_plus_exit_time_us = 16.5,
270                         .valid = true,
271                 },
272                 {
273                         .wm_inst = WM_C,
274                         .wm_type = WM_TYPE_PSTATE_CHG,
275                         .pstate_latency_us = 11.65333,
276                         .sr_exit_time_us = 13.5,
277                         .sr_enter_plus_exit_time_us = 16.5,
278                         .valid = true,
279                 },
280                 {
281                         .wm_inst = WM_D,
282                         .wm_type = WM_TYPE_PSTATE_CHG,
283                         .pstate_latency_us = 11.65333,
284                         .sr_exit_time_us = 13.5,
285                         .sr_enter_plus_exit_time_us = 16.5,
286                         .valid = true,
287                 },
288         }
289 };
290
291 static void calculate_wm_set_for_vlevel(int vlevel,
292                 struct wm_range_table_entry *table_entry,
293                 struct dcn_watermarks *wm_set,
294                 struct display_mode_lib *dml,
295                 display_e2e_pipe_params_st *pipes,
296                 int pipe_cnt)
297 {
298         double dram_clock_change_latency_cached = dml->soc.dram_clock_change_latency_us;
299
300         ASSERT(vlevel < dml->soc.num_states);
301         /* only pipe 0 is read for voltage and dcf/soc clocks */
302         pipes[0].clks_cfg.voltage = vlevel;
303         pipes[0].clks_cfg.dcfclk_mhz = dml->soc.clock_limits[vlevel].dcfclk_mhz;
304         pipes[0].clks_cfg.socclk_mhz = dml->soc.clock_limits[vlevel].socclk_mhz;
305
306         dml->soc.dram_clock_change_latency_us = table_entry->pstate_latency_us;
307         dml->soc.sr_exit_time_us = table_entry->sr_exit_time_us;
308         dml->soc.sr_enter_plus_exit_time_us = table_entry->sr_enter_plus_exit_time_us;
309
310         wm_set->urgent_ns = get_wm_urgent(dml, pipes, pipe_cnt) * 1000;
311         wm_set->cstate_pstate.cstate_enter_plus_exit_ns = get_wm_stutter_enter_exit(dml, pipes, pipe_cnt) * 1000;
312         wm_set->cstate_pstate.cstate_exit_ns = get_wm_stutter_exit(dml, pipes, pipe_cnt) * 1000;
313         wm_set->cstate_pstate.pstate_change_ns = get_wm_dram_clock_change(dml, pipes, pipe_cnt) * 1000;
314         wm_set->pte_meta_urgent_ns = get_wm_memory_trip(dml, pipes, pipe_cnt) * 1000;
315         wm_set->frac_urg_bw_nom = get_fraction_of_urgent_bandwidth(dml, pipes, pipe_cnt) * 1000;
316         wm_set->frac_urg_bw_flip = get_fraction_of_urgent_bandwidth_imm_flip(dml, pipes, pipe_cnt) * 1000;
317         wm_set->urgent_latency_ns = get_urgent_latency(dml, pipes, pipe_cnt) * 1000;
318         dml->soc.dram_clock_change_latency_us = dram_clock_change_latency_cached;
319
320 }
321
322 void dcn301_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
323 {
324         struct dcn301_resource_pool *pool = TO_DCN301_RES_POOL(dc->res_pool);
325         struct clk_limit_table *clk_table = &bw_params->clk_table;
326         unsigned int i, closest_clk_lvl;
327         int j;
328
329         dc_assert_fp_enabled();
330
331         memcpy(&dcn3_01_soc._clock_tmp, &dcn3_01_soc.clock_limits,
332                sizeof(dcn3_01_soc.clock_limits));
333
334         /* Default clock levels are used for diags, which may lead to overclocking. */
335         if (!IS_DIAG_DC(dc->ctx->dce_environment)) {
336                 dcn3_01_ip.max_num_otg = pool->base.res_cap->num_timing_generator;
337                 dcn3_01_ip.max_num_dpp = pool->base.pipe_count;
338                 dcn3_01_soc.num_chans = bw_params->num_channels;
339
340                 ASSERT(clk_table->num_entries);
341                 for (i = 0; i < clk_table->num_entries; i++) {
342                         /* loop backwards*/
343                         for (closest_clk_lvl = 0, j = dcn3_01_soc.num_states - 1; j >= 0; j--) {
344                                 if ((unsigned int) dcn3_01_soc.clock_limits[j].dcfclk_mhz <= clk_table->entries[i].dcfclk_mhz) {
345                                         closest_clk_lvl = j;
346                                         break;
347                                 }
348                         }
349
350                         dcn3_01_soc._clock_tmp[i].state = i;
351                         dcn3_01_soc._clock_tmp[i].dcfclk_mhz = clk_table->entries[i].dcfclk_mhz;
352                         dcn3_01_soc._clock_tmp[i].fabricclk_mhz = clk_table->entries[i].fclk_mhz;
353                         dcn3_01_soc._clock_tmp[i].socclk_mhz = clk_table->entries[i].socclk_mhz;
354                         dcn3_01_soc._clock_tmp[i].dram_speed_mts = clk_table->entries[i].memclk_mhz * 2;
355
356                         dcn3_01_soc._clock_tmp[i].dispclk_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].dispclk_mhz;
357                         dcn3_01_soc._clock_tmp[i].dppclk_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].dppclk_mhz;
358                         dcn3_01_soc._clock_tmp[i].dram_bw_per_chan_gbps = dcn3_01_soc.clock_limits[closest_clk_lvl].dram_bw_per_chan_gbps;
359                         dcn3_01_soc._clock_tmp[i].dscclk_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].dscclk_mhz;
360                         dcn3_01_soc._clock_tmp[i].dtbclk_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].dtbclk_mhz;
361                         dcn3_01_soc._clock_tmp[i].phyclk_d18_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].phyclk_d18_mhz;
362                         dcn3_01_soc._clock_tmp[i].phyclk_mhz = dcn3_01_soc.clock_limits[closest_clk_lvl].phyclk_mhz;
363                 }
364
365                 if (clk_table->num_entries) {
366                         dcn3_01_soc.num_states = clk_table->num_entries;
367                         /* duplicate last level */
368                         dcn3_01_soc._clock_tmp[dcn3_01_soc.num_states] = dcn3_01_soc.clock_limits[dcn3_01_soc.num_states - 1];
369                         dcn3_01_soc._clock_tmp[dcn3_01_soc.num_states].state = dcn3_01_soc.num_states;
370                 }
371         }
372
373         memcpy(&dcn3_01_soc.clock_limits, &dcn3_01_soc._clock_tmp,
374                sizeof(dcn3_01_soc.clock_limits));
375
376         dcn3_01_soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
377         dc->dml.soc.dispclk_dppclk_vco_speed_mhz = dc->clk_mgr->dentist_vco_freq_khz / 1000.0;
378
379         dml_init_instance(&dc->dml, &dcn3_01_soc, &dcn3_01_ip, DML_PROJECT_DCN30);
380 }
381
382 void dcn301_fpu_set_wm_ranges(int i,
383         struct pp_smu_wm_range_sets *ranges,
384         struct _vcs_dpi_soc_bounding_box_st *loaded_bb)
385 {
386         dc_assert_fp_enabled();
387
388         ranges->reader_wm_sets[i].min_fill_clk_mhz = (i > 0) ? (loaded_bb->clock_limits[i - 1].dram_speed_mts / 16) + 1 : 0;
389         ranges->reader_wm_sets[i].max_fill_clk_mhz = loaded_bb->clock_limits[i].dram_speed_mts / 16;
390 }
391
392 void dcn301_fpu_init_soc_bounding_box(struct bp_soc_bb_info bb_info)
393 {
394         dc_assert_fp_enabled();
395
396         if (bb_info.dram_clock_change_latency_100ns > 0)
397                 dcn3_01_soc.dram_clock_change_latency_us = bb_info.dram_clock_change_latency_100ns * 10;
398
399         if (bb_info.dram_sr_enter_exit_latency_100ns > 0)
400                 dcn3_01_soc.sr_enter_plus_exit_time_us = bb_info.dram_sr_enter_exit_latency_100ns * 10;
401
402         if (bb_info.dram_sr_exit_latency_100ns > 0)
403                 dcn3_01_soc.sr_exit_time_us = bb_info.dram_sr_exit_latency_100ns * 10;
404 }
405
406 void dcn301_calculate_wm_and_dlg_fp(struct dc *dc,
407                 struct dc_state *context,
408                 display_e2e_pipe_params_st *pipes,
409                 int pipe_cnt,
410                 int vlevel_req)
411 {
412         int i, pipe_idx;
413         int vlevel, vlevel_max;
414         struct wm_range_table_entry *table_entry;
415         struct clk_bw_params *bw_params = dc->clk_mgr->bw_params;
416
417         ASSERT(bw_params);
418         dc_assert_fp_enabled();
419
420         vlevel_max = bw_params->clk_table.num_entries - 1;
421
422         /* WM Set D */
423         table_entry = &bw_params->wm_table.entries[WM_D];
424         if (table_entry->wm_type == WM_TYPE_RETRAINING)
425                 vlevel = 0;
426         else
427                 vlevel = vlevel_max;
428         calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.d,
429                                                 &context->bw_ctx.dml, pipes, pipe_cnt);
430         /* WM Set C */
431         table_entry = &bw_params->wm_table.entries[WM_C];
432         vlevel = min(max(vlevel_req, 2), vlevel_max);
433         calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.c,
434                                                 &context->bw_ctx.dml, pipes, pipe_cnt);
435         /* WM Set B */
436         table_entry = &bw_params->wm_table.entries[WM_B];
437         vlevel = min(max(vlevel_req, 1), vlevel_max);
438         calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.b,
439                                                 &context->bw_ctx.dml, pipes, pipe_cnt);
440
441         /* WM Set A */
442         table_entry = &bw_params->wm_table.entries[WM_A];
443         vlevel = min(vlevel_req, vlevel_max);
444         calculate_wm_set_for_vlevel(vlevel, table_entry, &context->bw_ctx.bw.dcn.watermarks.a,
445                                                 &context->bw_ctx.dml, pipes, pipe_cnt);
446
447         for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
448                 if (!context->res_ctx.pipe_ctx[i].stream)
449                         continue;
450
451                 pipes[pipe_idx].clks_cfg.dispclk_mhz = get_dispclk_calculated(&context->bw_ctx.dml, pipes, pipe_cnt);
452                 pipes[pipe_idx].clks_cfg.dppclk_mhz = get_dppclk_calculated(&context->bw_ctx.dml, pipes, pipe_cnt, pipe_idx);
453
454                 if (dc->config.forced_clocks) {
455                         pipes[pipe_idx].clks_cfg.dispclk_mhz = context->bw_ctx.dml.soc.clock_limits[0].dispclk_mhz;
456                         pipes[pipe_idx].clks_cfg.dppclk_mhz = context->bw_ctx.dml.soc.clock_limits[0].dppclk_mhz;
457                 }
458                 if (dc->debug.min_disp_clk_khz > pipes[pipe_idx].clks_cfg.dispclk_mhz * 1000)
459                         pipes[pipe_idx].clks_cfg.dispclk_mhz = dc->debug.min_disp_clk_khz / 1000.0;
460                 if (dc->debug.min_dpp_clk_khz > pipes[pipe_idx].clks_cfg.dppclk_mhz * 1000)
461                         pipes[pipe_idx].clks_cfg.dppclk_mhz = dc->debug.min_dpp_clk_khz / 1000.0;
462                 pipe_idx++;
463         }
464
465         dcn20_calculate_dlg_params(dc, context, pipes, pipe_cnt, vlevel);
466 }