diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-11-06 07:25:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-06 15:27:35 -0500 |
commit | 8bdce5337ee5f4d1e1f6d4c7b2dc0abe4a532893 (patch) | |
tree | 26274011c5223478744127fe0edf60ca99bd1a35 /drivers/gpu/nvgpu/common/linux/channel.c | |
parent | 1480afeb013decec1d5451fd0d3eeaffa8e17bb6 (diff) |
gpu: nvgpu: support tuning per-ch deterministic opts
Add a new ioctl NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS to adjust
deterministic options on a per-channel basis. Currently, the only
supported option is to relax the no-railgating requirement on open
deterministic channels. This also disallows submits on such channels,
until the railgate option is reset.
Bug 200327089
Change-Id: If4f0f51fd1d40ad7407d13638150d7402479aff0
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1554563
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/channel.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/channel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/channel.c b/drivers/gpu/nvgpu/common/linux/channel.c index 716c5820..c295336f 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.c +++ b/drivers/gpu/nvgpu/common/linux/channel.c | |||
@@ -537,6 +537,17 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
537 | if (c->deterministic) | 537 | if (c->deterministic) |
538 | nvgpu_rwsem_down_read(&g->deterministic_busy); | 538 | nvgpu_rwsem_down_read(&g->deterministic_busy); |
539 | 539 | ||
540 | if (c->deterministic && c->deterministic_railgate_allowed) { | ||
541 | /* | ||
542 | * Nope - this channel has dropped its own power ref. As | ||
543 | * deterministic submits don't hold power on per each submitted | ||
544 | * job like normal ones do, the GPU might railgate any time now | ||
545 | * and thus submit is disallowed. | ||
546 | */ | ||
547 | err = -EINVAL; | ||
548 | goto clean_up; | ||
549 | } | ||
550 | |||
540 | trace_gk20a_channel_submit_gpfifo(g->name, | 551 | trace_gk20a_channel_submit_gpfifo(g->name, |
541 | c->chid, | 552 | c->chid, |
542 | num_entries, | 553 | num_entries, |