diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 27a42a45..c232c4ab 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> | 46 | #include <nvgpu/hw/gp10b/hw_mc_gp10b.h> |
47 | #include <nvgpu/hw/gp10b/hw_fuse_gp10b.h> | 47 | #include <nvgpu/hw/gp10b/hw_fuse_gp10b.h> |
48 | 48 | ||
49 | #define GFXP_WFI_TIMEOUT_COUNT_DEFAULT 100000 | ||
50 | |||
49 | bool gr_gp10b_is_valid_class(struct gk20a *g, u32 class_num) | 51 | bool gr_gp10b_is_valid_class(struct gk20a *g, u32 class_num) |
50 | { | 52 | { |
51 | bool valid = false; | 53 | bool valid = false; |
@@ -2351,3 +2353,16 @@ void gr_gp10b_init_ctxsw_hdr_data(struct gk20a *g, struct nvgpu_mem *mem) | |||
2351 | nvgpu_mem_wr(g, mem, | 2353 | nvgpu_mem_wr(g, mem, |
2352 | ctxsw_prog_main_image_num_cilp_save_ops_o(), 0); | 2354 | ctxsw_prog_main_image_num_cilp_save_ops_o(), 0); |
2353 | } | 2355 | } |
2356 | |||
2357 | void gr_gp10b_init_gfxp_wfi_timeout_count(struct gk20a *g) | ||
2358 | { | ||
2359 | struct gr_gk20a *gr = &g->gr; | ||
2360 | |||
2361 | gr->gfxp_wfi_timeout_count = GFXP_WFI_TIMEOUT_COUNT_DEFAULT; | ||
2362 | } | ||
2363 | |||
2364 | unsigned long gr_gp10b_get_max_gfxp_wfi_timeout_count(struct gk20a *g) | ||
2365 | { | ||
2366 | /* 100msec @ 1GHZ */ | ||
2367 | return (100 * 1000 * 1000UL); | ||
2368 | } | ||
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h index 55117022..3b0f0f2e 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h | |||
@@ -144,5 +144,7 @@ void gr_gp10b_set_preemption_buffer_va(struct gk20a *g, | |||
144 | int gr_gp10b_set_czf_bypass(struct gk20a *g, struct channel_gk20a *ch); | 144 | int gr_gp10b_set_czf_bypass(struct gk20a *g, struct channel_gk20a *ch); |
145 | void gr_gp10b_init_czf_bypass(struct gk20a *g); | 145 | void gr_gp10b_init_czf_bypass(struct gk20a *g); |
146 | void gr_gp10b_init_ctxsw_hdr_data(struct gk20a *g, struct nvgpu_mem *mem); | 146 | void gr_gp10b_init_ctxsw_hdr_data(struct gk20a *g, struct nvgpu_mem *mem); |
147 | void gr_gp10b_init_gfxp_wfi_timeout_count(struct gk20a *g); | ||
148 | unsigned long gr_gp10b_get_max_gfxp_wfi_timeout_count(struct gk20a *g); | ||
147 | 149 | ||
148 | #endif | 150 | #endif |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index f13c2735..5ae6b638 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -332,6 +332,10 @@ static const struct gpu_ops gp10b_ops = { | |||
332 | .create_gr_sysfs = gr_gp10b_create_sysfs, | 332 | .create_gr_sysfs = gr_gp10b_create_sysfs, |
333 | .set_ctxsw_preemption_mode = gr_gp10b_set_ctxsw_preemption_mode, | 333 | .set_ctxsw_preemption_mode = gr_gp10b_set_ctxsw_preemption_mode, |
334 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, | 334 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, |
335 | .init_gfxp_wfi_timeout_count = | ||
336 | gr_gp10b_init_gfxp_wfi_timeout_count, | ||
337 | .get_max_gfxp_wfi_timeout_count = | ||
338 | gr_gp10b_get_max_gfxp_wfi_timeout_count, | ||
335 | }, | 339 | }, |
336 | .fb = { | 340 | .fb = { |
337 | .reset = fb_gk20a_reset, | 341 | .reset = fb_gk20a_reset, |