From 6420f721704daa836c261936d963cb314789c262 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Tue, 17 Jan 2017 11:01:52 +0530 Subject: 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 Reviewed-on: http://git-master/r/1286378 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') 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 { u16 *min_mhz, u16 *max_mhz); int (*get_arbiter_clk_default)(struct gk20a *g, u32 api_domain, u16 *default_mhz); + /* This function is inherently unsafe to call while + * arbiter is running arbiter must be blocked + * before calling this function */ + int (*get_current_pstate)(struct gk20a *g); } clk_arb; struct { int (*handle_pmu_perf_event)(struct gk20a *g, void *pmu_msg); -- cgit v1.2.2