summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fifo
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-09-27 13:11:53 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-11-16 18:12:24 -0500
commit96f2d4320adb866e1f9813309e6c61d761eecc8d (patch)
treef76d6142fba3f96838a8ce614dbcebe9a1cd9f03 /drivers/gpu/nvgpu/common/fifo
parent9cdc1ccdafa955ba2d9a9b238d05f15566869039 (diff)
gpu: nvgpu: Use deterministic flag to decide pre-alloc
Instead of using num_inflight_jobs to determine whether to pre-alloc resources for a channel use the c->deterministic flag and the number of inflight jobs field. Non-determinsitic channels do not require pre-alloced resources and deterministic channels with 0 in flight jobs (i.e no kernel job tracking, AKA fast path sumits) also do not require pre-alloced resources. Bug 2327792 Change-Id: I7e8eb0478c22e005ca2c46c555415afa0ded0be1 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1850123 (cherry picked from commit 05ec7b80ebeabbc27d369ebd88dfe511c30d1bad) Reviewed-on: https://git-master.nvidia.com/r/1949219 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: James Norton <jnorton@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fifo')
-rw-r--r--drivers/gpu/nvgpu/common/fifo/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c
index 680382a4..2097a28e 100644
--- a/drivers/gpu/nvgpu/common/fifo/channel.c
+++ b/drivers/gpu/nvgpu/common/fifo/channel.c
@@ -1222,7 +1222,7 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c,
1222 1222
1223 /* TBD: setup engine contexts */ 1223 /* TBD: setup engine contexts */
1224 1224
1225 if (gpfifo_args->num_inflight_jobs) { 1225 if (c->deterministic && gpfifo_args->num_inflight_jobs != 0U) {
1226 err = channel_gk20a_prealloc_resources(c, 1226 err = channel_gk20a_prealloc_resources(c,
1227 gpfifo_args->num_inflight_jobs); 1227 gpfifo_args->num_inflight_jobs);
1228 if (err) { 1228 if (err) {
@@ -1248,7 +1248,7 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c,
1248clean_up_priv_cmd: 1248clean_up_priv_cmd:
1249 channel_gk20a_free_priv_cmdbuf(c); 1249 channel_gk20a_free_priv_cmdbuf(c);
1250clean_up_prealloc: 1250clean_up_prealloc:
1251 if (gpfifo_args->num_inflight_jobs) { 1251 if (c->deterministic && gpfifo_args->num_inflight_jobs != 0U) {
1252 channel_gk20a_free_prealloc_resources(c); 1252 channel_gk20a_free_prealloc_resources(c);
1253 } 1253 }
1254clean_up_sync: 1254clean_up_sync: