diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-21 06:59:51 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-21 16:58:10 -0400 |
commit | 939d3d5c4cbc7455a9a79a31316824dba6337dd2 (patch) | |
tree | febcb010164adcffa3c6c5e36b5c6f1974d63c3e /drivers/gpu | |
parent | c3b5b48c0fbecfb874d0fa4aa52286849bb36a5b (diff) |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 4e6837ef..50e29cf6 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1012,6 +1012,8 @@ static int channel_gk20a_prealloc_resources(struct channel_gk20a *c, | |||
1012 | goto clean_up_priv_cmd; | 1012 | goto clean_up_priv_cmd; |
1013 | 1013 | ||
1014 | c->joblist.pre_alloc.length = num_jobs; | 1014 | c->joblist.pre_alloc.length = num_jobs; |
1015 | c->joblist.pre_alloc.put = 0; | ||
1016 | c->joblist.pre_alloc.get = 0; | ||
1015 | 1017 | ||
1016 | /* | 1018 | /* |
1017 | * commit the previous writes before setting the flag. | 1019 | * commit the previous writes before setting the flag. |