summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pstate
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-02-09 11:17:47 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-02-17 16:46:32 -0500
commit53465def649b813987ca0d4a7ced744305204b82 (patch)
treecdff16681cb0442de3b1a8bd151b2a38c0bc5311 /drivers/gpu/nvgpu/pstate
parent29a79e6b80c6a0da489d8b0a470c86e2fec9c355 (diff)
gpu: nvgpu: Generalize BIOS code
Most of BIOS parsing code is not specific to any particular GPU. Move most of the code to generic files, and leave only chip specific parts dealing with microcontroller boot into chip specific files. As most of the parsing is generic, they do not need to be called via HALs so remove the HALs and change the calls into direct function calls. All definitions meant to be used outside BIOS code itself are now in <nvgpu/bios.h> Change-Id: Id48e94c74511d6e95645e90e5bba5c12ef8da45d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1302222 GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/pstate')
-rw-r--r--drivers/gpu/nvgpu/pstate/pstate.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/pstate/pstate.c b/drivers/gpu/nvgpu/pstate/pstate.c
index 82e809bb..feb8cca8 100644
--- a/drivers/gpu/nvgpu/pstate/pstate.c
+++ b/drivers/gpu/nvgpu/pstate/pstate.c
@@ -13,11 +13,12 @@
13 * more details. 13 * more details.
14 */ 14 */
15 15
16#include <nvgpu/bios.h>
17
16#include "gk20a/gk20a.h" 18#include "gk20a/gk20a.h"
17#include "clk/clk.h" 19#include "clk/clk.h"
18#include "perf/perf.h" 20#include "perf/perf.h"
19#include "pmgr/pmgr.h" 21#include "pmgr/pmgr.h"
20#include "include/bios.h"
21#include "pstate/pstate.h" 22#include "pstate/pstate.h"
22#include "therm/thrm.h" 23#include "therm/thrm.h"
23 24
@@ -342,11 +343,9 @@ static int pstate_sw_setup(struct gk20a *g)
342 goto done; 343 goto done;
343 } 344 }
344 345
345 if (g->ops.bios.get_perf_table_ptrs) { 346 hdr = (struct vbios_pstate_header_5x *)
346 hdr = (struct vbios_pstate_header_5x *) 347 nvgpu_bios_get_perf_table_ptrs(g,
347 g->ops.bios.get_perf_table_ptrs(g, 348 g->bios.perf_token, PERFORMANCE_TABLE);
348 g->bios.perf_token, PERFORMANCE_TABLE);
349 }
350 349
351 if (!hdr) { 350 if (!hdr) {
352 gk20a_err(dev_from_gk20a(g), 351 gk20a_err(dev_from_gk20a(g),