diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-01-17 00:31:52 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-17 11:15:13 -0500 |
commit | 6420f721704daa836c261936d963cb314789c262 (patch) | |
tree | 4013cf11309f336c12f4a456b9a039701572b087 /drivers | |
parent | efe0758081f25b39d5bb8b097fc0ae64d0e47c3f (diff) |
gpu: nvgpu: HAL to get current pstate
- Added HAL support to get current
pstate from clk_arb
Note - This function is inherently unsafe to call while
arbiter is running arbiter must be blocked
before calling this function
JIRA DNVGPU-165
Change-Id: I4e9f5eba7739280bddd9ee661fd314288c129516
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1286378
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_arb_gp106.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 692f054f..a78ff506 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -656,6 +656,10 @@ struct gpu_ops { | |||
656 | u16 *min_mhz, u16 *max_mhz); | 656 | u16 *min_mhz, u16 *max_mhz); |
657 | int (*get_arbiter_clk_default)(struct gk20a *g, u32 api_domain, | 657 | int (*get_arbiter_clk_default)(struct gk20a *g, u32 api_domain, |
658 | u16 *default_mhz); | 658 | u16 *default_mhz); |
659 | /* This function is inherently unsafe to call while | ||
660 | * arbiter is running arbiter must be blocked | ||
661 | * before calling this function */ | ||
662 | int (*get_current_pstate)(struct gk20a *g); | ||
659 | } clk_arb; | 663 | } clk_arb; |
660 | struct { | 664 | struct { |
661 | int (*handle_pmu_perf_event)(struct gk20a *g, void *pmu_msg); | 665 | int (*handle_pmu_perf_event)(struct gk20a *g, void *pmu_msg); |
diff --git a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c index b4d1afbc..4a907521 100644 --- a/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c +++ b/drivers/gpu/nvgpu/gp106/clk_arb_gp106.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -102,4 +102,5 @@ void gp106_init_clk_arb_ops(struct gpu_ops *gops) | |||
102 | gops->clk_arb.get_arbiter_clk_domains = gp106_get_arbiter_clk_domains; | 102 | gops->clk_arb.get_arbiter_clk_domains = gp106_get_arbiter_clk_domains; |
103 | gops->clk_arb.get_arbiter_clk_range = gp106_get_arbiter_clk_range; | 103 | gops->clk_arb.get_arbiter_clk_range = gp106_get_arbiter_clk_range; |
104 | gops->clk_arb.get_arbiter_clk_default = gp106_get_arbiter_clk_default; | 104 | gops->clk_arb.get_arbiter_clk_default = gp106_get_arbiter_clk_default; |
105 | gops->clk_arb.get_current_pstate = nvgpu_clk_arb_get_current_pstate; | ||
105 | } | 106 | } |