summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/hal_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index 361a7b0f..c919143c 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -17,6 +17,7 @@
17#include "gk20a/fifo_gk20a.h" 17#include "gk20a/fifo_gk20a.h"
18#include "gk20a/ctxsw_trace_gk20a.h" 18#include "gk20a/ctxsw_trace_gk20a.h"
19#include "gk20a/fecs_trace_gk20a.h" 19#include "gk20a/fecs_trace_gk20a.h"
20#include "gk20a/mm_gk20a.h"
20#include "gk20a/dbg_gpu_gk20a.h" 21#include "gk20a/dbg_gpu_gk20a.h"
21#include "gk20a/css_gr_gk20a.h" 22#include "gk20a/css_gr_gk20a.h"
22#include "gk20a/bus_gk20a.h" 23#include "gk20a/bus_gk20a.h"
@@ -44,6 +45,7 @@
44#include "gm20b/ltc_gm20b.h" 45#include "gm20b/ltc_gm20b.h"
45#include "gm20b/gr_gm20b.h" 46#include "gm20b/gr_gm20b.h"
46#include "gm20b/fifo_gm20b.h" 47#include "gm20b/fifo_gm20b.h"
48#include "gm20b/mm_gm20b.h"
47#include "gm20b/pmu_gm20b.h" 49#include "gm20b/pmu_gm20b.h"
48#include "gm20b/fb_gm20b.h" 50#include "gm20b/fb_gm20b.h"
49 51
@@ -65,6 +67,8 @@
65 67
66#include "hal_gp106.h" 68#include "hal_gp106.h"
67 69
70#include "common/linux/platform_gk20a_tegra.h"
71
68#include <nvgpu/debug.h> 72#include <nvgpu/debug.h>
69#include <nvgpu/bug.h> 73#include <nvgpu/bug.h>
70#include <nvgpu/bus.h> 74#include <nvgpu/bus.h>
@@ -356,6 +360,31 @@ static const struct gpu_ops gp106_ops = {
356 .max_entries = gk20a_gr_max_entries, 360 .max_entries = gk20a_gr_max_entries,
357 }, 361 },
358#endif /* CONFIG_GK20A_CTXSW_TRACE */ 362#endif /* CONFIG_GK20A_CTXSW_TRACE */
363 .mm = {
364 .support_sparse = gm20b_mm_support_sparse,
365 .gmmu_map = gk20a_locked_gmmu_map,
366 .gmmu_unmap = gk20a_locked_gmmu_unmap,
367 .vm_bind_channel = gk20a_vm_bind_channel,
368 .fb_flush = gk20a_mm_fb_flush,
369 .l2_invalidate = gk20a_mm_l2_invalidate,
370 .l2_flush = gk20a_mm_l2_flush,
371 .cbc_clean = gk20a_mm_cbc_clean,
372 .set_big_page_size = gm20b_mm_set_big_page_size,
373 .get_big_page_sizes = gm20b_mm_get_big_page_sizes,
374 .get_default_big_page_size = gp10b_mm_get_default_big_page_size,
375 .gpu_phys_addr = gm20b_gpu_phys_addr,
376 .get_physical_addr_bits = NULL,
377 .get_mmu_levels = gp10b_mm_get_mmu_levels,
378 .init_pdb = gp10b_mm_init_pdb,
379 .init_mm_setup_hw = gp10b_init_mm_setup_hw,
380 .is_bar1_supported = gm20b_mm_is_bar1_supported,
381 .init_inst_block = gk20a_init_inst_block,
382 .mmu_fault_pending = gk20a_fifo_mmu_fault_pending,
383 .init_bar2_vm = gb10b_init_bar2_vm,
384 .init_bar2_mm_hw_setup = gb10b_init_bar2_mm_hw_setup,
385 .remove_bar2_vm = gp10b_remove_bar2_vm,
386 .get_vidmem_size = gp106_mm_get_vidmem_size,
387 },
359 .pramin = { 388 .pramin = {
360 .enter = gk20a_pramin_enter, 389 .enter = gk20a_pramin_enter,
361 .exit = gk20a_pramin_exit, 390 .exit = gk20a_pramin_exit,
@@ -502,6 +531,7 @@ int gp106_init_hal(struct gk20a *g)
502 gops->fifo = gp106_ops.fifo; 531 gops->fifo = gp106_ops.fifo;
503 gops->gr_ctx = gp106_ops.gr_ctx; 532 gops->gr_ctx = gp106_ops.gr_ctx;
504 gops->fecs_trace = gp106_ops.fecs_trace; 533 gops->fecs_trace = gp106_ops.fecs_trace;
534 gops->mm = gp106_ops.mm;
505 gops->pramin = gp106_ops.pramin; 535 gops->pramin = gp106_ops.pramin;
506 gops->therm = gp106_ops.therm; 536 gops->therm = gp106_ops.therm;
507 /* 537 /*
@@ -543,7 +573,6 @@ int gp106_init_hal(struct gk20a *g)
543 573
544 g->bootstrap_owner = LSF_FALCON_ID_SEC2; 574 g->bootstrap_owner = LSF_FALCON_ID_SEC2;
545 gp106_init_gr(g); 575 gp106_init_gr(g);
546 gp106_init_mm(gops);
547 gp106_init_pmu_ops(g); 576 gp106_init_pmu_ops(g);
548 577
549 gp10b_init_uncompressed_kind_map(); 578 gp10b_init_uncompressed_kind_map();