summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gk20a.c18
-rw-r--r--drivers/gpu/nvgpu/common/bus/bus_gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c3
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c3
5 files changed, 6 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gk20a.c b/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
index 532fc9c6..d4ef41c1 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
+++ b/drivers/gpu/nvgpu/common/bus/bus_gk20a.c
@@ -59,24 +59,6 @@ void gk20a_bus_isr(struct gk20a *g)
59 gk20a_writel(g, bus_intr_0_r(), val); 59 gk20a_writel(g, bus_intr_0_r(), val);
60} 60}
61 61
62int gk20a_bus_bar1_bind(struct gk20a *g, struct nvgpu_mem *bar1_inst)
63{
64 u64 iova = nvgpu_inst_block_addr(g, bar1_inst);
65 u32 ptr_v = (u32)(iova >> bus_bar1_block_ptr_shift_v());
66
67 nvgpu_log(g, gpu_dbg_info, "bar1 inst block ptr: 0x%08x", ptr_v);
68
69 gk20a_writel(g, bus_bar1_block_r(),
70 nvgpu_aperture_mask(g, bar1_inst,
71 bus_bar1_block_target_sys_mem_ncoh_f(),
72 bus_bar1_block_target_sys_mem_coh_f(),
73 bus_bar1_block_target_vid_mem_f()) |
74 bus_bar1_block_mode_virtual_f() |
75 bus_bar1_block_ptr_f(ptr_v));
76
77 return 0;
78}
79
80u32 gk20a_bus_set_bar0_window(struct gk20a *g, struct nvgpu_mem *mem, 62u32 gk20a_bus_set_bar0_window(struct gk20a *g, struct nvgpu_mem *mem,
81 struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl, u32 w) 63 struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl, u32 w)
82{ 64{
diff --git a/drivers/gpu/nvgpu/common/bus/bus_gk20a.h b/drivers/gpu/nvgpu/common/bus/bus_gk20a.h
index 541472cd..4c7e62d9 100644
--- a/drivers/gpu/nvgpu/common/bus/bus_gk20a.h
+++ b/drivers/gpu/nvgpu/common/bus/bus_gk20a.h
@@ -31,7 +31,6 @@ struct nvgpu_sgl;
31 31
32void gk20a_bus_isr(struct gk20a *g); 32void gk20a_bus_isr(struct gk20a *g);
33void gk20a_bus_init_hw(struct gk20a *g); 33void gk20a_bus_init_hw(struct gk20a *g);
34int gk20a_bus_bar1_bind(struct gk20a *g, struct nvgpu_mem *bar1_inst);
35u32 gk20a_bus_set_bar0_window(struct gk20a *g, struct nvgpu_mem *mem, 34u32 gk20a_bus_set_bar0_window(struct gk20a *g, struct nvgpu_mem *mem,
36 struct nvgpu_sgt *sgt, 35 struct nvgpu_sgt *sgt,
37 struct nvgpu_sgl *sgl, 36 struct nvgpu_sgl *sgl,
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index 33e69d4e..eec0f917 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -25,6 +25,7 @@
25#include "common/bus/bus_gk20a.h" 25#include "common/bus/bus_gk20a.h"
26#include "common/clock_gating/gp106_gating_reglist.h" 26#include "common/clock_gating/gp106_gating_reglist.h"
27#include "common/ptimer/ptimer_gk20a.h" 27#include "common/ptimer/ptimer_gk20a.h"
28#include "common/bus/bus_gm20b.h"
28 29
29#include "gk20a/gk20a.h" 30#include "gk20a/gk20a.h"
30#include "gk20a/fifo_gk20a.h" 31#include "gk20a/fifo_gk20a.h"
@@ -721,7 +722,7 @@ static const struct gpu_ops gp106_ops = {
721 .bus = { 722 .bus = {
722 .init_hw = gk20a_bus_init_hw, 723 .init_hw = gk20a_bus_init_hw,
723 .isr = gk20a_bus_isr, 724 .isr = gk20a_bus_isr,
724 .bar1_bind = gk20a_bus_bar1_bind, 725 .bar1_bind = gm20b_bus_bar1_bind,
725 .set_bar0_window = gk20a_bus_set_bar0_window, 726 .set_bar0_window = gk20a_bus_set_bar0_window,
726 }, 727 },
727 .ptimer = { 728 .ptimer = {
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 0106f6c9..934ddb9a 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -25,6 +25,7 @@
25#include "common/bus/bus_gk20a.h" 25#include "common/bus/bus_gk20a.h"
26#include "common/clock_gating/gp10b_gating_reglist.h" 26#include "common/clock_gating/gp10b_gating_reglist.h"
27#include "common/ptimer/ptimer_gk20a.h" 27#include "common/ptimer/ptimer_gk20a.h"
28#include "common/bus/bus_gm20b.h"
28 29
29#include "gk20a/gk20a.h" 30#include "gk20a/gk20a.h"
30#include "gk20a/fifo_gk20a.h" 31#include "gk20a/fifo_gk20a.h"
@@ -651,7 +652,7 @@ static const struct gpu_ops gp10b_ops = {
651 .bus = { 652 .bus = {
652 .init_hw = gk20a_bus_init_hw, 653 .init_hw = gk20a_bus_init_hw,
653 .isr = gk20a_bus_isr, 654 .isr = gk20a_bus_isr,
654 .bar1_bind = gk20a_bus_bar1_bind, 655 .bar1_bind = gm20b_bus_bar1_bind,
655 .set_bar0_window = gk20a_bus_set_bar0_window, 656 .set_bar0_window = gk20a_bus_set_bar0_window,
656 }, 657 },
657 .ptimer = { 658 .ptimer = {
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
index 3fa78e54..c4ffe126 100644
--- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
+++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_hal_gp10b.c
@@ -21,6 +21,7 @@
21 */ 21 */
22 22
23#include "common/bus/bus_gk20a.h" 23#include "common/bus/bus_gk20a.h"
24#include "common/bus/bus_gm20b.h"
24#include "common/clock_gating/gp10b_gating_reglist.h" 25#include "common/clock_gating/gp10b_gating_reglist.h"
25 26
26#include "vgpu/fifo_vgpu.h" 27#include "vgpu/fifo_vgpu.h"
@@ -523,7 +524,7 @@ static const struct gpu_ops vgpu_gp10b_ops = {
523 .bus = { 524 .bus = {
524 .init_hw = gk20a_bus_init_hw, 525 .init_hw = gk20a_bus_init_hw,
525 .isr = gk20a_bus_isr, 526 .isr = gk20a_bus_isr,
526 .bar1_bind = gk20a_bus_bar1_bind, 527 .bar1_bind = gm20b_bus_bar1_bind,
527 .set_bar0_window = gk20a_bus_set_bar0_window, 528 .set_bar0_window = gk20a_bus_set_bar0_window,
528 }, 529 },
529 .ptimer = { 530 .ptimer = {