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>
This commit is contained in:
Deepak Nibade
2018-01-09 02:50:08 -08:00
committed by mobile promotions
parent a30f307554
commit 3e9aa581b6

View File

@@ -1,7 +1,7 @@
/*
* GP10B L2
*
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* 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)
if (max_comptag_lines == 0)
return 0;
/* Already initialized */
if (gr->cacheline_size)
return 0;
if (max_comptag_lines > hw_max_comptag_lines)
max_comptag_lines = hw_max_comptag_lines;