diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-14 18:54:49 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-02 06:06:08 -0400 |
commit | a30924340f879db1f2857e066b919eeecf03c693 (patch) | |
tree | fe92f504d70854ab81819c7ab7d2a54c2d676836 /drivers/gpu/nvgpu/lpwr | |
parent | 4d1237f132163cb0a397a5407570377e77d70b1b (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1463546
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/lpwr')
-rw-r--r-- | drivers/gpu/nvgpu/lpwr/lpwr.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
363 | is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, | 363 | is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, |
364 | present_pstate); | 364 | present_pstate); |
365 | if (is_rppg_supported) { | 365 | if (is_rppg_supported) { |
366 | if (support_gk20a_pmu(g->dev) && g->elpg_enabled) | 366 | if (g->support_pmu && g->elpg_enabled) |
367 | status = gk20a_pmu_enable_elpg(g); | 367 | status = gk20a_pmu_enable_elpg(g); |
368 | } | 368 | } |
369 | 369 | ||
@@ -393,7 +393,7 @@ int nvgpu_lpwr_disable_pg(struct gk20a *g, bool pstate_lock) | |||
393 | is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, | 393 | is_rppg_supported = nvgpu_lpwr_is_rppg_supported(g, |
394 | present_pstate); | 394 | present_pstate); |
395 | if (is_rppg_supported) { | 395 | if (is_rppg_supported) { |
396 | if (support_gk20a_pmu(g->dev) && g->elpg_enabled) { | 396 | if (g->support_pmu && g->elpg_enabled) { |
397 | status = gk20a_pmu_disable_elpg(g); | 397 | status = gk20a_pmu_disable_elpg(g); |
398 | if (status) | 398 | if (status) |
399 | goto exit_unlock; | 399 | goto exit_unlock; |