Closed andyzhanged closed 2 weeks ago
Looks like powerplay is not enabled on your GPU. Can you post a full dmesg log?
powerplay is enabled. Other powerplay related sysfs power_dpm_force_performance_level,pp_power_profile_mode, pp_dpm_dcefclk works well. The pp_dpm_get_pp_num_states will return at line "if (!hwmgr || !hwmgr->pm_en ||!hwmgr->ps)" .
static int pp_dpm_get_pp_num_states(void *handle,
struct pp_states_info *data)
{
struct pp_hwmgr *hwmgr = handle;
int i;
memset(data, 0, sizeof(*data));
if (!hwmgr || !hwmgr->pm_en ||!hwmgr->ps)
return -EINVAL;
mutex_lock(&hwmgr->smu_lock);
data->nums = hwmgr->num_ps;
The reason it that api psm_init_power_state_table will return cause hwmgr->hwmgr_func->get_num_of_pp_table_entries == NULL. So some member of hwmgr is not initialized.
int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
{
int result;
unsigned int i;
unsigned int table_entries;
struct pp_power_state *state;
int size;
if (hwmgr->hwmgr_func->get_num_of_pp_table_entries == NULL)
return 0;
if (hwmgr->hwmgr_func->get_power_state_size == NULL)
return 0;
hwmgr->num_ps = table_entries = hwmgr->hwmgr_func->get_num_of_pp_table_entries(hwmgr);
hwmgr->ps_size = size = hwmgr->hwmgr_func->get_power_state_size(hwmgr) +
sizeof(struct pp_power_state);
So maybe i guess vage20 is not support by now.
@andyzhanged Apologies for the lack of response. Can you please check if your issue still exist with the latest ROCm 6.2? If not, please close the ticket. Thanks!
@andyzhanged Closing ticket. Please feel free to re-open issue if you still encounter the issue with the latest ROCm. Thanks!
hi,my gpu card is vega20 and my machine info as following
When i try to set pp_state by sysfs pp_force_state, i find it do not work. I debug the code, find amdgpu_dpm_get_pp_num_states(adev, &data) return -22(maybe my card not support), but the code still go on instead of return before. so i think we should return there and report fail to user.