bw_frc_to_fixed
(tmp >= (uint64_t)(bw_frc_to_fixed(1, 2).value));
data->dmif_burst_time[i][j] = bw_max3(data->dmif_total_page_close_open_time, bw_div(data->total_display_reads_required_dram_access_data, (bw_mul(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[i]), bw_int_to_fixed(vbios->dram_channel_width_in_bits)), bw_int_to_fixed(8)), bw_int_to_fixed(data->number_of_dram_channels)))), bw_div(data->total_display_reads_required_data, (bw_mul(bw_mul(sclk[j], vbios->data_return_bus_width), bw_frc_to_fixed(dceip->percent_of_ideal_port_bw_received_after_urgent_latency, 100)))));
if (dceip->graphics_lb_nodownscaling_multi_line_prefetching == 1 && (bw_equ(data->vsr[i], bw_int_to_fixed(1)) || (bw_leq(data->vsr[i], bw_frc_to_fixed(8, 10)) && bw_leq(data->v_taps[i], bw_int_to_fixed(2)) && data->lb_bpc[i] == 8)) && surface_type[i] == bw_def_graphics) {
bw_mul(bw_frc_to_fixed(5, 10), data->total_dmifmc_urgent_latency));
if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_drambw_display_can_use_in_normal_system_operation, 100),yclk[low]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_int_to_fixed(vbios->number_of_dram_channels)))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_drambw_display_can_use_in_normal_system_operation, 100),yclk[mid]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_int_to_fixed(vbios->number_of_dram_channels)))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_drambw_display_can_use_in_normal_system_operation, 100),yclk[high]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_int_to_fixed(vbios->number_of_dram_channels)))
data->dmif_required_sclk = bw_div(bw_div(data->total_display_reads_required_data, data->display_reads_time_for_data_transfer), (bw_mul(vbios->data_return_bus_width, bw_frc_to_fixed(dceip->percent_of_ideal_port_bw_received_after_urgent_latency, 100))));
if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[low]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[mid]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid2]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid3]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid4]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid5]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid6]),vbios->data_return_bus_width))
else if (bw_ltn(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_high]),vbios->data_return_bus_width))
else if (bw_meq(data->total_average_bandwidth_no_compression, bw_mul(bw_mul(bw_frc_to_fixed(dceip->max_average_percent_of_ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_high]),vbios->data_return_bus_width))
data->sclk_deep_sleep = bw_max2(bw_div(bw_mul(data->dispclk, bw_frc_to_fixed(115, 100)), data->min_pixels_per_data_fifo_entry), data->total_read_request_bandwidth);
data->stutter_efficiency = bw_max2(bw_int_to_fixed(0), bw_mul((bw_sub(bw_int_to_fixed(1), (bw_div(bw_mul((bw_add(vbios->stutter_self_refresh_exit_latency, data->stutter_burst_time)), bw_int_to_fixed(data->num_stutter_bursts)), bw_frc_to_fixed(166666667, 10000))))), bw_int_to_fixed(100)));
data->dmif_required_sclk_for_urgent_latency[i] = bw_div(bw_div(data->total_display_reads_required_data, data->display_reads_time_for_data_transfer_and_urgent_latency), (bw_mul(vbios->data_return_bus_width, bw_frc_to_fixed(dceip->percent_of_ideal_port_bw_received_after_urgent_latency, 100))));
vbios->low_yclk = bw_frc_to_fixed(66666, 100);
vbios->high_sclk = bw_frc_to_fixed(62609, 100);
vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(153, 10);
vbios->nbp_state_change_latency = bw_frc_to_fixed(19649, 1000);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(158, 10);
vbios->nbp_state_change_latency = bw_frc_to_fixed(2008, 100);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(75, 10);
vbios->stutter_self_refresh_entry_latency = bw_frc_to_fixed(19, 10);
vbios->down_spread_percentage = bw_frc_to_fixed(5, 10);
bw_frc_to_fixed(35556, 10000);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(35, 10);
bw_frc_to_fixed(34286, 10000);
bw_frc_to_fixed(32, 10);
bw_frc_to_fixed(3, 10);
dceip->request_efficiency = bw_frc_to_fixed(8, 10);
dceip->dispclk_ramping_factor = bw_frc_to_fixed(105, 100);
dceip->display_pipe_throughput_factor = bw_frc_to_fixed(105, 100);
data->pixel_rate[num_displays + 4] = bw_frc_to_fixed(pipe[i].stream->timing.pix_clk_100hz, 10000);
data->pixel_rate[num_displays + 4] = bw_frc_to_fixed(pixel_clock_100hz, 10000);
data->h_scale_ratio[num_displays + 4] = bw_frc_to_fixed(pipe[i].stream->src.width, pipe[i].stream->dst.width);
data->v_scale_ratio[num_displays + 4] = bw_frc_to_fixed(pipe[i].stream->src.height, pipe[i].stream->dst.height);
data->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(2401171875ul, 100000000), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48));
data->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(300234375, 10000000), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48));
data->dram_efficiency = bw_frc_to_fixed(5, 10);
data->dram_efficiency = bw_frc_to_fixed(5, 10);
data->dram_efficiency = bw_frc_to_fixed(8, 10);
data->v_filter_init[i] = bw_floor2(bw_div((bw_add(bw_add(bw_add(bw_int_to_fixed(1), data->v_taps[i]), data->vsr[i]), bw_mul(bw_mul(bw_int_to_fixed(data->interlace_mode[i]), bw_frc_to_fixed(5, 10)), data->vsr[i]))), bw_int_to_fixed(2)), bw_int_to_fixed(1));
bw_frc_to_fixed(4, 3))) {
bw_frc_to_fixed(6, 4))) {
return bw_frc_to_fixed(arg1.value, arg2.value);
struct bw_fixed bw_frc_to_fixed(int64_t num, int64_t denum);
dc->bw_vbios->high_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid1_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid2_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid3_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid4_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid5_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid6_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_sclk = bw_frc_to_fixed(
dc->bw_vbios->high_voltage_max_dispclk = bw_frc_to_fixed(
dc->bw_vbios->mid_voltage_max_dispclk = bw_frc_to_fixed(
dc->bw_vbios->low_voltage_max_dispclk = bw_frc_to_fixed(
dc->bw_vbios->low_yclk = bw_frc_to_fixed(
dc->bw_vbios->mid_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid1_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid2_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid3_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid4_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid5_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid6_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_yclk = bw_frc_to_fixed(
dc->bw_vbios->mid_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid1_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid2_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid3_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid4_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid5_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid6_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_yclk = bw_frc_to_fixed(
dc->bw_vbios->mid_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_yclk = bw_frc_to_fixed(
dc->bw_vbios->high_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid1_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid2_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid3_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid4_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid5_sclk = bw_frc_to_fixed(
dc->bw_vbios->mid6_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_sclk = bw_frc_to_fixed(
dc->bw_vbios->low_yclk = bw_frc_to_fixed(
dc->bw_vbios->mid_yclk = bw_frc_to_fixed(