Lines Matching refs:vbios
79 const struct bw_calcs_vbios *vbios, in calculate_bandwidth() argument
141 yclk[low] = vbios->low_yclk; in calculate_bandwidth()
142 yclk[mid] = vbios->mid_yclk; in calculate_bandwidth()
143 yclk[high] = vbios->high_yclk; in calculate_bandwidth()
144 sclk[s_low] = vbios->low_sclk; in calculate_bandwidth()
145 sclk[s_mid1] = vbios->mid1_sclk; in calculate_bandwidth()
146 sclk[s_mid2] = vbios->mid2_sclk; in calculate_bandwidth()
147 sclk[s_mid3] = vbios->mid3_sclk; in calculate_bandwidth()
148 sclk[s_mid4] = vbios->mid4_sclk; in calculate_bandwidth()
149 sclk[s_mid5] = vbios->mid5_sclk; in calculate_bandwidth()
150 sclk[s_mid6] = vbios->mid6_sclk; in calculate_bandwidth()
151 sclk[s_high] = vbios->high_sclk; in calculate_bandwidth()
249 data->scatter_gather_enable_for_pipe[0] = vbios->scatter_gather_enable; in calculate_bandwidth()
250 data->scatter_gather_enable_for_pipe[1] = vbios->scatter_gather_enable; in calculate_bandwidth()
251 data->scatter_gather_enable_for_pipe[2] = vbios->scatter_gather_enable; in calculate_bandwidth()
252 data->scatter_gather_enable_for_pipe[3] = vbios->scatter_gather_enable; in calculate_bandwidth()
337 data->scatter_gather_enable_for_pipe[i] = vbios->scatter_gather_enable; in calculate_bandwidth()
348 data->compression_rate[i] = bw_int_to_fixed(vbios->average_compression_rate); in calculate_bandwidth()
361 data->cursor_width_pixels[i] = bw_int_to_fixed(vbios->cursor_width); in calculate_bandwidth()
608 data->number_of_dram_wrchannels = vbios->number_of_dram_channels; in calculate_bandwidth()
609 data->number_of_dram_channels = vbios->number_of_dram_channels; in calculate_bandwidth()
616 if (vbios->memory_type == bw_def_hbm) in calculate_bandwidth()
636 if (vbios->memory_type == bw_def_hbm) in calculate_bandwidth()
1064 …near_pitch_in_bytes = bw_mul(bw_mul(bw_int_to_fixed(256), bw_int_to_fixed(vbios->number_of_dram_ba… in calculate_bandwidth()
1110 …d(data->bytes_per_pixel[i]), data->tile_width_in_pixels), bw_int_to_fixed(vbios->number_of_dram_ba… in calculate_bandwidth()
1126 …er_gather_total_pte_request_groups), data->cursor_total_request_groups)), vbios->trc), bw_int_to_f… in calculate_bandwidth()
1127 … bw_div(bw_mul(data->mcifwr_total_number_of_data_request_page_close_open, vbios->trc), bw_int_to_f… in calculate_bandwidth()
1141 …usted_dmif_size, (bw_add(dceip->dmif_request_buffer_size, bw_int_to_fixed(vbios->number_of_request… in calculate_bandwidth()
1142 …data->total_dmifmc_urgent_latency = bw_mul(vbios->dmifmc_urgent_latency, data->total_dmifmc_urgent… in calculate_bandwidth()
1161 if (vbios->memory_type == bw_def_hbm) { in calculate_bandwidth()
1165 …usted_data_buffer_size_in_memory[i], bw_ceil2(bw_div(bw_int_to_fixed((8 * vbios->dram_channel_widt… in calculate_bandwidth()
1172 …->adjusted_data_buffer_size_in_memory[i], bw_ceil2(bw_div(bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1199 …vbios->dram_channel_width_in_bits)), bw_int_to_fixed(8)), bw_int_to_fixed(data->number_of_dram_cha… in calculate_bandwidth()
1201 …vbios->dram_channel_width_in_bits)), bw_int_to_fixed(8)), bw_int_to_fixed(data->number_of_dram_wrc… in calculate_bandwidth()
1212 …nded_up_to_chunks[i], (bw_div(dceip->lb_write_pixels_per_dispclk, (bw_div(vbios->low_voltage_max_d… in calculate_bandwidth()
1263 …vbios->mcifwrmc_urgent_latency, data->mcifwr_burst_time[j][k])), bw_floor2(bw_div(data->src_data_f… in calculate_bandwidth()
1269 …vbios->low_voltage_max_dispclk), bw_int_to_fixed(2))))), (bw_mul(data->mcifwr_burst_time[j][k], bw… in calculate_bandwidth()
1331 if (data->enable[k] && bw_mtn(vbios->blackout_duration, bw_int_to_fixed(0))) { in calculate_bandwidth()
1333 …[i][j], bw_sub(bw_sub(bw_sub(data->minimum_latency_hiding_with_cursor[k], vbios->blackout_duration… in calculate_bandwidth()
1334 …vbios->blackout_duration), data->dmif_burst_time[i][j]))), bw_div(bw_div(bw_mul(data->src_pixels_f… in calculate_bandwidth()
1335 …if (bw_leq(vbios->maximum_blackout_recovery_time, bw_add(bw_mul(bw_int_to_fixed(2), data->total_dm… in calculate_bandwidth()
1338 … data->useful_bytes_per_request[k]), data->bytes_per_request[k]), (bw_add(vbios->blackout_duration… in calculate_bandwidth()
1339 …vbios->blackout_duration, vbios->maximum_blackout_recovery_time))), data->adjusted_data_buffer_siz… in calculate_bandwidth()
1343 … bw_sub(bw_sub(bw_sub(bw_sub(data->minimum_latency_hiding_with_cursor[k], vbios->blackout_duration… in calculate_bandwidth()
1344 …vbios->blackout_duration), data->dmif_burst_time[i][j]), data->mcifwr_burst_time[i][j]))), bw_div(… in calculate_bandwidth()
1345 …if (bw_ltn(vbios->maximum_blackout_recovery_time, bw_add(bw_add(bw_mul(bw_int_to_fixed(2), vbios->… in calculate_bandwidth()
1348 … data->useful_bytes_per_request[k]), data->bytes_per_request[k]), (bw_add(vbios->blackout_duration… in calculate_bandwidth()
1349 …vbios->blackout_duration, vbios->maximum_blackout_recovery_time))), data->adjusted_data_buffer_siz… in calculate_bandwidth()
1356 …0)) && bw_ltn(data->dispclk_required_for_blackout_duration[high][s_high], vbios->high_voltage_max_… in calculate_bandwidth()
1358 …if (bw_ltn(data->dispclk_required_for_blackout_recovery[high][s_high], vbios->high_voltage_max_dis… in calculate_bandwidth()
1394 …argin = bw_sub(bw_sub(bw_sub(data->maximum_latency_hiding_with_cursor[k], vbios->nbp_state_change_… in calculate_bandwidth()
1399 …vbios->nbp_state_change_latency), data->dmif_burst_time[i][j]), data->dram_speed_change_line_sourc… in calculate_bandwidth()
1400 …if ((bw_ltn(data->dispclk_required_for_dram_speed_change_pipe[i][j], vbios->high_voltage_max_dispc… in calculate_bandwidth()
1408 … bw_sub(bw_sub(bw_sub(bw_sub(data->maximum_latency_hiding_with_cursor[k], vbios->nbp_state_change_… in calculate_bandwidth()
1413 …vbios->nbp_state_change_latency), data->dmif_burst_time[i][j]), data->dram_speed_change_line_sourc… in calculate_bandwidth()
1414 …if ((bw_ltn(data->dispclk_required_for_dram_speed_change_pipe[i][j], vbios->high_voltage_max_dispc… in calculate_bandwidth()
1438 …atio[k]), bw_int_to_fixed(4)))), data->h_total[k]), data->pixel_rate[k]), vbios->nbp_state_change_… in calculate_bandwidth()
1442 …atio[k]), bw_int_to_fixed(4)))), data->h_total[k]), data->pixel_rate[k]), vbios->nbp_state_change_… in calculate_bandwidth()
1466 …9)) && bw_ltn(data->dispclk_required_for_dram_speed_change[high][s_high], vbios->high_voltage_max_… in calculate_bandwidth()
1524 …data->chunk_request_delay = bw_fixed_to_int(bw_div(bw_int_to_fixed(512), vbios->high_voltage_max_d… in calculate_bandwidth()
1528 …data->display_writes_time_for_data_transfer = bw_sub(data->min_mcifwr_size_in_time, vbios->mcifwrm… in calculate_bandwidth()
1537 …(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[high]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1539 …else if (bw_mtn(vbios->dmifmc_urgent_latency, data->required_dmifmc_urgent_latency_for_page_close_… in calculate_bandwidth()
1543 …(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[high]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1547 …00),yclk[low]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_i… in calculate_bandwidth()
1548 …vbios->dram_channel_width_in_bits)), bw_int_to_fixed(8)), bw_int_to_fixed(data->number_of_dram_cha… in calculate_bandwidth()
1549 yclk_message = bw_fixed_to_int(vbios->low_yclk); in calculate_bandwidth()
1551 …l(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[low]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1553 …00),yclk[mid]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_i… in calculate_bandwidth()
1554 …vbios->dram_channel_width_in_bits)), bw_int_to_fixed(8)), bw_int_to_fixed(data->number_of_dram_cha… in calculate_bandwidth()
1555 yclk_message = bw_fixed_to_int(vbios->mid_yclk); in calculate_bandwidth()
1557 …l(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[mid]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1559 …0),yclk[high]),bw_div(bw_int_to_fixed(vbios->dram_channel_width_in_bits),bw_int_to_fixed(8))),bw_i… in calculate_bandwidth()
1560 …(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[high]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1561 yclk_message = bw_fixed_to_int(vbios->high_yclk); in calculate_bandwidth()
1563 …(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[high]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1568 …(bw_div(bw_mul(bw_mul(data->dram_efficiency, yclk[high]), bw_int_to_fixed(vbios->dram_channel_widt… in calculate_bandwidth()
1576 …reads_required_data, data->display_reads_time_for_data_transfer), (bw_mul(vbios->data_return_bus_w… in calculate_bandwidth()
1577 …splay_writes_required_data, data->display_writes_time_for_data_transfer), vbios->data_return_bus_w… in calculate_bandwidth()
1583 …else if (bw_mtn(vbios->dmifmc_urgent_latency, data->required_dmifmc_urgent_latency_for_page_close_… in calculate_bandwidth()
1590 …ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[low]),vbios->data_return_bus_w… in calculate_bandwidth()
1591 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1594 data->required_sclk = vbios->low_sclk; in calculate_bandwidth()
1596 …ideal_port_bw_display_can_use_in_normal_system_operation, 100),sclk[mid]),vbios->data_return_bus_w… in calculate_bandwidth()
1597 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1600 data->required_sclk = vbios->mid1_sclk; in calculate_bandwidth()
1602 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid2]),vbios->data_return_bus_w… in calculate_bandwidth()
1603 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1606 data->required_sclk = vbios->mid2_sclk; in calculate_bandwidth()
1608 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid3]),vbios->data_return_bus_w… in calculate_bandwidth()
1609 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1612 data->required_sclk = vbios->mid3_sclk; in calculate_bandwidth()
1614 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid4]),vbios->data_return_bus_w… in calculate_bandwidth()
1615 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1618 data->required_sclk = vbios->mid4_sclk; in calculate_bandwidth()
1620 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid5]),vbios->data_return_bus_w… in calculate_bandwidth()
1621 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1624 data->required_sclk = vbios->mid5_sclk; in calculate_bandwidth()
1626 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_mid6]),vbios->data_return_bus_w… in calculate_bandwidth()
1627 …vbios->high_voltage_max_dispclk))) && (data->cpuc_state_change_enable == bw_def_no || (bw_mtn(data… in calculate_bandwidth()
1630 data->required_sclk = vbios->mid6_sclk; in calculate_bandwidth()
1632 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_high]),vbios->data_return_bus_w… in calculate_bandwidth()
1636 data->required_sclk = vbios->high_sclk; in calculate_bandwidth()
1638 …al_port_bw_display_can_use_in_normal_system_operation, 100),sclk[s_high]),vbios->data_return_bus_w… in calculate_bandwidth()
1642 data->required_sclk = vbios->high_sclk; in calculate_bandwidth()
1664 …data->downspread_factor = bw_add(bw_int_to_fixed(1), bw_div(vbios->down_spread_percentage, bw_int_… in calculate_bandwidth()
1752 …if (bw_ltn(data->total_dispclk_required_with_ramping_with_request_bandwidth, vbios->high_voltage_m… in calculate_bandwidth()
1755 …else if (bw_ltn(data->total_dispclk_required_without_ramping_with_request_bandwidth, vbios->high_v… in calculate_bandwidth()
1756 data->dispclk = vbios->high_voltage_max_dispclk; in calculate_bandwidth()
1772 …bw_equ(bw_int_to_fixed(yclk_message), vbios->low_yclk) && sclk_message == bw_def_low && bw_ltn(dat… in calculate_bandwidth()
1775 …vbios->low_yclk) || bw_equ(bw_int_to_fixed(yclk_message), vbios->mid_yclk)) && (sclk_message == bw… in calculate_bandwidth()
1778 …vbios->low_yclk) || bw_equ(bw_int_to_fixed(yclk_message), vbios->mid_yclk) || bw_equ(bw_int_to_fix… in calculate_bandwidth()
1790 data->max_phyclk = vbios->low_voltage_max_phyclk; in calculate_bandwidth()
1793 data->max_phyclk = vbios->mid_voltage_max_phyclk; in calculate_bandwidth()
1796 data->max_phyclk = vbios->high_voltage_max_phyclk; in calculate_bandwidth()
1801 …if (data->enable[k] && bw_mtn(vbios->blackout_duration, bw_int_to_fixed(0)) && data->cpup_state_ch… in calculate_bandwidth()
1804 … data->useful_bytes_per_request[k]), data->bytes_per_request[k]), (bw_add(vbios->blackout_duration… in calculate_bandwidth()
1805 …idth[k], data->useful_bytes_per_request[k]), data->bytes_per_request[k]), vbios->blackout_duration… in calculate_bandwidth()
1809 …= bw_max2(data->blackout_recovery_time, bw_add(bw_mul(bw_int_to_fixed(2), vbios->mcifwrmc_urgent_l… in calculate_bandwidth()
1810 …t[k]), data->bytes_per_request[k]), (bw_add(vbios->blackout_duration, bw_add(bw_mul(bw_int_to_fixe… in calculate_bandwidth()
1811 …ytes_per_request[k]), vbios->blackout_duration), bw_sub(bw_div(bw_mul(bw_mul(bw_mul((bw_add(bw_add… in calculate_bandwidth()
1867 …ata->line_source_transfer_time[i][data->y_clk_level][data->sclk_level])), vbios->blackout_duration… in calculate_bandwidth()
1868 …data->stutter_exit_watermark[i] = bw_add(bw_sub(vbios->stutter_self_refresh_exit_latency, data->to… in calculate_bandwidth()
1869 …a->stutter_entry_watermark[i] = bw_add(bw_sub(bw_add(vbios->stutter_self_refresh_exit_latency, vbi… in calculate_bandwidth()
1872 …data->nbp_state_change_watermark[i] = bw_add(bw_add(vbios->nbp_state_change_latency, data->dmif_bu… in calculate_bandwidth()
1880 …vbios->mcifwrmc_urgent_latency, data->mcifwr_burst_time[data->y_clk_level][data->sclk_level]), bw_… in calculate_bandwidth()
1884 …data->nbp_state_change_watermark[i] = bw_add(bw_add(vbios->nbp_state_change_latency, data->mcifwr_… in calculate_bandwidth()
1955 …xed(data->total_stutter_dmif_buffer_size), bw_mul(sclk[data->sclk_level], vbios->data_return_bus_w… in calculate_bandwidth()
1957 …data->total_stutter_cycle_duration = bw_add(bw_add(data->min_stutter_refresh_duration, vbios->stut… in calculate_bandwidth()
1967 …nt_to_fixed(0), bw_mul((bw_sub(bw_int_to_fixed(1), (bw_div(bw_mul((bw_add(vbios->stutter_self_refr… in calculate_bandwidth()
1986 …data->latency_for_non_mcifwr_clients = bw_add(vbios->mcifwrmc_urgent_latency, dceip->mcifwr_all_su… in calculate_bandwidth()
1999 …imum_latency_hiding_with_cursor[i], data->nbp_state_change_watermark[i]), vbios->nbp_state_change_… in calculate_bandwidth()
2000 …>h_total[i]), data->pixel_rate[i]), data->nbp_state_change_watermark[i]), vbios->nbp_state_change_… in calculate_bandwidth()
2007 …, data->display_reads_time_for_data_transfer_and_urgent_latency), (bw_mul(vbios->data_return_bus_w… in calculate_bandwidth()
2050 struct bw_calcs_vbios *vbios; in bw_calcs_init() local
2058 vbios = kzalloc(sizeof(*vbios), GFP_KERNEL); in bw_calcs_init()
2059 if (!vbios) { in bw_calcs_init()
2068 vbios->memory_type = bw_def_gddr5; in bw_calcs_init()
2069 vbios->dram_channel_width_in_bits = 64; in bw_calcs_init()
2070 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2071 vbios->number_of_dram_banks = 8; in bw_calcs_init()
2072 vbios->high_yclk = bw_int_to_fixed(1600); in bw_calcs_init()
2073 vbios->mid_yclk = bw_int_to_fixed(1600); in bw_calcs_init()
2074 vbios->low_yclk = bw_frc_to_fixed(66666, 100); in bw_calcs_init()
2075 vbios->low_sclk = bw_int_to_fixed(200); in bw_calcs_init()
2076 vbios->mid1_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2077 vbios->mid2_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2078 vbios->mid3_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2079 vbios->mid4_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2080 vbios->mid5_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2081 vbios->mid6_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2082 vbios->high_sclk = bw_frc_to_fixed(62609, 100); in bw_calcs_init()
2083 vbios->low_voltage_max_dispclk = bw_int_to_fixed(352); in bw_calcs_init()
2084 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(467); in bw_calcs_init()
2085 vbios->high_voltage_max_dispclk = bw_int_to_fixed(643); in bw_calcs_init()
2086 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2087 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2088 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2089 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2090 vbios->trc = bw_int_to_fixed(50); in bw_calcs_init()
2091 vbios->dmifmc_urgent_latency = bw_int_to_fixed(4); in bw_calcs_init()
2092 vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(153, 10); in bw_calcs_init()
2093 vbios->stutter_self_refresh_entry_latency = bw_int_to_fixed(0); in bw_calcs_init()
2094 vbios->nbp_state_change_latency = bw_frc_to_fixed(19649, 1000); in bw_calcs_init()
2095 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2096 vbios->scatter_gather_enable = true; in bw_calcs_init()
2097 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2098 vbios->cursor_width = 32; in bw_calcs_init()
2099 vbios->average_compression_rate = 4; in bw_calcs_init()
2100 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 256; in bw_calcs_init()
2101 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2102 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2184 vbios->memory_type = bw_def_gddr5; in bw_calcs_init()
2185 vbios->dram_channel_width_in_bits = 32; in bw_calcs_init()
2186 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2187 vbios->number_of_dram_banks = 8; in bw_calcs_init()
2188 vbios->high_yclk = bw_int_to_fixed(6000); in bw_calcs_init()
2189 vbios->mid_yclk = bw_int_to_fixed(3200); in bw_calcs_init()
2190 vbios->low_yclk = bw_int_to_fixed(1000); in bw_calcs_init()
2191 vbios->low_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2192 vbios->mid1_sclk = bw_int_to_fixed(400); in bw_calcs_init()
2193 vbios->mid2_sclk = bw_int_to_fixed(500); in bw_calcs_init()
2194 vbios->mid3_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2195 vbios->mid4_sclk = bw_int_to_fixed(700); in bw_calcs_init()
2196 vbios->mid5_sclk = bw_int_to_fixed(800); in bw_calcs_init()
2197 vbios->mid6_sclk = bw_int_to_fixed(974); in bw_calcs_init()
2198 vbios->high_sclk = bw_int_to_fixed(1154); in bw_calcs_init()
2199 vbios->low_voltage_max_dispclk = bw_int_to_fixed(459); in bw_calcs_init()
2200 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(654); in bw_calcs_init()
2201 vbios->high_voltage_max_dispclk = bw_int_to_fixed(1108); in bw_calcs_init()
2202 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2203 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2204 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2205 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2206 vbios->trc = bw_int_to_fixed(48); in bw_calcs_init()
2207 vbios->dmifmc_urgent_latency = bw_int_to_fixed(3); in bw_calcs_init()
2208 vbios->stutter_self_refresh_exit_latency = bw_int_to_fixed(5); in bw_calcs_init()
2209 vbios->stutter_self_refresh_entry_latency = bw_int_to_fixed(0); in bw_calcs_init()
2210 vbios->nbp_state_change_latency = bw_int_to_fixed(45); in bw_calcs_init()
2211 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2212 vbios->scatter_gather_enable = true; in bw_calcs_init()
2213 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2214 vbios->cursor_width = 32; in bw_calcs_init()
2215 vbios->average_compression_rate = 4; in bw_calcs_init()
2216 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 256; in bw_calcs_init()
2217 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2218 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2297 vbios->memory_type = bw_def_gddr5; in bw_calcs_init()
2298 vbios->dram_channel_width_in_bits = 32; in bw_calcs_init()
2299 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2300 vbios->number_of_dram_banks = 8; in bw_calcs_init()
2301 vbios->high_yclk = bw_int_to_fixed(6000); in bw_calcs_init()
2302 vbios->mid_yclk = bw_int_to_fixed(3200); in bw_calcs_init()
2303 vbios->low_yclk = bw_int_to_fixed(1000); in bw_calcs_init()
2304 vbios->low_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2305 vbios->mid1_sclk = bw_int_to_fixed(400); in bw_calcs_init()
2306 vbios->mid2_sclk = bw_int_to_fixed(500); in bw_calcs_init()
2307 vbios->mid3_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2308 vbios->mid4_sclk = bw_int_to_fixed(700); in bw_calcs_init()
2309 vbios->mid5_sclk = bw_int_to_fixed(800); in bw_calcs_init()
2310 vbios->mid6_sclk = bw_int_to_fixed(974); in bw_calcs_init()
2311 vbios->high_sclk = bw_int_to_fixed(1154); in bw_calcs_init()
2312 vbios->low_voltage_max_dispclk = bw_int_to_fixed(459); in bw_calcs_init()
2313 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(654); in bw_calcs_init()
2314 vbios->high_voltage_max_dispclk = bw_int_to_fixed(1108); in bw_calcs_init()
2315 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2316 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2317 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2318 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2319 vbios->trc = bw_int_to_fixed(48); in bw_calcs_init()
2320 if (vbios->number_of_dram_channels == 2) // 64-bit in bw_calcs_init()
2321 vbios->dmifmc_urgent_latency = bw_int_to_fixed(4); in bw_calcs_init()
2323 vbios->dmifmc_urgent_latency = bw_int_to_fixed(3); in bw_calcs_init()
2324 vbios->stutter_self_refresh_exit_latency = bw_int_to_fixed(5); in bw_calcs_init()
2325 vbios->stutter_self_refresh_entry_latency = bw_int_to_fixed(0); in bw_calcs_init()
2326 vbios->nbp_state_change_latency = bw_int_to_fixed(45); in bw_calcs_init()
2327 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2328 vbios->scatter_gather_enable = true; in bw_calcs_init()
2329 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2330 vbios->cursor_width = 32; in bw_calcs_init()
2331 vbios->average_compression_rate = 4; in bw_calcs_init()
2332 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 256; in bw_calcs_init()
2333 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2334 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2413 vbios->memory_type = bw_def_gddr5; in bw_calcs_init()
2414 vbios->dram_channel_width_in_bits = 32; in bw_calcs_init()
2415 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2416 vbios->number_of_dram_banks = 8; in bw_calcs_init()
2417 vbios->high_yclk = bw_int_to_fixed(6000); in bw_calcs_init()
2418 vbios->mid_yclk = bw_int_to_fixed(3200); in bw_calcs_init()
2419 vbios->low_yclk = bw_int_to_fixed(1000); in bw_calcs_init()
2420 vbios->low_sclk = bw_int_to_fixed(678); in bw_calcs_init()
2421 vbios->mid1_sclk = bw_int_to_fixed(864); in bw_calcs_init()
2422 vbios->mid2_sclk = bw_int_to_fixed(900); in bw_calcs_init()
2423 vbios->mid3_sclk = bw_int_to_fixed(920); in bw_calcs_init()
2424 vbios->mid4_sclk = bw_int_to_fixed(940); in bw_calcs_init()
2425 vbios->mid5_sclk = bw_int_to_fixed(960); in bw_calcs_init()
2426 vbios->mid6_sclk = bw_int_to_fixed(980); in bw_calcs_init()
2427 vbios->high_sclk = bw_int_to_fixed(1049); in bw_calcs_init()
2428 vbios->low_voltage_max_dispclk = bw_int_to_fixed(459); in bw_calcs_init()
2429 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(654); in bw_calcs_init()
2430 vbios->high_voltage_max_dispclk = bw_int_to_fixed(1108); in bw_calcs_init()
2431 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2432 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2433 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2434 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2435 vbios->trc = bw_int_to_fixed(48); in bw_calcs_init()
2436 if (vbios->number_of_dram_channels == 2) // 64-bit in bw_calcs_init()
2437 vbios->dmifmc_urgent_latency = bw_int_to_fixed(4); in bw_calcs_init()
2439 vbios->dmifmc_urgent_latency = bw_int_to_fixed(3); in bw_calcs_init()
2440 vbios->stutter_self_refresh_exit_latency = bw_int_to_fixed(5); in bw_calcs_init()
2441 vbios->stutter_self_refresh_entry_latency = bw_int_to_fixed(0); in bw_calcs_init()
2442 vbios->nbp_state_change_latency = bw_int_to_fixed(250); in bw_calcs_init()
2443 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2444 vbios->scatter_gather_enable = false; in bw_calcs_init()
2445 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2446 vbios->cursor_width = 32; in bw_calcs_init()
2447 vbios->average_compression_rate = 4; in bw_calcs_init()
2448 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 256; in bw_calcs_init()
2449 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2450 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2529 vbios->memory_type = bw_def_gddr5; in bw_calcs_init()
2530 vbios->dram_channel_width_in_bits = 64; in bw_calcs_init()
2531 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2532 vbios->number_of_dram_banks = 8; in bw_calcs_init()
2533 vbios->high_yclk = bw_int_to_fixed(1866); in bw_calcs_init()
2534 vbios->mid_yclk = bw_int_to_fixed(1866); in bw_calcs_init()
2535 vbios->low_yclk = bw_int_to_fixed(1333); in bw_calcs_init()
2536 vbios->low_sclk = bw_int_to_fixed(200); in bw_calcs_init()
2537 vbios->mid1_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2538 vbios->mid2_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2539 vbios->mid3_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2540 vbios->mid4_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2541 vbios->mid5_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2542 vbios->mid6_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2543 vbios->high_sclk = bw_int_to_fixed(800); in bw_calcs_init()
2544 vbios->low_voltage_max_dispclk = bw_int_to_fixed(352); in bw_calcs_init()
2545 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(467); in bw_calcs_init()
2546 vbios->high_voltage_max_dispclk = bw_int_to_fixed(643); in bw_calcs_init()
2547 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2548 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2549 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2550 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2551 vbios->trc = bw_int_to_fixed(50); in bw_calcs_init()
2552 vbios->dmifmc_urgent_latency = bw_int_to_fixed(4); in bw_calcs_init()
2553 vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(158, 10); in bw_calcs_init()
2554 vbios->stutter_self_refresh_entry_latency = bw_int_to_fixed(0); in bw_calcs_init()
2555 vbios->nbp_state_change_latency = bw_frc_to_fixed(2008, 100); in bw_calcs_init()
2556 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2557 vbios->scatter_gather_enable = true; in bw_calcs_init()
2558 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2559 vbios->cursor_width = 32; in bw_calcs_init()
2560 vbios->average_compression_rate = 4; in bw_calcs_init()
2561 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 256; in bw_calcs_init()
2562 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2563 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2642 vbios->memory_type = bw_def_hbm; in bw_calcs_init()
2643 vbios->dram_channel_width_in_bits = 128; in bw_calcs_init()
2644 vbios->number_of_dram_channels = asic_id.vram_width / vbios->dram_channel_width_in_bits; in bw_calcs_init()
2645 vbios->number_of_dram_banks = 16; in bw_calcs_init()
2646 vbios->high_yclk = bw_int_to_fixed(2400); in bw_calcs_init()
2647 vbios->mid_yclk = bw_int_to_fixed(1700); in bw_calcs_init()
2648 vbios->low_yclk = bw_int_to_fixed(1000); in bw_calcs_init()
2649 vbios->low_sclk = bw_int_to_fixed(300); in bw_calcs_init()
2650 vbios->mid1_sclk = bw_int_to_fixed(350); in bw_calcs_init()
2651 vbios->mid2_sclk = bw_int_to_fixed(400); in bw_calcs_init()
2652 vbios->mid3_sclk = bw_int_to_fixed(500); in bw_calcs_init()
2653 vbios->mid4_sclk = bw_int_to_fixed(600); in bw_calcs_init()
2654 vbios->mid5_sclk = bw_int_to_fixed(700); in bw_calcs_init()
2655 vbios->mid6_sclk = bw_int_to_fixed(760); in bw_calcs_init()
2656 vbios->high_sclk = bw_int_to_fixed(776); in bw_calcs_init()
2657 vbios->low_voltage_max_dispclk = bw_int_to_fixed(460); in bw_calcs_init()
2658 vbios->mid_voltage_max_dispclk = bw_int_to_fixed(670); in bw_calcs_init()
2659 vbios->high_voltage_max_dispclk = bw_int_to_fixed(1133); in bw_calcs_init()
2660 vbios->low_voltage_max_phyclk = bw_int_to_fixed(540); in bw_calcs_init()
2661 vbios->mid_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2662 vbios->high_voltage_max_phyclk = bw_int_to_fixed(810); in bw_calcs_init()
2663 vbios->data_return_bus_width = bw_int_to_fixed(32); in bw_calcs_init()
2664 vbios->trc = bw_int_to_fixed(48); in bw_calcs_init()
2665 vbios->dmifmc_urgent_latency = bw_int_to_fixed(3); in bw_calcs_init()
2666 vbios->stutter_self_refresh_exit_latency = bw_frc_to_fixed(75, 10); in bw_calcs_init()
2667 vbios->stutter_self_refresh_entry_latency = bw_frc_to_fixed(19, 10); in bw_calcs_init()
2668 vbios->nbp_state_change_latency = bw_int_to_fixed(39); in bw_calcs_init()
2669 vbios->mcifwrmc_urgent_latency = bw_int_to_fixed(10); in bw_calcs_init()
2670 vbios->scatter_gather_enable = false; in bw_calcs_init()
2671 vbios->down_spread_percentage = bw_frc_to_fixed(5, 10); in bw_calcs_init()
2672 vbios->cursor_width = 32; in bw_calcs_init()
2673 vbios->average_compression_rate = 4; in bw_calcs_init()
2674 vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel = 8; in bw_calcs_init()
2675 vbios->blackout_duration = bw_int_to_fixed(0); /* us */ in bw_calcs_init()
2676 vbios->maximum_blackout_recovery_time = bw_int_to_fixed(0); in bw_calcs_init()
2758 *bw_vbios = *vbios; in bw_calcs_init()
2761 kfree(vbios); in bw_calcs_init()
2769 const struct bw_calcs_vbios *vbios, in is_display_configuration_supported() argument
2774 int_max_clk = bw_fixed_to_int(vbios->high_voltage_max_dispclk); in is_display_configuration_supported()
2779 int_max_clk = bw_fixed_to_int(vbios->high_sclk); in is_display_configuration_supported()
3045 const struct bw_calcs_vbios *vbios, in bw_calcs() argument
3064 struct bw_fixed high_sclk = vbios->high_sclk; in bw_calcs()
3065 struct bw_fixed mid1_sclk = vbios->mid1_sclk; in bw_calcs()
3066 struct bw_fixed mid2_sclk = vbios->mid2_sclk; in bw_calcs()
3067 struct bw_fixed mid3_sclk = vbios->mid3_sclk; in bw_calcs()
3068 struct bw_fixed mid4_sclk = vbios->mid4_sclk; in bw_calcs()
3069 struct bw_fixed mid5_sclk = vbios->mid5_sclk; in bw_calcs()
3070 struct bw_fixed mid6_sclk = vbios->mid6_sclk; in bw_calcs()
3071 struct bw_fixed low_sclk = vbios->low_sclk; in bw_calcs()
3072 struct bw_fixed high_yclk = vbios->high_yclk; in bw_calcs()
3073 struct bw_fixed mid_yclk = vbios->mid_yclk; in bw_calcs()
3074 struct bw_fixed low_yclk = vbios->low_yclk; in bw_calcs()
3078 print_bw_calcs_vbios(ctx, vbios); in bw_calcs()
3081 calculate_bandwidth(dceip, vbios, data); in bw_calcs()
3232 ((struct bw_calcs_vbios *)vbios)->low_sclk = mid3_sclk; in bw_calcs()
3233 ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid3_sclk; in bw_calcs()
3234 ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid3_sclk; in bw_calcs()
3235 calculate_bandwidth(dceip, vbios, data); in bw_calcs()
3352 ((struct bw_calcs_vbios *)vbios)->low_sclk = low_sclk; in bw_calcs()
3353 ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid1_sclk; in bw_calcs()
3354 ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid2_sclk; in bw_calcs()
3355 ((struct bw_calcs_vbios *)vbios)->low_yclk = mid_yclk; in bw_calcs()
3356 calculate_bandwidth(dceip, vbios, data); in bw_calcs()
3473 ((struct bw_calcs_vbios *)vbios)->low_yclk = high_yclk; in bw_calcs()
3474 ((struct bw_calcs_vbios *)vbios)->mid_yclk = high_yclk; in bw_calcs()
3475 ((struct bw_calcs_vbios *)vbios)->low_sclk = high_sclk; in bw_calcs()
3476 ((struct bw_calcs_vbios *)vbios)->mid1_sclk = high_sclk; in bw_calcs()
3477 ((struct bw_calcs_vbios *)vbios)->mid2_sclk = high_sclk; in bw_calcs()
3478 ((struct bw_calcs_vbios *)vbios)->mid3_sclk = high_sclk; in bw_calcs()
3479 ((struct bw_calcs_vbios *)vbios)->mid4_sclk = high_sclk; in bw_calcs()
3480 ((struct bw_calcs_vbios *)vbios)->mid5_sclk = high_sclk; in bw_calcs()
3481 ((struct bw_calcs_vbios *)vbios)->mid6_sclk = high_sclk; in bw_calcs()
3483 ((struct bw_calcs_vbios *)vbios)->low_yclk = mid_yclk; in bw_calcs()
3484 ((struct bw_calcs_vbios *)vbios)->low_sclk = mid3_sclk; in bw_calcs()
3485 ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid3_sclk; in bw_calcs()
3486 ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid3_sclk; in bw_calcs()
3489 calculate_bandwidth(dceip, vbios, data); in bw_calcs()
3603 ((struct bw_calcs_vbios *)vbios)->low_yclk = low_yclk; in bw_calcs()
3604 ((struct bw_calcs_vbios *)vbios)->mid_yclk = mid_yclk; in bw_calcs()
3605 ((struct bw_calcs_vbios *)vbios)->low_sclk = low_sclk; in bw_calcs()
3606 ((struct bw_calcs_vbios *)vbios)->mid1_sclk = mid1_sclk; in bw_calcs()
3607 ((struct bw_calcs_vbios *)vbios)->mid2_sclk = mid2_sclk; in bw_calcs()
3608 ((struct bw_calcs_vbios *)vbios)->mid3_sclk = mid3_sclk; in bw_calcs()
3609 ((struct bw_calcs_vbios *)vbios)->mid4_sclk = mid4_sclk; in bw_calcs()
3610 ((struct bw_calcs_vbios *)vbios)->mid5_sclk = mid5_sclk; in bw_calcs()
3611 ((struct bw_calcs_vbios *)vbios)->mid6_sclk = mid6_sclk; in bw_calcs()
3612 ((struct bw_calcs_vbios *)vbios)->high_sclk = high_sclk; in bw_calcs()
3624 return is_display_configuration_supported(vbios, calcs_output); in bw_calcs()