summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-06-22 06:37:46 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:17 -0500
commit528758f488a8f39c1306d8c17be4799273a94a5d (patch)
tree2d9f74b31ebafa53ada34720feb50ad9e09b78f4 /drivers/gpu/nvgpu/gp10b
parentd4eb7f691ef14263377c0f33777b104e2b1a0c53 (diff)
gpu: nvgpu: Add interface for privileged channel allocation
Added interface for privileged channel allocation to execute the privileged method (ex. CE phys mode transfer). JIRA DNVGPU-53 Change-Id: I1606f8c9d10f29d5a10738b5110ce9f6a2bb428d Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1169320 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c8
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h8
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h4
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index 0aa6e29e..349f25fc 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -132,6 +132,14 @@ static int channel_gp10b_setup_ramfc(struct channel_gk20a *c,
132 132
133 gk20a_mem_wr32(g, mem, ram_fc_chid_w(), ram_fc_chid_id_f(c->hw_chid)); 133 gk20a_mem_wr32(g, mem, ram_fc_chid_w(), ram_fc_chid_id_f(c->hw_chid));
134 134
135 if (c->is_privileged_channel) {
136 /* Set privilege level for channel */
137 gk20a_mem_wr32(g, mem, ram_fc_config_w(),
138 pbdma_config_auth_level_privileged_f());
139
140 gk20a_channel_setup_ramfc_for_privileged_channel(c);
141 }
142
135 return channel_gp10b_commit_userd(c); 143 return channel_gp10b_commit_userd(c);
136} 144}
137 145
diff --git a/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
index 0caffb22..65aedccd 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
@@ -342,6 +342,14 @@ static inline u32 pbdma_userd_hi_addr_f(u32 v)
342{ 342{
343 return (v & 0xff) << 0; 343 return (v & 0xff) << 0;
344} 344}
345static inline u32 pbdma_config_r(u32 i)
346{
347 return 0x000400f4 + i*8192;
348}
349static inline u32 pbdma_config_auth_level_privileged_f(void)
350{
351 return 0x100;
352}
345static inline u32 pbdma_hce_ctrl_r(u32 i) 353static inline u32 pbdma_hce_ctrl_r(u32 i)
346{ 354{
347 return 0x000400e4 + i*8192; 355 return 0x000400e4 + i*8192;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
index 55323579..89dfbc21 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
@@ -382,6 +382,10 @@ static inline u32 ram_fc_chid_id_w(void)
382{ 382{
383 return 0; 383 return 0;
384} 384}
385static inline u32 ram_fc_config_w(void)
386{
387 return 61;
388}
385static inline u32 ram_fc_runlist_timeslice_w(void) 389static inline u32 ram_fc_runlist_timeslice_w(void)
386{ 390{
387 return 62; 391 return 62;