summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c12
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.h3
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c7
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c
index 6cb42baa..920e4c16 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c
@@ -2,7 +2,7 @@
2 * 2 *
3 * GV11B Graphics Context 3 * GV11B Graphics Context
4 * 4 *
5 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 5 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License, 8 * under the terms and conditions of the GNU General Public License,
@@ -22,7 +22,7 @@
22 22
23#include "gr_ctx_gv11b.h" 23#include "gr_ctx_gv11b.h"
24 24
25static int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name) 25int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name)
26{ 26{
27 switch (index) { 27 switch (index) {
28#ifdef GV11B_NETLIST_IMAGE_FW_NAME 28#ifdef GV11B_NETLIST_IMAGE_FW_NAME
@@ -57,7 +57,7 @@ static int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name)
57 return -1; 57 return -1;
58} 58}
59 59
60static bool gr_gv11b_is_firmware_defined(void) 60bool gr_gv11b_is_firmware_defined(void)
61{ 61{
62#ifdef GV11B_NETLIST_IMAGE_FW_NAME 62#ifdef GV11B_NETLIST_IMAGE_FW_NAME
63 return true; 63 return true;
@@ -65,9 +65,3 @@ static bool gr_gv11b_is_firmware_defined(void)
65 return false; 65 return false;
66#endif 66#endif
67} 67}
68
69void gv11b_init_gr_ctx(struct gpu_ops *gops) {
70 gops->gr_ctx.get_netlist_name = gr_gv11b_get_netlist_name;
71 gops->gr_ctx.is_fw_defined = gr_gv11b_is_firmware_defined;
72 gops->gr_ctx.use_dma_for_fw_bootstrap = false;
73}
diff --git a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.h
index 0a046eb4..8feb15fd 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.h
@@ -25,6 +25,7 @@
25 * Define netlist for silicon only 25 * Define netlist for silicon only
26 * #define GV11B_NETLIST_IMAGE_FW_NAME GK20A_NETLIST_IMAGE_A 26 * #define GV11B_NETLIST_IMAGE_FW_NAME GK20A_NETLIST_IMAGE_A
27*/ 27*/
28void gv11b_init_gr_ctx(struct gpu_ops *gops); 28int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name);
29bool gr_gv11b_is_firmware_defined(void);
29 30
30#endif /*__GR_CTX_GV11B_H__*/ 31#endif /*__GR_CTX_GV11B_H__*/
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index e585e9b1..f5191da7 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -282,6 +282,10 @@ static const struct gpu_ops gv11b_ops = {
282 .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, 282 .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg,
283 .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, 283 .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout,
284 }, 284 },
285 .gr_ctx = {
286 .get_netlist_name = gr_gv11b_get_netlist_name,
287 .is_fw_defined = gr_gv11b_is_firmware_defined,
288 },
285 .mc = { 289 .mc = {
286 .intr_enable = mc_gv11b_intr_enable, 290 .intr_enable = mc_gv11b_intr_enable,
287 .intr_unit_config = mc_gp10b_intr_unit_config, 291 .intr_unit_config = mc_gp10b_intr_unit_config,
@@ -349,6 +353,7 @@ int gv11b_init_hal(struct gk20a *g)
349 gops->ce2 = gv11b_ops.ce2; 353 gops->ce2 = gv11b_ops.ce2;
350 gops->clock_gating = gv11b_ops.clock_gating; 354 gops->clock_gating = gv11b_ops.clock_gating;
351 gops->fifo = gv11b_ops.fifo; 355 gops->fifo = gv11b_ops.fifo;
356 gops->gr_ctx = gv11b_ops.gr_ctx;
352 gops->mc = gv11b_ops.mc; 357 gops->mc = gv11b_ops.mc;
353 gops->debug = gv11b_ops.debug; 358 gops->debug = gv11b_ops.debug;
354 gops->dbg_session_ops = gv11b_ops.dbg_session_ops; 359 gops->dbg_session_ops = gv11b_ops.dbg_session_ops;
@@ -365,13 +370,13 @@ int gv11b_init_hal(struct gk20a *g)
365 gops->get_litter_value = gv11b_ops.get_litter_value; 370 gops->get_litter_value = gv11b_ops.get_litter_value;
366 371
367 /* boot in non-secure modes for time beeing */ 372 /* boot in non-secure modes for time beeing */
373 __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, false);
368 __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, false); 374 __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, false);
369 __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); 375 __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false);
370 376
371 gv11b_init_gr(g); 377 gv11b_init_gr(g);
372 gv11b_init_fecs_trace_ops(gops); 378 gv11b_init_fecs_trace_ops(gops);
373 gv11b_init_fb(gops); 379 gv11b_init_fb(gops);
374 gv11b_init_gr_ctx(gops);
375 gv11b_init_mm(gops); 380 gv11b_init_mm(gops);
376 gv11b_init_pmu_ops(g); 381 gv11b_init_pmu_ops(g);
377 gv11b_init_regops(gops); 382 gv11b_init_regops(gops);