summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorSachit Kadle <skadle@nvidia.com>2016-08-30 23:23:31 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-20 11:14:24 -0400
commit418fc5338e202c6d0b6b02d49fed736ed28279fb (patch)
treec6cd03ec94d1c9f1342e0396b3eee64b49db8b20 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent733fb79b39869665addcd80ccdf1c15f4a5aaa29 (diff)
gpu: nvgpu: add deterministic submit flag
This change adds a new ioctl flag, NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC, which indicates that a gpfifo submission must exhibit deterministic behavior within the kernel. For submissions that require job tracking and also set this flag, we require the channel to have previously pre-allocated job tracking resources. Bug 1795076 Change-Id: I0496a2513c6c683fcda161b32db9e7ee6712d45c Signed-off-by: Sachit Kadle <skadle@nvidia.com> Reviewed-on: http://git-master/r/1210527 (cherry picked from commit 0a36a0ce3a6cbe398931993e742fc928f7b2c0aa) Reviewed-on: http://git-master/r/1223935 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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index cc3bbbd2..b846054d 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -2628,6 +2628,15 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
2628 !skip_buffer_refcounting; 2628 !skip_buffer_refcounting;
2629 2629
2630 if (need_job_tracking) { 2630 if (need_job_tracking) {
2631 /*
2632 * If the submit is to have deterministic latency and
2633 * job tracking is required, the channel must have
2634 * pre-allocated resources. Otherwise, we fail the submit here
2635 */
2636 if ((flags & NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC) &&
2637 !channel_gk20a_is_prealloc_enabled(c))
2638 return -EINVAL;
2639
2631 /* gk20a_channel_update releases this ref. */ 2640 /* gk20a_channel_update releases this ref. */
2632 err = gk20a_busy(g->dev); 2641 err = gk20a_busy(g->dev);
2633 if (err) { 2642 if (err) {