diff options
author | Jonathan McCaffrey <jmccaffrey@nvidia.com> | 2017-08-18 02:51:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-26 18:46:01 -0400 |
commit | 00e52529a8431a6520b8e1bbcbfa44b4cc86be80 (patch) | |
tree | f88b91784e966e9c9bbbffe1d127a1d73826d1c2 /drivers/gpu/nvgpu/gp10b | |
parent | e49d93a960f8995affeb4541941eb7f16d04eafd (diff) |
gpu: gp10b: add gfxp_wfi_timeout sysfs node
Add a sysfs node to allow root user to set PRI_FE_GFXP_WFI_TIMEOUT, for gp10b
only, in units of sysclk cycles. Store the set value in a variable, and write
the set value to register after GPU is un-railgated.
NV_PGRAPH_PRI_FE_GFXP_WFI_TIMEOUT is engine_reset after Bug 1623341.
Change default value to be specified in cycles, rather than time. This value
is almost the current value in cycles calculated each boot.
Bug 1932782
Change-Id: I0a4207e637cd1413a1be95abe2bcce3adccf76fa
Reviewed-on: https://git-master.nvidia.com/r/1540939
Signed-off-by: Jonathan McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1580999
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index a6d72907..78be072f 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -49,8 +49,6 @@ | |||
49 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> | 49 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> |
50 | #include <nvgpu/hw/gp10b/hw_fuse_gp10b.h> | 50 | #include <nvgpu/hw/gp10b/hw_fuse_gp10b.h> |
51 | 51 | ||
52 | #define NVGPU_GFXP_WFI_TIMEOUT_US 100LL | ||
53 | |||
54 | bool gr_gp10b_is_valid_class(struct gk20a *g, u32 class_num) | 52 | bool gr_gp10b_is_valid_class(struct gk20a *g, u32 class_num) |
55 | { | 53 | { |
56 | bool valid = false; | 54 | bool valid = false; |
@@ -2336,11 +2334,8 @@ int gp10b_gr_fuse_override(struct gk20a *g) | |||
2336 | int gr_gp10b_init_preemption_state(struct gk20a *g) | 2334 | int gr_gp10b_init_preemption_state(struct gk20a *g) |
2337 | { | 2335 | { |
2338 | u32 debug_2; | 2336 | u32 debug_2; |
2339 | u64 sysclk_rate; | 2337 | struct gr_gk20a *gr = &g->gr; |
2340 | u32 sysclk_cycles; | 2338 | u32 sysclk_cycles = gr->gfxp_wfi_timeout_count; |
2341 | |||
2342 | sysclk_rate = g->ops.clk.get_rate(g, CTRL_CLK_DOMAIN_GPCCLK); | ||
2343 | sysclk_cycles = (u32)((sysclk_rate * NVGPU_GFXP_WFI_TIMEOUT_US) / 1000000ULL); | ||
2344 | gk20a_writel(g, gr_fe_gfxp_wfi_timeout_r(), | 2339 | gk20a_writel(g, gr_fe_gfxp_wfi_timeout_r(), |
2345 | gr_fe_gfxp_wfi_timeout_count_f(sysclk_cycles)); | 2340 | gr_fe_gfxp_wfi_timeout_count_f(sysclk_cycles)); |
2346 | 2341 | ||