summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Boonstoppel <pboonstoppel@nvidia.com>2017-04-12 14:47:45 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-17 11:14:22 -0400
commit278b765836b53a92e1b5b15a533221119de27669 (patch)
tree82c49588f0b020814fa05747d828f33d2a16be19 /drivers
parent4ba206aacca15134d60c73d94a4d9568064bcc22 (diff)
gpu: nvgpu: Fix submit profiling stat reporting
The debugfs submit profiling stats report the distribution of submit times at different percentiles. The original code reports the lowest entry in every percentile-bin as being representative for that bin. This means that where debugfs reports the 50th percentile, it actually reports the ~45.001th percentile. This is especially inconveniant when looking at the 100th percentile, which does not in fact reflect the maximum. This patch changes the code to instead report the highest entry in every percentile-bin. Change-Id: Ibde3aaf6445e08af09a4a96156f8421cbeb8bae5 Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/1461658 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index ad200f38..519fa509 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -3626,8 +3626,8 @@ static unsigned int __gk20a_fifo_create_stats(struct gk20a *g,
3626 /* build ranges */ 3626 /* build ranges */
3627 for (index = 0; index < PERCENTILE_RANGES; index++) 3627 for (index = 0; index < PERCENTILE_RANGES; index++)
3628 percentiles[index] = 3628 percentiles[index] =
3629 g->fifo.profile.sorted[(PERCENTILE_WIDTH * index * 3629 g->fifo.profile.sorted[(PERCENTILE_WIDTH * (index + 1) *
3630 nelem)/100]; 3630 nelem)/100 - 1];
3631 return nelem; 3631 return nelem;
3632} 3632}
3633 3633