summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c18
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h4
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h1
4 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index b963ad96..3dda1cbf 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -3874,6 +3874,24 @@ long gk20a_channel_ioctl(struct file *filp,
3874 err = -EINVAL; 3874 err = -EINVAL;
3875 } 3875 }
3876 break; 3876 break;
3877 case NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX:
3878 if (ch->g->ops.gr.set_boosted_ctx) {
3879 bool boost =
3880 ((struct nvgpu_boosted_ctx_args *)buf)->boost;
3881
3882 err = gk20a_busy(dev);
3883 if (err) {
3884 dev_err(dev,
3885 "%s: failed to host gk20a for ioctl cmd: 0x%x",
3886 __func__, cmd);
3887 break;
3888 }
3889 err = ch->g->ops.gr.set_boosted_ctx(ch, boost);
3890 gk20a_idle(dev);
3891 } else {
3892 err = -EINVAL;
3893 }
3894 break;
3877 default: 3895 default:
3878 dev_dbg(dev, "unrecognized ioctl cmd: 0x%x", cmd); 3896 dev_dbg(dev, "unrecognized ioctl cmd: 0x%x", cmd);
3879 err = -ENOTTY; 3897 err = -ENOTTY;
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 8d6d36fc..7f2383d9 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -319,6 +319,10 @@ struct gpu_ops {
319 struct vm_gk20a *vm, u32 class, 319 struct vm_gk20a *vm, u32 class,
320 u32 graphics_preempt_mode, 320 u32 graphics_preempt_mode,
321 u32 compute_preempt_mode); 321 u32 compute_preempt_mode);
322 int (*set_boosted_ctx)(struct channel_gk20a *ch, bool boost);
323 void (*update_boosted_ctx)(struct gk20a *g,
324 struct mem_desc *mem,
325 struct gr_ctx_desc *gr_ctx);
322 int (*fuse_override)(struct gk20a *g); 326 int (*fuse_override)(struct gk20a *g);
323 void (*init_sm_id_table)(struct gk20a *g); 327 void (*init_sm_id_table)(struct gk20a *g);
324 int (*load_smid_config)(struct gk20a *g); 328 int (*load_smid_config)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 0e1c88a4..170bfc7f 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2109,6 +2109,9 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
2109 if (g->ops.gr.update_ctxsw_preemption_mode) 2109 if (g->ops.gr.update_ctxsw_preemption_mode)
2110 g->ops.gr.update_ctxsw_preemption_mode(g, ch_ctx, mem); 2110 g->ops.gr.update_ctxsw_preemption_mode(g, ch_ctx, mem);
2111 2111
2112 if (g->ops.gr.update_boosted_ctx)
2113 g->ops.gr.update_boosted_ctx(g, mem, ch_ctx->gr_ctx);
2114
2112 virt_addr_lo = u64_lo32(ch_ctx->patch_ctx.mem.gpu_va); 2115 virt_addr_lo = u64_lo32(ch_ctx->patch_ctx.mem.gpu_va);
2113 virt_addr_hi = u64_hi32(ch_ctx->patch_ctx.mem.gpu_va); 2116 virt_addr_hi = u64_hi32(ch_ctx->patch_ctx.mem.gpu_va);
2114 2117
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 19ab2ec0..5a987a82 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -391,6 +391,7 @@ struct gr_ctx_desc {
391 391
392 u32 graphics_preempt_mode; 392 u32 graphics_preempt_mode;
393 u32 compute_preempt_mode; 393 u32 compute_preempt_mode;
394 bool boosted_ctx;
394#ifdef CONFIG_ARCH_TEGRA_18x_SOC 395#ifdef CONFIG_ARCH_TEGRA_18x_SOC
395 struct gr_ctx_desc_t18x t18x; 396 struct gr_ctx_desc_t18x t18x;
396#endif 397#endif