diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-11-15 17:35:43 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-29 16:17:18 -0500 |
commit | 7a4cb4a6ab6c861a94e9105360967894df749f03 (patch) | |
tree | acfcfa1f607a66b18a579f7d06a48b7746abdabf /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | dda9d80a852e099a6304abb07936b4250cf1a141 (diff) |
gpu: nvgpu: gv11b: gfxp wfi timeout
For gv11b, configured gfx preemption wfi timeout in usec.
Set timeout unit as usec in gr_gv11b_init_preemption_state.
Used default timeout as 1msec and this timeout value can
be modified through sysfs node:
/sys/devices/gpu.0/gfxp_wfi_timeout_count
For gp10b:
gfxp_wfi_timeout_count is in syclk cycles
For gv11b:
gfxp_wfi_timeout_count is in usec
Bug 2003668
Change-Id: I68d52ce996a83df90b8b3a8164debb07e5cb370f
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1599658
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 64b54699..73b49927 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -79,7 +79,6 @@ | |||
79 | #define CTXSW_MEM_SCRUBBING_TIMEOUT_DEFAULT 10 | 79 | #define CTXSW_MEM_SCRUBBING_TIMEOUT_DEFAULT 10 |
80 | #define FECS_ARB_CMD_TIMEOUT_MAX 40 | 80 | #define FECS_ARB_CMD_TIMEOUT_MAX 40 |
81 | #define FECS_ARB_CMD_TIMEOUT_DEFAULT 2 | 81 | #define FECS_ARB_CMD_TIMEOUT_DEFAULT 2 |
82 | #define GFXP_WFI_TIMEOUT_COUNT_DEFAULT 100000 | ||
83 | 82 | ||
84 | static int gk20a_init_gr_bind_fecs_elpg(struct gk20a *g); | 83 | static int gk20a_init_gr_bind_fecs_elpg(struct gk20a *g); |
85 | 84 | ||
@@ -4840,7 +4839,8 @@ static int gk20a_init_gr_setup_sw(struct gk20a *g) | |||
4840 | if (g->ops.gr.init_czf_bypass) | 4839 | if (g->ops.gr.init_czf_bypass) |
4841 | g->ops.gr.init_czf_bypass(g); | 4840 | g->ops.gr.init_czf_bypass(g); |
4842 | 4841 | ||
4843 | gr->gfxp_wfi_timeout_count = GFXP_WFI_TIMEOUT_COUNT_DEFAULT; | 4842 | if (g->ops.gr.init_gfxp_wfi_timeout_count) |
4843 | g->ops.gr.init_gfxp_wfi_timeout_count(g); | ||
4844 | 4844 | ||
4845 | nvgpu_mutex_init(&gr->ctx_mutex); | 4845 | nvgpu_mutex_init(&gr->ctx_mutex); |
4846 | nvgpu_spinlock_init(&gr->ch_tlb_lock); | 4846 | nvgpu_spinlock_init(&gr->ch_tlb_lock); |