diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/pmu_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/pmu_gp106.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/pmu_gp106.c b/drivers/gpu/nvgpu/gp106/pmu_gp106.c index f294b1e0..8d552a5b 100644 --- a/drivers/gpu/nvgpu/gp106/pmu_gp106.c +++ b/drivers/gpu/nvgpu/gp106/pmu_gp106.c | |||
@@ -279,6 +279,26 @@ static void gp106_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, | |||
279 | pg_stat_data->avg_exit_latency_us = stats.exit_latency_avg_us; | 279 | pg_stat_data->avg_exit_latency_us = stats.exit_latency_avg_us; |
280 | } | 280 | } |
281 | 281 | ||
282 | static bool gp106_pmu_is_lpwr_feature_supported(struct gk20a *g, u32 feature_id) | ||
283 | { | ||
284 | bool is_feature_supported = false; | ||
285 | |||
286 | switch (feature_id) { | ||
287 | case PMU_PG_LPWR_FEATURE_RPPG: | ||
288 | is_feature_supported = nvgpu_lpwr_is_rppg_supported(g, | ||
289 | nvgpu_clk_arb_get_current_pstate(g)); | ||
290 | break; | ||
291 | case PMU_PG_LPWR_FEATURE_MSCG: | ||
292 | is_feature_supported = nvgpu_lpwr_is_mscg_supported(g, | ||
293 | nvgpu_clk_arb_get_current_pstate(g)); | ||
294 | break; | ||
295 | default: | ||
296 | is_feature_supported = false; | ||
297 | } | ||
298 | |||
299 | return is_feature_supported; | ||
300 | } | ||
301 | |||
282 | void gp106_init_pmu_ops(struct gpu_ops *gops) | 302 | void gp106_init_pmu_ops(struct gpu_ops *gops) |
283 | { | 303 | { |
284 | gk20a_dbg_fn(""); | 304 | gk20a_dbg_fn(""); |
@@ -304,6 +324,8 @@ void gp106_init_pmu_ops(struct gpu_ops *gops) | |||
304 | gops->pmu.pmu_pg_init_param = gp106_pg_param_init; | 324 | gops->pmu.pmu_pg_init_param = gp106_pg_param_init; |
305 | gops->pmu.pmu_pg_supported_engines_list = gp106_pmu_pg_engines_list; | 325 | gops->pmu.pmu_pg_supported_engines_list = gp106_pmu_pg_engines_list; |
306 | gops->pmu.pmu_pg_engines_feature_list = gp106_pmu_pg_feature_list; | 326 | gops->pmu.pmu_pg_engines_feature_list = gp106_pmu_pg_feature_list; |
327 | gops->pmu.pmu_is_lpwr_feature_supported = | ||
328 | gp106_pmu_is_lpwr_feature_supported; | ||
307 | gops->pmu.pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg; | 329 | gops->pmu.pmu_lpwr_enable_pg = nvgpu_lpwr_enable_pg; |
308 | gops->pmu.pmu_lpwr_disable_pg = nvgpu_lpwr_disable_pg; | 330 | gops->pmu.pmu_lpwr_disable_pg = nvgpu_lpwr_disable_pg; |
309 | gops->pmu.pmu_pg_param_post_init = nvgpu_lpwr_post_init; | 331 | gops->pmu.pmu_pg_param_post_init = nvgpu_lpwr_post_init; |