diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 189ec330..990972e4 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -3208,6 +3208,23 @@ long gk20a_channel_ioctl(struct file *filp, | |||
3208 | 3208 | ||
3209 | trace_gk20a_channel_set_timeslice(GK20A_TP_ARGS_SCHED(ch)); | 3209 | trace_gk20a_channel_set_timeslice(GK20A_TP_ARGS_SCHED(ch)); |
3210 | break; | 3210 | break; |
3211 | case NVGPU_IOCTL_CHANNEL_SET_PREEMPTION_MODE: | ||
3212 | if (ch->g->ops.gr.set_preemption_mode) { | ||
3213 | err = gk20a_busy(dev); | ||
3214 | if (err) { | ||
3215 | dev_err(dev, | ||
3216 | "%s: failed to host gk20a for ioctl cmd: 0x%x", | ||
3217 | __func__, cmd); | ||
3218 | break; | ||
3219 | } | ||
3220 | err = ch->g->ops.gr.set_preemption_mode(ch, | ||
3221 | ((struct nvgpu_preemption_mode_args *)buf)->graphics_preempt_mode, | ||
3222 | ((struct nvgpu_preemption_mode_args *)buf)->compute_preempt_mode); | ||
3223 | gk20a_idle(dev); | ||
3224 | } else { | ||
3225 | err = -EINVAL; | ||
3226 | } | ||
3227 | break; | ||
3211 | default: | 3228 | default: |
3212 | dev_dbg(dev, "unrecognized ioctl cmd: 0x%x", cmd); | 3229 | dev_dbg(dev, "unrecognized ioctl cmd: 0x%x", cmd); |
3213 | err = -ENOTTY; | 3230 | err = -ENOTTY; |