mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +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 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit 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
78476a9bb6
commit
05ec7b80eb
@@ -1225,7 +1225,7 @@ int nvgpu_channel_setup_bind(struct channel_gk20a *c,
|
||||
|
||||
/* TBD: setup engine contexts */
|
||||
|
||||
if (args->num_inflight_jobs) {
|
||||
if (c->deterministic && args->num_inflight_jobs != 0U) {
|
||||
err = channel_gk20a_prealloc_resources(c,
|
||||
args->num_inflight_jobs);
|
||||
if (err != 0) {
|
||||
@@ -1251,7 +1251,7 @@ int nvgpu_channel_setup_bind(struct channel_gk20a *c,
|
||||
clean_up_priv_cmd:
|
||||
channel_gk20a_free_priv_cmdbuf(c);
|
||||
clean_up_prealloc:
|
||||
if (args->num_inflight_jobs) {
|
||||
if (c->deterministic && args->num_inflight_jobs != 0U) {
|
||||
channel_gk20a_free_prealloc_resources(c);
|
||||
}
|
||||
clean_up_sync:
|
||||
|
||||
Reference in New Issue
Block a user