void (*tables_init)(struct smu_context *smu, struct smu_table *tables);
int (*set_thermal_fan_table)(struct smu_context *smu);
int (*get_fan_speed_percent)(struct smu_context *smu, uint32_t *speed);
- int (*get_gpu_power)(struct smu_context *smu, uint32_t *value);
int (*set_watermarks_table)(struct smu_context *smu, void *watermarks,
struct dm_pp_wm_sets_with_clock_ranges_soc15 *clock_ranges);
int (*get_current_clk_freq_by_table)(struct smu_context *smu,
((smu)->funcs->set_fan_control_mode ? (smu)->funcs->set_fan_control_mode((smu), (value)) : 0)
#define smu_get_fan_speed_percent(smu, speed) \
((smu)->ppt_funcs->get_fan_speed_percent ? (smu)->ppt_funcs->get_fan_speed_percent((smu), (speed)) : 0)
-#define smu_get_gpu_power(smu, val) \
- ((smu)->ppt_funcs->get_gpu_power ? (smu)->ppt_funcs->get_gpu_power((smu), (val)) : 0)
#define smu_set_fan_speed_percent(smu, speed) \
((smu)->funcs->set_fan_speed_percent ? (smu)->funcs->set_fan_speed_percent((smu), (speed)) : 0)
ret = navi10_get_current_activity_percent(smu, (uint32_t *)data);
*size = 4;
break;
+ case AMDGPU_PP_SENSOR_GPU_POWER:
+ ret = navi10_get_gpu_power(smu, (uint32_t *)data);
+ *size = 4;
+ break;
default:
return -EINVAL;
}
.notify_smc_dispaly_config = navi10_notify_smc_dispaly_config,
.force_dpm_limit_value = navi10_force_dpm_limit_value,
.unforce_dpm_levels = navi10_unforce_dpm_levels,
- .get_gpu_power = navi10_get_gpu_power,
.is_dpm_running = navi10_is_dpm_running,
.set_thermal_fan_table = navi10_set_thermal_fan_table,
.get_fan_speed_percent = navi10_get_fan_speed_percent,
ret = smu_v11_0_thermal_get_temperature(smu, sensor, (uint32_t *)data);
*size = 4;
break;
- case AMDGPU_PP_SENSOR_GPU_POWER:
- ret = smu_get_gpu_power(smu, (uint32_t *)data);
- *size = 4;
- break;
case AMDGPU_PP_SENSOR_VDDGFX:
ret = smu_v11_0_get_gfx_vdd(smu, (uint32_t *)data);
*size = 4;
(uint32_t *)data);
*size = 4;
break;
+ case AMDGPU_PP_SENSOR_GPU_POWER:
+ ret = vega20_get_gpu_power(smu, (uint32_t *)data);
+ *size = 4;
+ break;
default:
return -EINVAL;
}
.is_dpm_running = vega20_is_dpm_running,
.set_thermal_fan_table = vega20_set_thermal_fan_table,
.get_fan_speed_percent = vega20_get_fan_speed_percent,
- .get_gpu_power = vega20_get_gpu_power,
.set_watermarks_table = vega20_set_watermarks_table,
};