diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c b/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c index bf07bd79..175482a3 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -263,9 +263,10 @@ int nvgpu_pmu_busy_cycles_norm(struct gk20a *g, u32 *norm) | |||
263 | g->ops.pmu.pmu_reset_idle_counter(g, 0); | 263 | g->ops.pmu.pmu_reset_idle_counter(g, 0); |
264 | 264 | ||
265 | if (intr_status != 0UL) { | 265 | if (intr_status != 0UL) { |
266 | *norm = PMU_BUSY_CYCLES_NORM_MAX; | ||
267 | g->ops.pmu.pmu_clear_idle_intr_status(g); | 266 | g->ops.pmu.pmu_clear_idle_intr_status(g); |
268 | } else if (total_cycles == 0ULL || busy_cycles > total_cycles) { | 267 | } |
268 | |||
269 | if (total_cycles == 0ULL || busy_cycles > total_cycles) { | ||
269 | *norm = PMU_BUSY_CYCLES_NORM_MAX; | 270 | *norm = PMU_BUSY_CYCLES_NORM_MAX; |
270 | } else { | 271 | } else { |
271 | *norm = (u32)(busy_cycles * PMU_BUSY_CYCLES_NORM_MAX | 272 | *norm = (u32)(busy_cycles * PMU_BUSY_CYCLES_NORM_MAX |