summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-05 22:05:45 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-24 02:35:05 -0400
commite932982853d779b62bc328eb3e9e506dad590f64 (patch)
tree4ce5ea1dbaacdf65a32817c6cc263ed6962ee719 /drivers/gpu/nvgpu/gv11b/hal_gv11b.c
parent3b7d50ee12b7ed93f908338dc321bf71023d4b49 (diff)
gpu: nvgpu: gv11b: Reorg bus HAL init
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the bus 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: I469113b204cb693a6b1cbf34a9ca53b62e34ec20 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1514661 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index 4f993494..51fe6b0a 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -35,7 +35,6 @@
35#include "gp10b/priv_ring_gp10b.h" 35#include "gp10b/priv_ring_gp10b.h"
36 36
37#include "hal_gv11b.h" 37#include "hal_gv11b.h"
38#include "bus_gv11b.h"
39#include "gr_gv11b.h" 38#include "gr_gv11b.h"
40#include "mc_gv11b.h" 39#include "mc_gv11b.h"
41#include "ltc_gv11b.h" 40#include "ltc_gv11b.h"
@@ -235,6 +234,12 @@ static const struct gpu_ops gv11b_ops = {
235 .perfbuffer_enable = gk20a_perfbuf_enable_locked, 234 .perfbuffer_enable = gk20a_perfbuf_enable_locked,
236 .perfbuffer_disable = gk20a_perfbuf_disable_locked, 235 .perfbuffer_disable = gk20a_perfbuf_disable_locked,
237 }, 236 },
237 .bus = {
238 .init_hw = gk20a_bus_init_hw,
239 .isr = gk20a_bus_isr,
240 .read_ptimer = gk20a_read_ptimer,
241 .bar1_bind = NULL,
242 },
238#if defined(CONFIG_GK20A_CYCLE_STATS) 243#if defined(CONFIG_GK20A_CYCLE_STATS)
239 .css = { 244 .css = {
240 .enable_snapshot = css_hw_enable_snapshot, 245 .enable_snapshot = css_hw_enable_snapshot,
@@ -262,6 +267,7 @@ int gv11b_init_hal(struct gk20a *g)
262 gops->mc = gv11b_ops.mc; 267 gops->mc = gv11b_ops.mc;
263 gops->debug = gv11b_ops.debug; 268 gops->debug = gv11b_ops.debug;
264 gops->dbg_session_ops = gv11b_ops.dbg_session_ops; 269 gops->dbg_session_ops = gv11b_ops.dbg_session_ops;
270 gops->bus = gv11b_ops.bus;
265#if defined(CONFIG_GK20A_CYCLE_STATS) 271#if defined(CONFIG_GK20A_CYCLE_STATS)
266 gops->css = gv11b_ops.css; 272 gops->css = gv11b_ops.css;
267#endif 273#endif
@@ -276,7 +282,6 @@ int gv11b_init_hal(struct gk20a *g)
276 gops->privsecurity = 0; 282 gops->privsecurity = 0;
277 gops->securegpccs = 0; 283 gops->securegpccs = 0;
278 284
279 gv11b_init_bus(gops);
280 gp10b_init_priv_ring(gops); 285 gp10b_init_priv_ring(gops);
281 gv11b_init_gr(gops); 286 gv11b_init_gr(gops);
282 gv11b_init_fecs_trace_ops(gops); 287 gv11b_init_fecs_trace_ops(gops);