diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index fd7faa22..c446e3ea 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -3916,11 +3916,19 @@ void gk20a_fifo_setup_ramfc_for_privileged_channel(struct channel_gk20a *c) | |||
3916 | int gk20a_fifo_setup_userd(struct channel_gk20a *c) | 3916 | int gk20a_fifo_setup_userd(struct channel_gk20a *c) |
3917 | { | 3917 | { |
3918 | struct gk20a *g = c->g; | 3918 | struct gk20a *g = c->g; |
3919 | struct nvgpu_mem *mem = &g->fifo.userd; | 3919 | struct nvgpu_mem *mem; |
3920 | u32 offset = c->chid * g->fifo.userd_entry_size / sizeof(u32); | 3920 | u32 offset; |
3921 | 3921 | ||
3922 | gk20a_dbg_fn(""); | 3922 | gk20a_dbg_fn(""); |
3923 | 3923 | ||
3924 | if (nvgpu_mem_is_valid(&c->usermode_userd)) { | ||
3925 | mem = &c->usermode_userd; | ||
3926 | offset = 0; | ||
3927 | } else { | ||
3928 | mem = &g->fifo.userd; | ||
3929 | offset = c->chid * g->fifo.userd_entry_size / sizeof(u32); | ||
3930 | } | ||
3931 | |||
3924 | nvgpu_mem_wr32(g, mem, offset + ram_userd_put_w(), 0); | 3932 | nvgpu_mem_wr32(g, mem, offset + ram_userd_put_w(), 0); |
3925 | nvgpu_mem_wr32(g, mem, offset + ram_userd_get_w(), 0); | 3933 | nvgpu_mem_wr32(g, mem, offset + ram_userd_get_w(), 0); |
3926 | nvgpu_mem_wr32(g, mem, offset + ram_userd_ref_w(), 0); | 3934 | nvgpu_mem_wr32(g, mem, offset + ram_userd_ref_w(), 0); |