diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 | ||||
-rw-r--r-- | include/uapi/linux/nvgpu.h | 2 |
2 files changed, 11 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) { |
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 22e357b6..f3c75045 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -994,6 +994,8 @@ struct nvgpu_fence { | |||
994 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SUPPRESS_WFI (1 << 4) | 994 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SUPPRESS_WFI (1 << 4) |
995 | /* skip buffer refcounting during submit */ | 995 | /* skip buffer refcounting during submit */ |
996 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5) | 996 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING (1 << 5) |
997 | /* submit should exhibit deterministic latency */ | ||
998 | #define NVGPU_SUBMIT_GPFIFO_FLAGS_DETERMINISTIC (1 << 6) | ||
997 | 999 | ||
998 | struct nvgpu_submit_gpfifo_args { | 1000 | struct nvgpu_submit_gpfifo_args { |
999 | __u64 gpfifo; | 1001 | __u64 gpfifo; |