diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-01-09 05:50:08 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-10 08:16:44 -0500 |
commit | 3e9aa581b61a3ecbcf01a8988b1d12a8af8e2a45 (patch) | |
tree | 76bb9e8d99f1756945c0dfd9f37735d2589018b7 /drivers/gpu/nvgpu | |
parent | a30f3075544b5edd2144383459d2650a88b1cde7 (diff) |
gpu: nvgpu: skip comptag re-initialization
In case we need to re-initialize GR after floorsweeping TPC,
gp10b_ltc_init_comptags() will try to allocate comptag memory again
Skip this during re-initialization since it is unnecessary to
re-allocate all those buffers
Comptag buffer size is 33MB and reallocating causes huge memory leak
anyways
Bug 2031635
Change-Id: I935f96eb133283d6f935589c0e581e0997e980e2
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1634737
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index bf95f1fd..d191d778 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B L2 | 2 | * GP10B L2 |
3 | * | 3 | * |
4 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -88,6 +88,10 @@ int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) | |||
88 | if (max_comptag_lines == 0) | 88 | if (max_comptag_lines == 0) |
89 | return 0; | 89 | return 0; |
90 | 90 | ||
91 | /* Already initialized */ | ||
92 | if (gr->cacheline_size) | ||
93 | return 0; | ||
94 | |||
91 | if (max_comptag_lines > hw_max_comptag_lines) | 95 | if (max_comptag_lines > hw_max_comptag_lines) |
92 | max_comptag_lines = hw_max_comptag_lines; | 96 | max_comptag_lines = hw_max_comptag_lines; |
93 | 97 | ||