mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: zero prealloc indices on init
Initialize the prealloc job list put and get indices to zero when allocating these resources. Otherwise we'd get whatever got left from the channel's previous lifetime. Change-Id: Idb17ec7bfbd0c1e2121c7a63e41dc5845560e988 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1756871 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sami Kiminki <skiminki@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@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
c3b5b48c0f
commit
939d3d5c4c
@@ -1012,6 +1012,8 @@ static int channel_gk20a_prealloc_resources(struct channel_gk20a *c,
|
||||
goto clean_up_priv_cmd;
|
||||
|
||||
c->joblist.pre_alloc.length = num_jobs;
|
||||
c->joblist.pre_alloc.put = 0;
|
||||
c->joblist.pre_alloc.get = 0;
|
||||
|
||||
/*
|
||||
* commit the previous writes before setting the flag.
|
||||
|
||||
Reference in New Issue
Block a user