summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/clk_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_gp106.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c
index b8a1ba3d..2ac2ce5a 100644
--- a/drivers/gpu/nvgpu/gp106/clk_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GP106 Clocks 2 * GP106 Clocks
3 * 3 *
4 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2016-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"),
@@ -236,7 +236,8 @@ static int gp106_get_rate_show(void *data , u64 *val) {
236 struct namemap_cfg *c = (struct namemap_cfg *) data; 236 struct namemap_cfg *c = (struct namemap_cfg *) data;
237 struct gk20a *g = c->g; 237 struct gk20a *g = c->g;
238 238
239 *val = c->is_counter ? gp106_get_rate_cntr(g, c) : 0 /* TODO PLL read */; 239 *val = c->is_counter ? (u64)c->scale * gp106_get_rate_cntr(g, c) :
240 0 /* TODO PLL read */;
240 return 0; 241 return 0;
241} 242}
242DEFINE_SIMPLE_ATTRIBUTE(get_rate_fops, gp106_get_rate_show, NULL, "%llu\n"); 243DEFINE_SIMPLE_ATTRIBUTE(get_rate_fops, gp106_get_rate_show, NULL, "%llu\n");