mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: fix disable fecs trace
- This patch fixes disable fecs trace logic. - If user does trace disable twice, enable_count will become negative and when user tries to re-enable it, fecs trace will not be enabled. Bug 2672760 Change-Id: I895e48549970fa2faf06d5a531a423489f494cf4 Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2171015 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
087d4d3df4
commit
abede466e3
@@ -302,6 +302,11 @@ int nvgpu_gr_fecs_trace_disable(struct gk20a *g)
|
||||
}
|
||||
|
||||
nvgpu_mutex_acquire(&trace->enable_lock);
|
||||
if (trace->enable_count <= 0U) {
|
||||
nvgpu_mutex_release(&trace->enable_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
trace->enable_count--;
|
||||
if (trace->enable_count == 0U) {
|
||||
if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_FEATURE_CONTROL)) {
|
||||
|
||||
Reference in New Issue
Block a user