summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-01-17 15:39:13 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-23 01:20:15 -0500
commitf3f14cdff53f4b936e2505d44aad6e3bca143056 (patch)
tree8d6438132b8ca429758d18142c5f569f60f2bc35 /drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
parent193a2ed38ca51d898ac811820ab86237c84e18eb (diff)
gpu: nvgpu: Fold T19x code back to main code paths
Lots of code paths were split to T19x specific code paths and structs due to split repository. Now that repositories are merged, fold all of them back to main code paths and structs and remove the T19x specific Kconfig flag. Change-Id: Id0d17a5f0610fc0b49f51ab6664e716dc8b222b6 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1640606 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
index 7d3c5c75..271dcc41 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
@@ -30,10 +30,11 @@
30#include <nvgpu/gmmu.h> 30#include <nvgpu/gmmu.h>
31#include <nvgpu/soc.h> 31#include <nvgpu/soc.h>
32#include <nvgpu/debug.h> 32#include <nvgpu/debug.h>
33#include <nvgpu/nvhost_t19x.h> 33#include <nvgpu/nvhost.h>
34#include <nvgpu/barrier.h> 34#include <nvgpu/barrier.h>
35#include <nvgpu/mm.h> 35#include <nvgpu/mm.h>
36#include <nvgpu/ctxsw_trace.h> 36#include <nvgpu/ctxsw_trace.h>
37#include <nvgpu/io_usermode.h>
37 38
38#include "gk20a/gk20a.h" 39#include "gk20a/gk20a.h"
39#include "gk20a/fifo_gk20a.h" 40#include "gk20a/fifo_gk20a.h"
@@ -96,7 +97,7 @@ void gv11b_get_ch_runlist_entry(struct channel_gk20a *c, u32 *runlist)
96 /* Time being use 0 pbdma sequencer */ 97 /* Time being use 0 pbdma sequencer */
97 runlist_entry = ram_rl_entry_type_channel_v() | 98 runlist_entry = ram_rl_entry_type_channel_v() |
98 ram_rl_entry_chan_runqueue_selector_f( 99 ram_rl_entry_chan_runqueue_selector_f(
99 c->t19x.runqueue_sel) | 100 c->runqueue_sel) |
100 ram_rl_entry_chan_userd_target_f( 101 ram_rl_entry_chan_userd_target_f(
101 nvgpu_aperture_mask(g, &g->fifo.userd, 102 nvgpu_aperture_mask(g, &g->fifo.userd,
102 ram_rl_entry_chan_userd_target_sys_mem_ncoh_v(), 103 ram_rl_entry_chan_userd_target_sys_mem_ncoh_v(),
@@ -185,7 +186,7 @@ int channel_gv11b_setup_ramfc(struct channel_gk20a *c,
185 nvgpu_mem_wr32(g, mem, ram_fc_chid_w(), ram_fc_chid_id_f(c->chid)); 186 nvgpu_mem_wr32(g, mem, ram_fc_chid_w(), ram_fc_chid_id_f(c->chid));
186 187
187 nvgpu_mem_wr32(g, mem, ram_fc_set_channel_info_w(), 188 nvgpu_mem_wr32(g, mem, ram_fc_set_channel_info_w(),
188 pbdma_set_channel_info_veid_f(c->t19x.subctx_id)); 189 pbdma_set_channel_info_veid_f(c->subctx_id));
189 190
190 gv11b_fifo_init_ramfc_eng_method_buffer(g, c, mem); 191 gv11b_fifo_init_ramfc_eng_method_buffer(g, c, mem);
191 192
@@ -215,7 +216,7 @@ static void gv11b_ring_channel_doorbell(struct channel_gk20a *c)
215 216
216 gk20a_dbg_info("channel ring door bell %d\n", c->chid); 217 gk20a_dbg_info("channel ring door bell %d\n", c->chid);
217 218
218 gv11b_usermode_writel(c->g, usermode_notify_channel_pending_r(), 219 nvgpu_usermode_writel(c->g, usermode_notify_channel_pending_r(),
219 usermode_notify_channel_pending_id_f(hw_chid)); 220 usermode_notify_channel_pending_id_f(hw_chid));
220} 221}
221 222
@@ -1782,8 +1783,7 @@ int gv11b_init_fifo_setup_hw(struct gk20a *g)
1782{ 1783{
1783 struct fifo_gk20a *f = &g->fifo; 1784 struct fifo_gk20a *f = &g->fifo;
1784 1785
1785 f->t19x.max_subctx_count = 1786 f->max_subctx_count = gr_pri_fe_chip_def_info_max_veid_count_init_v();
1786 gr_pri_fe_chip_def_info_max_veid_count_init_v();
1787 return 0; 1787 return 0;
1788} 1788}
1789 1789
@@ -1794,7 +1794,7 @@ static u32 gv11b_mmu_fault_id_to_gr_veid(struct gk20a *g, u32 gr_eng_fault_id,
1794 u32 num_subctx; 1794 u32 num_subctx;
1795 u32 veid = FIFO_INVAL_VEID; 1795 u32 veid = FIFO_INVAL_VEID;
1796 1796
1797 num_subctx = f->t19x.max_subctx_count; 1797 num_subctx = f->max_subctx_count;
1798 1798
1799 if (mmu_fault_id >= gr_eng_fault_id && 1799 if (mmu_fault_id >= gr_eng_fault_id &&
1800 mmu_fault_id < (gr_eng_fault_id + num_subctx)) 1800 mmu_fault_id < (gr_eng_fault_id + num_subctx))