Commit eef2d67e authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: expose Vega12 current gpu activity

Provide the real sensor information for current gpu activity.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c59a722c
...@@ -1310,23 +1310,14 @@ static int vega12_get_current_activity_percent( ...@@ -1310,23 +1310,14 @@ static int vega12_get_current_activity_percent(
struct pp_hwmgr *hwmgr, struct pp_hwmgr *hwmgr,
uint32_t *activity_percent) uint32_t *activity_percent)
{ {
SmuMetrics_t metrics_table;
int ret = 0; int ret = 0;
uint32_t current_activity = 50;
#if 0 ret = vega12_get_metrics_table(hwmgr, &metrics_table);
ret = smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_GetAverageGfxActivity, 0); if (ret)
if (!ret) { return ret;
current_activity = smum_get_argument(hwmgr);
if (current_activity > 100) { *activity_percent = metrics_table.AverageGfxActivity;
PP_ASSERT(false,
"[GetCurrentActivityPercent] Activity Percentage Exceeds 100!");
current_activity = 100;
}
} else
PP_ASSERT(false,
"[GetCurrentActivityPercent] Attempt To Send Get Average Graphics Activity to SMU Failed!");
#endif
*activity_percent = current_activity;
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment