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/gk20a/pmu_gk20a.c | |
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/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 98513511..26ce66f1 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -3548,7 +3548,7 @@ int gk20a_init_pmu_support(struct gk20a *g) | |||
3548 | if (err) | 3548 | if (err) |
3549 | return err; | 3549 | return err; |
3550 | 3550 | ||
3551 | if (support_gk20a_pmu(g->dev)) { | 3551 | if (g->support_pmu) { |
3552 | err = gk20a_init_pmu_setup_sw(g); | 3552 | err = gk20a_init_pmu_setup_sw(g); |
3553 | if (err) | 3553 | if (err) |
3554 | return err; | 3554 | return err; |
@@ -4945,7 +4945,7 @@ int gk20a_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg) | |||
4945 | if (g->ops.pmu.pmu_lpwr_enable_pg) | 4945 | if (g->ops.pmu.pmu_lpwr_enable_pg) |
4946 | status = g->ops.pmu.pmu_lpwr_enable_pg(g, | 4946 | status = g->ops.pmu.pmu_lpwr_enable_pg(g, |
4947 | true); | 4947 | true); |
4948 | } else if (support_gk20a_pmu(g->dev)) | 4948 | } else if (g->support_pmu) |
4949 | status = gk20a_pmu_enable_elpg(g); | 4949 | status = gk20a_pmu_enable_elpg(g); |
4950 | } else if (enable_pg == false) { | 4950 | } else if (enable_pg == false) { |
4951 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 4951 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
@@ -4955,7 +4955,7 @@ int gk20a_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg) | |||
4955 | if (g->ops.pmu.pmu_lpwr_disable_pg) | 4955 | if (g->ops.pmu.pmu_lpwr_disable_pg) |
4956 | status = g->ops.pmu.pmu_lpwr_disable_pg(g, | 4956 | status = g->ops.pmu.pmu_lpwr_disable_pg(g, |
4957 | true); | 4957 | true); |
4958 | } else if (support_gk20a_pmu(g->dev)) | 4958 | } else if (g->support_pmu) |
4959 | status = gk20a_pmu_disable_elpg(g); | 4959 | status = gk20a_pmu_disable_elpg(g); |
4960 | } | 4960 | } |
4961 | 4961 | ||
@@ -5008,7 +5008,7 @@ int gk20a_pmu_enable_elpg(struct gk20a *g) | |||
5008 | 5008 | ||
5009 | gk20a_dbg_fn(""); | 5009 | gk20a_dbg_fn(""); |
5010 | 5010 | ||
5011 | if (!support_gk20a_pmu(g->dev)) | 5011 | if (!g->support_pmu) |
5012 | return ret; | 5012 | return ret; |
5013 | 5013 | ||
5014 | nvgpu_mutex_acquire(&pmu->elpg_mutex); | 5014 | nvgpu_mutex_acquire(&pmu->elpg_mutex); |
@@ -5070,7 +5070,7 @@ int gk20a_pmu_disable_elpg(struct gk20a *g) | |||
5070 | if (g->ops.pmu.pmu_pg_supported_engines_list) | 5070 | if (g->ops.pmu.pmu_pg_supported_engines_list) |
5071 | pg_engine_id_list = g->ops.pmu.pmu_pg_supported_engines_list(g); | 5071 | pg_engine_id_list = g->ops.pmu.pmu_pg_supported_engines_list(g); |
5072 | 5072 | ||
5073 | if (!support_gk20a_pmu(g->dev)) | 5073 | if (!g->support_pmu) |
5074 | return ret; | 5074 | return ret; |
5075 | 5075 | ||
5076 | nvgpu_mutex_acquire(&pmu->elpg_mutex); | 5076 | nvgpu_mutex_acquire(&pmu->elpg_mutex); |
@@ -5188,7 +5188,7 @@ int gk20a_pmu_destroy(struct gk20a *g) | |||
5188 | 5188 | ||
5189 | gk20a_dbg_fn(""); | 5189 | gk20a_dbg_fn(""); |
5190 | 5190 | ||
5191 | if (!support_gk20a_pmu(g->dev)) | 5191 | if (!g->support_pmu) |
5192 | return 0; | 5192 | return 0; |
5193 | 5193 | ||
5194 | /* make sure the pending operations are finished before we continue */ | 5194 | /* make sure the pending operations are finished before we continue */ |