From bdee5d7a64696a3ee955b68a107ce37bc3d703d5 Mon Sep 17 00:00:00 2001 From: rmylavarapu Date: Fri, 20 Sep 2019 17:13:03 +0530 Subject: [PATCH] nvgpu: gpu: Add boot pstate index in Pstate boardobj In the change_seq of latest ucode, the boot pstate index was taken from pstate board_objs instead of the value from change_input. This forces the need of introducing boot index in pstate board_obj structure. The index is the performance table entry index of P0 pstate. The ucode change is described in P4CL #27304645 NVGPU-4081 Change-Id: Id3f4a1da7015cd6b7efe555529f1fa13c9f3b391 Signed-off-by: rmylavarapu Reviewed-on: https://git-master.nvidia.com/r/2202363 Reviewed-by: svc-mobile-coverity Reviewed-by: Mahantesh Kumbar Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/pmu/perf/perf_pstate.c | 2 ++ drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/perfpstate.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/nvgpu/common/pmu/perf/perf_pstate.c b/drivers/gpu/nvgpu/common/pmu/perf/perf_pstate.c index 666b50bcb..c90e8e2cc 100644 --- a/drivers/gpu/nvgpu/common/pmu/perf/perf_pstate.c +++ b/drivers/gpu/nvgpu/common/pmu/perf/perf_pstate.c @@ -339,6 +339,8 @@ static int perf_pstate_pmudatainit(struct gk20a *g, } pset->numClkDomains = pprogs->num_clk_domains; + pset->boot_pstate_idx = + nvgpu_get_pstate_entry_idx(g, CTRL_PERF_PSTATE_P0); done: return status; diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/perfpstate.h b/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/perfpstate.h index a0cef029a..311921863 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/perfpstate.h +++ b/drivers/gpu/nvgpu/include/nvgpu/pmu/pmuif/perfpstate.h @@ -34,6 +34,7 @@ struct ctrl_perf_pstate_clk_entry; struct nv_pmu_perf_pstate_boardobjgrp_set_header { struct nv_pmu_boardobjgrp_e32 super; u8 numClkDomains; + u8 boot_pstate_idx; }; struct nv_pmu_perf_pstate {