diff options
author | Peter Boonstoppel <pboonstoppel@nvidia.com> | 2017-01-10 13:22:54 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-14 17:54:46 -0500 |
commit | 907adfd785e3a3582b2649c48bf4c32f41745e3f (patch) | |
tree | 5ffa4118738135d4b33e9b6d1de035b87ef8b351 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 4fb3161ba3bb1c8481b1ca426a44aa4ee3ad744e (diff) |
gpu: nvgpu: Add NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX
This ioctl can be used on gp10b to set a flag in the context header
indicating this context should be run at elevated clock
frequency. FECS ctxsw ucode will read this flag as part of the context
switch and will request higher GPU clock frequencies from BPMP for the
duration of the context execution.
Bug 1819874
Change-Id: I84bf580923d95585095716d49cea24e58c9440ed
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: http://git-master/r/1292746
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 18 |
1 files changed, 18 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; |