mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 05ec7b80eb)
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>
This commit is contained in:
committed by
mobile promotions
parent
9cdc1ccdaf
commit
96f2d4320a
@@ -1222,7 +1222,7 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c,
|
||||
|
||||
/* TBD: setup engine contexts */
|
||||
|
||||
if (gpfifo_args->num_inflight_jobs) {
|
||||
if (c->deterministic && gpfifo_args->num_inflight_jobs != 0U) {
|
||||
err = channel_gk20a_prealloc_resources(c,
|
||||
gpfifo_args->num_inflight_jobs);
|
||||
if (err) {
|
||||
@@ -1248,7 +1248,7 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c,
|
||||
clean_up_priv_cmd:
|
||||
channel_gk20a_free_priv_cmdbuf(c);
|
||||
clean_up_prealloc:
|
||||
if (gpfifo_args->num_inflight_jobs) {
|
||||
if (c->deterministic && gpfifo_args->num_inflight_jobs != 0U) {
|
||||
channel_gk20a_free_prealloc_resources(c);
|
||||
}
|
||||
clean_up_sync:
|
||||
|
||||
Reference in New Issue
Block a user