From c84ddceda648d6e47828115654ca7745010ec09f Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Thu, 14 Apr 2016 13:01:58 -0700 Subject: gpu: nvgpu: gv11b: sm priv reg related changes Included all basic ops for gv11b and updated sm related functions to include new priv register addresses. Bug 1735757 Change-Id: Ie48651f918ee97fba00487111e4b28d6c95747f5 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/1126961 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/therm_gv11b.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 drivers/gpu/nvgpu/gv11b/therm_gv11b.c (limited to 'drivers/gpu/nvgpu/gv11b/therm_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c new file mode 100644 index 00000000..69d2a1fe --- /dev/null +++ b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c @@ -0,0 +1,25 @@ +/* + * + * GV11B Therm + * + * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#include "gk20a/gk20a.h" +#include "gp10b/therm_gp10b.h" +#include "hw_therm_gv11b.h" +#include "therm_gv11b.h" + +void gv11b_init_therm_ops(struct gpu_ops *gops) +{ + gp10b_init_therm_ops(gops); +} -- cgit v1.2.2 From 4b09997772f406d16945016ff4581c7c992faeab Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 12 Jan 2017 13:01:36 -0800 Subject: nvgpu: gpu: HW header update for Volta Similar HW header update as has been done for all the other chips. HW header files are located under: drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/ And can be included like so: #include Bug 1799159 Change-Id: If39bd71480a34f85bf25f4c36aec0f8f6de4dc9f Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1284433 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/therm_gv11b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/therm_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c index 69d2a1fe..89520ead 100644 --- a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c @@ -1,8 +1,7 @@ /* - * * GV11B Therm * - * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -15,8 +14,9 @@ */ #include "gk20a/gk20a.h" + #include "gp10b/therm_gp10b.h" -#include "hw_therm_gv11b.h" + #include "therm_gv11b.h" void gv11b_init_therm_ops(struct gpu_ops *gops) -- cgit v1.2.2 From f457e808f0d1097cec02a022eb42c77a075ef881 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 26 Jul 2017 18:09:07 -0700 Subject: gpu: nvgpu: gv11b: Reorg therm HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the therm sub-module of the gpu_ops struct. Perform HAL function assignments in hal_gxxxx.c through the population of a chip-specific copy of gpu_ops. Jira NVGPU-74 Change-Id: Ic297792c4d47ffbe64cc0bd95a659a6b7f383743 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1527423 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/therm_gv11b.c | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 drivers/gpu/nvgpu/gv11b/therm_gv11b.c (limited to 'drivers/gpu/nvgpu/gv11b/therm_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c deleted file mode 100644 index 89520ead..00000000 --- a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * GV11B Therm - * - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - */ - -#include "gk20a/gk20a.h" - -#include "gp10b/therm_gp10b.h" - -#include "therm_gv11b.h" - -void gv11b_init_therm_ops(struct gpu_ops *gops) -{ - gp10b_init_therm_ops(gops); -} -- cgit v1.2.2 From f63f96866dd3cd696e37cf7e83d419cca4f965fa Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 28 Sep 2017 16:57:16 -0700 Subject: gpu: nvgpu: gv11b: init therm regs for pwr/clk init *eng_delay*, *eng_idle_filt*, *fecs_idle_filter* and *hubmmu_idle_filter* in therm regs. Change-Id: I4ab5374084e993cd96ef28ace87b6013b996178d Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1570556 Reviewed-by: Terje Bergstrom Reviewed-by: Seshendra Gadagottu Reviewed-by: svc-mobile-coverity Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gv11b/therm_gv11b.c | 75 +++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 drivers/gpu/nvgpu/gv11b/therm_gv11b.c (limited to 'drivers/gpu/nvgpu/gv11b/therm_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c new file mode 100644 index 00000000..18987119 --- /dev/null +++ b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c @@ -0,0 +1,75 @@ +/* + * GV11B Therm + * + * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include "gk20a/gk20a.h" + +#include + +#include + +int gv11b_elcg_init_idle_filters(struct gk20a *g) +{ + u32 gate_ctrl, idle_filter; + u32 engine_id; + u32 active_engine_id = 0; + struct fifo_gk20a *f = &g->fifo; + + if (nvgpu_platform_is_simulation(g)) + return 0; + + gk20a_dbg_info("init clock/power gate reg"); + + for (engine_id = 0; engine_id < f->num_engines; engine_id++) { + active_engine_id = f->active_engines_list[engine_id]; + + gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(active_engine_id)); + gate_ctrl = set_field(gate_ctrl, + therm_gate_ctrl_eng_idle_filt_exp_m(), + therm_gate_ctrl_eng_idle_filt_exp__prod_f()); + gate_ctrl = set_field(gate_ctrl, + therm_gate_ctrl_eng_idle_filt_mant_m(), + therm_gate_ctrl_eng_idle_filt_mant__prod_f()); + gate_ctrl = set_field(gate_ctrl, + therm_gate_ctrl_eng_delay_before_m(), + therm_gate_ctrl_eng_delay_before__prod_f()); + gate_ctrl = set_field(gate_ctrl, + therm_gate_ctrl_eng_delay_after_m(), + therm_gate_ctrl_eng_delay_after__prod_f()); + gk20a_writel(g, therm_gate_ctrl_r(active_engine_id), gate_ctrl); + } + + idle_filter = gk20a_readl(g, therm_fecs_idle_filter_r()); + idle_filter = set_field(idle_filter, + therm_fecs_idle_filter_value_m(), + therm_fecs_idle_filter_value__prod_f()); + gk20a_writel(g, therm_fecs_idle_filter_r(), idle_filter); + + idle_filter = gk20a_readl(g, therm_hubmmu_idle_filter_r()); + idle_filter = set_field(idle_filter, + therm_hubmmu_idle_filter_value_m(), + therm_hubmmu_idle_filter_value__prod_f()); + gk20a_writel(g, therm_hubmmu_idle_filter_r(), idle_filter); + + return 0; +} -- cgit v1.2.2