From 182760476dbd1415ef9a6c0c33dba0adc4dde1ef Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 12 Mar 2018 15:44:12 -0700 Subject: gpu: nvgpu: De-linuxify pmgr code The pmgr code is in theory common code. However there were uses of Linux stuff within this code. This patch cleans that up by deleting the unnecessary os_linux.h includes, usage of kfree() and adds several platform fields to the gk20a struct. The platform data is copied to the gk20a struct in the platform initialization code so that this common code can access said data without requiring any knowledge of the OS platform data. JIRA NVGPU-525 Change-Id: Ic4bb6021f60b0a0778779ab5f3e15b7e5ca98306 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1673825 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/pmgr/pwrpolicy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/pmgr/pwrpolicy.c') diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c index 420eda4f..2942268f 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.c +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.c @@ -28,8 +28,6 @@ #include "boardobj/boardobjgrp.h" #include "boardobj/boardobjgrp_e32.h" #include "gp106/bios_gp106.h" -#include "common/linux/os_linux.h" -#include "common/linux/platform_gk20a.h" #define _pwr_policy_limitarboutputget_helper(p_limit_arb) (p_limit_arb)->output #define _pwr_policy_limitdeltaapply(limit, delta) ((u32)max(((s32)limit) + (delta), 0)) @@ -517,7 +515,6 @@ static inline void devinit_unpack_pwr_policy_entry( static u32 devinit_get_pwr_policy_table(struct gk20a *g, struct pmgr_pwr_policy *ppwrpolicyobjs) { - struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); u32 status = 0; u8 *ptr = NULL; struct boardobj *boardobj; @@ -690,7 +687,7 @@ static u32 devinit_get_pwr_policy_table(struct gk20a *g, ++obj_index; } - if (platform->hardcode_sw_threshold) { + if (g->hardcode_sw_threshold) { status = _pwr_policy_construct_WAR_SW_Threshold_policy(g, ppwrpolicyobjs, &pwr_policy_data, -- cgit v1.2.2