cpu_to_be16
if (ehdr->h_proto == cpu_to_be16(ETH_P_PAE)) {
cpu_to_be16(DIV_ROUNDUP((i * 65536), num_entries));
cpu_to_be16(params.backlight_lut_array[lut_index]);
cpu_to_be16(DIV_ROUNDUP((i * 65536), num_entries)) :
cpu_to_be16(params.backlight_lut_array[lut_index]) :
cpu_to_be16(params.min_abm_backlight);
cpu_to_be16(params.backlight_ramping_reduction);
cpu_to_be16(params.backlight_ramping_start);
((big_endian) ? cpu_to_be16(value) : cpu_to_le16(value))
ram_table->crgb_thresh[0] = cpu_to_be16(0x13b6);
ram_table->crgb_thresh[1] = cpu_to_be16(0x1648);
ram_table->crgb_thresh[2] = cpu_to_be16(0x18e3);
ram_table->crgb_thresh[3] = cpu_to_be16(0x1b41);
ram_table->crgb_thresh[4] = cpu_to_be16(0x1d46);
ram_table->crgb_thresh[5] = cpu_to_be16(0x1f21);
ram_table->crgb_thresh[6] = cpu_to_be16(0x2167);
ram_table->crgb_thresh[7] = cpu_to_be16(0x2384);
ram_table->crgb_offset[0] = cpu_to_be16(0x2999);
ram_table->crgb_offset[1] = cpu_to_be16(0x3999);
ram_table->crgb_offset[2] = cpu_to_be16(0x4666);
ram_table->crgb_offset[3] = cpu_to_be16(0x5999);
ram_table->crgb_offset[4] = cpu_to_be16(0x6333);
ram_table->crgb_offset[5] = cpu_to_be16(0x7800);
ram_table->crgb_offset[6] = cpu_to_be16(0x8c00);
ram_table->crgb_offset[7] = cpu_to_be16(0xa000);
ram_table->crgb_slope[0] = cpu_to_be16(0x3147);
ram_table->crgb_slope[1] = cpu_to_be16(0x2978);
ram_table->crgb_slope[2] = cpu_to_be16(0x23a2);
ram_table->crgb_slope[3] = cpu_to_be16(0x1f55);
ram_table->crgb_slope[4] = cpu_to_be16(0x1c63);
ram_table->crgb_slope[5] = cpu_to_be16(0x1a0f);
ram_table->crgb_slope[6] = cpu_to_be16(0x178d);
ram_table->crgb_slope[7] = cpu_to_be16(0x15ab);
cpu_to_be16(params.min_abm_backlight);
ram_table->crgb_thresh[0] = cpu_to_be16(0x127c);
ram_table->crgb_thresh[1] = cpu_to_be16(0x151b);
ram_table->crgb_thresh[2] = cpu_to_be16(0x17d5);
ram_table->crgb_thresh[3] = cpu_to_be16(0x1a56);
ram_table->crgb_thresh[4] = cpu_to_be16(0x1c83);
ram_table->crgb_thresh[5] = cpu_to_be16(0x1e72);
ram_table->crgb_thresh[6] = cpu_to_be16(0x20f0);
ram_table->crgb_thresh[7] = cpu_to_be16(0x232b);
ram_table->crgb_offset[0] = cpu_to_be16(0x2999);
ram_table->crgb_offset[1] = cpu_to_be16(0x3999);
ram_table->crgb_offset[2] = cpu_to_be16(0x4666);
ram_table->crgb_offset[3] = cpu_to_be16(0x5999);
ram_table->crgb_offset[4] = cpu_to_be16(0x6333);
ram_table->crgb_offset[5] = cpu_to_be16(0x7800);
ram_table->crgb_offset[6] = cpu_to_be16(0x8c00);
ram_table->crgb_offset[7] = cpu_to_be16(0xa000);
ram_table->crgb_slope[0] = cpu_to_be16(0x3609);
ram_table->crgb_slope[1] = cpu_to_be16(0x2dfa);
ram_table->crgb_slope[2] = cpu_to_be16(0x27ea);
ram_table->crgb_slope[3] = cpu_to_be16(0x235d);
ram_table->crgb_slope[4] = cpu_to_be16(0x2042);
ram_table->crgb_slope[5] = cpu_to_be16(0x1dc3);
ram_table->crgb_slope[6] = cpu_to_be16(0x1b1a);
ram_table->crgb_slope[7] = cpu_to_be16(0x1910);
cpu_to_be16(params.min_abm_backlight) :
pi->samu_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
pi->acp_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
pi->fps_high_t = cpu_to_be16(tmp);
pi->fps_low_t = cpu_to_be16(tmp);
pi->graphics_level[index].AT = cpu_to_be16((u16)at);
pi->uvd_level[i].MinVddNb = cpu_to_be16(table->entries[i].v);
pi->vce_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
smc_state->levels[i].dpm2.PwrEfficiencyRatio = cpu_to_be16(pwr_efficiency_ratio);
cpu_to_be16((u16)smc_leakage);
cpu_to_be16((u16)smc_leakage);
voltage->value = cpu_to_be16(table->entries[i].value);
voltage->value = cpu_to_be16(si_pi->mvdd_voltage_table.entries[voltage->index].value);
voltage->value = cpu_to_be16(value);
cpu_to_be16(si_pi->mc_reg_table.mc_reg_address[j].s0);
cpu_to_be16(si_pi->mc_reg_table.mc_reg_address[j].s1);
fan_table.temp_min = cpu_to_be16((50 + adev->pm.dpm.fan.t_min) / 100);
fan_table.temp_med = cpu_to_be16((50 + adev->pm.dpm.fan.t_med) / 100);
fan_table.temp_max = cpu_to_be16((50 + adev->pm.dpm.fan.t_max) / 100);
fan_table.slope1 = cpu_to_be16(slope1);
fan_table.slope2 = cpu_to_be16(slope2);
fan_table.fdo_min = cpu_to_be16(fdo_min);
fan_table.hys_down = cpu_to_be16(adev->pm.dpm.fan.t_hyst);
fan_table.hys_up = cpu_to_be16(1);
fan_table.hys_slope = cpu_to_be16(1);
fan_table.temp_resp_lim = cpu_to_be16(5);
fan_table.fdo_max = cpu_to_be16((u16)duty100);
#define PP_HOST_TO_SMC_US(X) cpu_to_be16(X)
fan_table.TempMin = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMin) / 100);
fan_table.TempMed = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMed) / 100);
fan_table.TempMax = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMax) / 100);
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(hwmgr->thermal_controller.advanceFanControlParameters.ucTHyst);
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((uint16_t)duty100);
cpu_to_be16(setting->sclk_activity)) {
levels[i].ActivityLevel = cpu_to_be16(setting->sclk_activity);
cpu_to_be16(setting->mclk_activity)) {
mclk_levels[i].ActivityLevel = cpu_to_be16(setting->mclk_activity);
fan_table.TempMin = cpu_to_be16((50 + hwmgr->
fan_table.TempMed = cpu_to_be16((50 + hwmgr->
fan_table.TempMax = cpu_to_be16((50 + hwmgr->
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(hwmgr->
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((uint16_t)duty100);
cpu_to_be16(setting->sclk_activity)) {
levels[i].ActivityLevel = cpu_to_be16(setting->sclk_activity);
cpu_to_be16(setting->mclk_activity)) {
mclk_levels[i].ActivityLevel = cpu_to_be16(setting->mclk_activity);
fan_table.TempMin = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMin) / 100);
fan_table.TempMed = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMed) / 100);
fan_table.TempMax = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMax) / 100);
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(hwmgr->thermal_controller.advanceFanControlParameters.ucTHyst);
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((uint16_t)duty100);
fan_table.TempMin = cpu_to_be16((50 + hwmgr->
fan_table.TempMed = cpu_to_be16((50 + hwmgr->
fan_table.TempMax = cpu_to_be16((50 + hwmgr->
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(hwmgr->
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((uint16_t)duty100);
cpu_to_be16(setting->sclk_activity)) {
levels[i].ActivityLevel = cpu_to_be16(setting->sclk_activity);
cpu_to_be16(setting->mclk_activity)) {
mclk_levels[i].ActivityLevel = cpu_to_be16(setting->mclk_activity);
fan_table.TempMin = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMin) / 100);
fan_table.TempMed = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMed) / 100);
fan_table.TempMax = cpu_to_be16((50 + hwmgr->thermal_controller.advanceFanControlParameters.usTMax) / 100);
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(hwmgr->thermal_controller.advanceFanControlParameters.ucTHyst);
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((uint16_t)duty100);
cpu_to_be16(setting->sclk_activity)) {
levels[i].ActivityLevel = cpu_to_be16(setting->sclk_activity);
cpu_to_be16(setting->mclk_activity)) {
mclk_levels[i].ActivityLevel = cpu_to_be16(setting->mclk_activity);
pps_payload->pic_height = cpu_to_be16(dsc_cfg->pic_height);
pps_payload->pic_width = cpu_to_be16(dsc_cfg->pic_width);
pps_payload->slice_height = cpu_to_be16(dsc_cfg->slice_height);
pps_payload->slice_width = cpu_to_be16(dsc_cfg->slice_width);
pps_payload->chunk_size = cpu_to_be16(dsc_cfg->slice_chunk_size);
cpu_to_be16(dsc_cfg->initial_dec_delay);
cpu_to_be16(dsc_cfg->scale_increment_interval);
cpu_to_be16(dsc_cfg->nfl_bpg_offset);
cpu_to_be16(dsc_cfg->slice_bpg_offset);
cpu_to_be16(dsc_cfg->initial_offset);
pps_payload->final_offset = cpu_to_be16(dsc_cfg->final_offset);
pps_payload->rc_model_size = cpu_to_be16(dsc_cfg->rc_model_size);
cpu_to_be16((dsc_cfg->rc_range_params[i].range_min_qp <<
cpu_to_be16(dsc_cfg->nsl_bpg_offset);
cpu_to_be16(dsc_cfg->second_line_offset_adj);
msgs.stream_manage.k = cpu_to_be16(data->k);
verify_mprime_in->k = cpu_to_be16(data->k);
table->FpsHighT = cpu_to_be16(tmp);
table->FpsLowT = cpu_to_be16(tmp);
smc_voltage_table->Voltage = cpu_to_be16(voltage_table->value * VOLTAGE_SCALE);
cpu_to_be16(smc_voltage_table->StdVoltageHiSidd);
cpu_to_be16(smc_voltage_table->StdVoltageLoSidd);
table->UvdLevel[count].MinVddc = cpu_to_be16(table->UvdLevel[count].MinVddc);
table->VceLevel[count].MinVoltage = cpu_to_be16(table->VceLevel[count].MinVoltage);
table->AcpLevel[count].MinVoltage = cpu_to_be16(table->AcpLevel[count].MinVoltage);
table->SamuLevel[count].MinVoltage = cpu_to_be16(table->SamuLevel[count].MinVoltage);
memory_level->ActivityLevel = cpu_to_be16(memory_level->ActivityLevel);
cpu_to_be16((u16)pi->mclk_activity_target);
pi->smc_powertune_table.TDC_VDDC_PkgLimit = cpu_to_be16(tdc_limit);
state->VddcOffset = cpu_to_be16(state->VddcOffset);
graphic_level->ActivityLevel = cpu_to_be16(graphic_level->ActivityLevel);
pi->smc_state_table.MemoryLevel[0].ActivityLevel = cpu_to_be16(0x1F);
cpu_to_be16(rdev->pm.dpm.fan.fan_output_sensitivity);
table->TemperatureLimitHigh = cpu_to_be16(table->TemperatureLimitHigh);
table->TemperatureLimitLow = cpu_to_be16(table->TemperatureLimitLow);
table->VddcVddciDelta = cpu_to_be16(table->VddcVddciDelta);
table->VoltageResponseTime = cpu_to_be16(table->VoltageResponseTime);
table->PhaseResponseTime = cpu_to_be16(table->PhaseResponseTime);
table->BootVddc = cpu_to_be16(table->BootVddc * VOLTAGE_SCALE);
table->BootVddci = cpu_to_be16(table->BootVddci * VOLTAGE_SCALE);
table->BootMVdd = cpu_to_be16(table->BootMVdd * VOLTAGE_SCALE);
pi->smc_powertune_table.BapmVddCBaseLeakageHiSidd = cpu_to_be16(hi_sidd);
pi->smc_powertune_table.BapmVddCBaseLeakageLoSidd = cpu_to_be16(lo_sidd);
dpm_table->PPM_PkgPwrLimit = cpu_to_be16((u16)ppm->dgpu_tdp * 256 / 1000);
dpm_table->PPM_TemperatureLimit = cpu_to_be16((u16)ppm->tj_max * 256);
dpm_table->PPM_PkgPwrLimit = cpu_to_be16(0);
dpm_table->PPM_TemperatureLimit = cpu_to_be16(0);
dpm_table->BAPMTI_R[i][j][k] = cpu_to_be16(*def1);
dpm_table->BAPMTI_RC[i][j][k] = cpu_to_be16(*def2);
mc_reg_table->address[i].s0 = cpu_to_be16(pi->mc_reg_table.mc_reg_address[j].s0);
mc_reg_table->address[i].s1 = cpu_to_be16(pi->mc_reg_table.mc_reg_address[j].s1);
fan_table.TempMin = cpu_to_be16((50 + rdev->pm.dpm.fan.t_min) / 100);
fan_table.TempMed = cpu_to_be16((50 + rdev->pm.dpm.fan.t_med) / 100);
fan_table.TempMax = cpu_to_be16((50 + rdev->pm.dpm.fan.t_max) / 100);
fan_table.Slope1 = cpu_to_be16(slope1);
fan_table.Slope2 = cpu_to_be16(slope2);
fan_table.FdoMin = cpu_to_be16(fdo_min);
fan_table.HystDown = cpu_to_be16(rdev->pm.dpm.fan.t_hyst);
fan_table.HystUp = cpu_to_be16(1);
fan_table.HystSlope = cpu_to_be16(1);
fan_table.TempRespLim = cpu_to_be16(5);
fan_table.FdoMax = cpu_to_be16((u16)duty100);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(table->entries[i].value);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(MVDD_LOW_VALUE);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
cpu_to_be16(eg_pi->mc_reg_table.mc_reg_address[j].s0);
cpu_to_be16(eg_pi->mc_reg_table.mc_reg_address[j].s1);
pi->fps_high_t = cpu_to_be16(tmp);
pi->fps_low_t = cpu_to_be16(tmp);
pi->graphics_level[index].AT = cpu_to_be16((u16)at);
pi->uvd_level[i].MinVddNb = cpu_to_be16(table->entries[i].v);
pi->vce_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
pi->samu_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
pi->acp_level[i].MinVoltage = cpu_to_be16(table->entries[i].v);
voltage->value = cpu_to_be16(table->entries[i].value);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(MVDD_LOW_VALUE);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(value);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
cpu_to_be16(ni_pi->mc_reg_table.mc_reg_address[j].s0);
cpu_to_be16(ni_pi->mc_reg_table.mc_reg_address[j].s1);
voltage->value = cpu_to_be16(MVDD_LOW_VALUE);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(vddc);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
voltage->value = cpu_to_be16(MVDD_LOW_VALUE);
voltage->value = cpu_to_be16(MVDD_HIGH_VALUE);
smc_state->levels[i].dpm2.PwrEfficiencyRatio = cpu_to_be16(pwr_efficiency_ratio);
cpu_to_be16((u16)smc_leakage);
cpu_to_be16((u16)smc_leakage);
voltage->value = cpu_to_be16(table->entries[i].value);
voltage->value = cpu_to_be16(si_pi->mvdd_voltage_table.entries[voltage->index].value);
voltage->value = cpu_to_be16(value);
cpu_to_be16(si_pi->mc_reg_table.mc_reg_address[j].s0);
cpu_to_be16(si_pi->mc_reg_table.mc_reg_address[j].s1);
fan_table.temp_min = cpu_to_be16((50 + rdev->pm.dpm.fan.t_min) / 100);
fan_table.temp_med = cpu_to_be16((50 + rdev->pm.dpm.fan.t_med) / 100);
fan_table.temp_max = cpu_to_be16((50 + rdev->pm.dpm.fan.t_max) / 100);
fan_table.slope1 = cpu_to_be16(slope1);
fan_table.slope2 = cpu_to_be16(slope2);
fan_table.fdo_min = cpu_to_be16(fdo_min);
fan_table.hys_down = cpu_to_be16(rdev->pm.dpm.fan.t_hyst);
fan_table.hys_up = cpu_to_be16(1);
fan_table.hys_slope = cpu_to_be16(1);
fan_table.temp_resp_lim = cpu_to_be16(5);
fan_table.fdo_max = cpu_to_be16((u16)duty100);