diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index dbde2fed..1194663b 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | |||
@@ -48,6 +48,15 @@ | |||
48 | #define CHANNEL_INFO_VEID0 0 | 48 | #define CHANNEL_INFO_VEID0 0 |
49 | #define PBDMA_SUBDEVICE_ID 1 | 49 | #define PBDMA_SUBDEVICE_ID 1 |
50 | 50 | ||
51 | static inline void gv11b_usermode_writel(struct gk20a *g, u32 r, u32 v) | ||
52 | { | ||
53 | struct fifo_gk20a *f = &g->fifo; | ||
54 | void __iomem *reg = f->t19x.usermode_regs + (r - usermode_cfg0_r()); | ||
55 | |||
56 | writel_relaxed(v, reg); | ||
57 | gk20a_dbg(gpu_dbg_reg, "usermode r=0x%x v=0x%x", r, v); | ||
58 | } | ||
59 | |||
51 | static void gv11b_get_tsg_runlist_entry(struct tsg_gk20a *tsg, u32 *runlist) | 60 | static void gv11b_get_tsg_runlist_entry(struct tsg_gk20a *tsg, u32 *runlist) |
52 | { | 61 | { |
53 | 62 | ||
@@ -192,10 +201,13 @@ static int channel_gv11b_setup_ramfc(struct channel_gk20a *c, | |||
192 | 201 | ||
193 | static void gv11b_ring_channel_doorbell(struct channel_gk20a *c) | 202 | static void gv11b_ring_channel_doorbell(struct channel_gk20a *c) |
194 | { | 203 | { |
204 | struct fifo_gk20a *f = &c->g->fifo; | ||
205 | u32 hw_chid = f->channel_base + c->chid; | ||
206 | |||
195 | gk20a_dbg_info("channel ring door bell %d\n", c->chid); | 207 | gk20a_dbg_info("channel ring door bell %d\n", c->chid); |
196 | 208 | ||
197 | gk20a_writel(c->g, usermode_notify_channel_pending_r(), | 209 | gv11b_usermode_writel(c->g, usermode_notify_channel_pending_r(), |
198 | usermode_notify_channel_pending_id_f(c->chid)); | 210 | usermode_notify_channel_pending_id_f(hw_chid)); |
199 | } | 211 | } |
200 | 212 | ||
201 | static u32 gv11b_userd_gp_get(struct gk20a *g, struct channel_gk20a *c) | 213 | static u32 gv11b_userd_gp_get(struct gk20a *g, struct channel_gk20a *c) |
@@ -1575,11 +1587,19 @@ static u32 gv11b_fifo_get_syncpt_incr_cmd_size(bool wfi_cmd) | |||
1575 | } | 1587 | } |
1576 | #endif /* CONFIG_TEGRA_GK20A_NVHOST */ | 1588 | #endif /* CONFIG_TEGRA_GK20A_NVHOST */ |
1577 | 1589 | ||
1590 | static int gv11b_init_fifo_setup_hw(struct gk20a *g) | ||
1591 | { | ||
1592 | struct fifo_gk20a *f = &g->fifo; | ||
1593 | |||
1594 | f->t19x.usermode_regs = g->regs + usermode_cfg0_r(); | ||
1595 | return 0; | ||
1596 | } | ||
1597 | |||
1578 | void gv11b_init_fifo(struct gpu_ops *gops) | 1598 | void gv11b_init_fifo(struct gpu_ops *gops) |
1579 | { | 1599 | { |
1580 | gp10b_init_fifo(gops); | 1600 | gp10b_init_fifo(gops); |
1581 | /* for gv11b no need to do any thing special for fifo hw setup */ | 1601 | /* for gv11b no need to do any thing special for fifo hw setup */ |
1582 | gops->fifo.init_fifo_setup_hw = NULL; | 1602 | gops->fifo.init_fifo_setup_hw = gv11b_init_fifo_setup_hw; |
1583 | gops->fifo.runlist_entry_size = ram_rl_entry_size_v; | 1603 | gops->fifo.runlist_entry_size = ram_rl_entry_size_v; |
1584 | gops->fifo.get_tsg_runlist_entry = gv11b_get_tsg_runlist_entry; | 1604 | gops->fifo.get_tsg_runlist_entry = gv11b_get_tsg_runlist_entry; |
1585 | gops->fifo.get_ch_runlist_entry = gv11b_get_ch_runlist_entry; | 1605 | gops->fifo.get_ch_runlist_entry = gv11b_get_ch_runlist_entry; |