From a30924340f879db1f2857e066b919eeecf03c693 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 15:54:49 -0700 Subject: gpu: nvgpu: Add new flag support_pmu to gk20a Add new flag support_pmu to struct gk20a at probe time, and access it from gk20a instead of support_gk20a_pmu() which depends on struct device *. JIRA NVGPU-16 Change-Id: I721f1a532e949c98346086abdc2630a8df6eba7b Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1463546 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/lpwr/lpwr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/lpwr') diff --git a/drivers/gpu/nvgpu/lpwr/lpwr.c b/drivers/gpu/nvgpu/lpwr/lpwr.c index 9ff7c2a7..1f15d512 100644 --- a/drivers/gpu/nvgpu/lpwr/lpwr.c +++ b/drivers/gpu/nvgpu/lpwr/lpwr.c @@ -363,7 +363,7 @@ int nvgpu_lpwr_enable_pg(struct gk20a *g, bool pstate_lock) is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, present_pstate); if (is_rppg_supported) { - if (support_gk20a_pmu(g->dev) && g->elpg_enabled) + if (g->support_pmu && g->elpg_enabled) status = gk20a_pmu_enable_elpg(g); } @@ -393,7 +393,7 @@ int nvgpu_lpwr_disable_pg(struct gk20a *g, bool pstate_lock) is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, present_pstate); if (is_rppg_supported) { - if (support_gk20a_pmu(g->dev) && g->elpg_enabled) { + if (g->support_pmu && g->elpg_enabled) { status = gk20a_pmu_disable_elpg(g); if (status) goto exit_unlock; -- cgit v1.2.2