mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
Avoid repetitive branching on the c->deterministic flag and on build time flags by breaking the submit function on the runtime flag into two functions of which one gets called. In deterministic mode the job tracking conditions are simpler, there are a few extra prechecks to guarantee deterministic latency and the railgate corner case, and deferred cleanup is never done. In nondeterministic mode job tracking has more conditions, a power reference is taken for the job lifetime, and deferred cleanup is assumed. These two paths still share some common code. Split it to two more functions to act as easy building blocks so that the main logic is apparent. Jira NVGPU-4548 Change-Id: I64f91dcf09acb16f409dc04a12ad1e144d0cce56 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2333728 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>