summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-03-14 16:39:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-28 18:55:48 -0400
commitf04031e5e8837abb2be3feb0ee30e1af54de7845 (patch)
tree02a61de9f9a283a2c0fb02d7a204d2dd2176f5ff /drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
parent3e39798997f0726472e18a17462216094c084074 (diff)
gpu: nvgpu: Move programming of host registers to fifo
Move code that touches host registers and instance block to fifo HAL. This involves adding HAL ops for the fifo HAL functions that get called from outside fifo. This clears responsibility of channel by leaving it only managing channels in software and push buffers. channel had member ramfc defined, but it was not used, to remove it. pbdma_acquire_val consisted both of channel logic and hardware programming. The channel logic was moved to the caller and only hardware programming was moved. Change-Id: Id005787f6cc91276b767e8e86325caf966913de9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1322423 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/fifo_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index 77ea1b47..6f576e3f 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -80,7 +80,8 @@ int channel_gp10b_commit_userd(struct channel_gk20a *c)
80} 80}
81 81
82static int channel_gp10b_setup_ramfc(struct channel_gk20a *c, 82static int channel_gp10b_setup_ramfc(struct channel_gk20a *c,
83 u64 gpfifo_base, u32 gpfifo_entries, u32 flags) 83 u64 gpfifo_base, u32 gpfifo_entries,
84 unsigned long acquire_timeout, u32 flags)
84{ 85{
85 struct gk20a *g = c->g; 86 struct gk20a *g = c->g;
86 struct mem_desc *mem = &c->inst_block; 87 struct mem_desc *mem = &c->inst_block;
@@ -121,7 +122,7 @@ static int channel_gp10b_setup_ramfc(struct channel_gk20a *c,
121 gk20a_mem_wr32(g, mem, ram_fc_target_w(), pbdma_target_engine_sw_f()); 122 gk20a_mem_wr32(g, mem, ram_fc_target_w(), pbdma_target_engine_sw_f());
122 123
123 gk20a_mem_wr32(g, mem, ram_fc_acquire_w(), 124 gk20a_mem_wr32(g, mem, ram_fc_acquire_w(),
124 channel_gk20a_pbdma_acquire_val(c)); 125 g->ops.fifo.pbdma_acquire_val(acquire_timeout));
125 126
126 gk20a_mem_wr32(g, mem, ram_fc_runlist_timeslice_w(), 127 gk20a_mem_wr32(g, mem, ram_fc_runlist_timeslice_w(),
127 pbdma_runlist_timeslice_timeout_128_f() | 128 pbdma_runlist_timeslice_timeout_128_f() |
@@ -139,7 +140,7 @@ static int channel_gp10b_setup_ramfc(struct channel_gk20a *c,
139 gk20a_mem_wr32(g, mem, ram_fc_config_w(), 140 gk20a_mem_wr32(g, mem, ram_fc_config_w(),
140 pbdma_config_auth_level_privileged_f()); 141 pbdma_config_auth_level_privileged_f());
141 142
142 gk20a_channel_setup_ramfc_for_privileged_channel(c); 143 gk20a_fifo_setup_ramfc_for_privileged_channel(c);
143 } 144 }
144 145
145 return channel_gp10b_commit_userd(c); 146 return channel_gp10b_commit_userd(c);