diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/sysfs.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index b1e7d1ed..053c1a12 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c | |||
@@ -965,8 +965,10 @@ static ssize_t gfxp_wfi_timeout_count_store(struct device *dev, | |||
965 | if (kstrtoul(buf, 10, &val) < 0) | 965 | if (kstrtoul(buf, 10, &val) < 0) |
966 | return -EINVAL; | 966 | return -EINVAL; |
967 | 967 | ||
968 | if (val >= 100*1000*1000) /* 100ms @ 1Ghz */ | 968 | if (g->ops.gr.get_max_gfxp_wfi_timeout_count) { |
969 | return -EINVAL; | 969 | if (val >= g->ops.gr.get_max_gfxp_wfi_timeout_count(g)) |
970 | return -EINVAL; | ||
971 | } | ||
970 | 972 | ||
971 | gr->gfxp_wfi_timeout_count = val; | 973 | gr->gfxp_wfi_timeout_count = val; |
972 | 974 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c index b35cac90..acd0ad5d 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -209,6 +209,10 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
209 | .set_ctxsw_preemption_mode = | 209 | .set_ctxsw_preemption_mode = |
210 | vgpu_gr_gp10b_set_ctxsw_preemption_mode, | 210 | vgpu_gr_gp10b_set_ctxsw_preemption_mode, |
211 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, | 211 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, |
212 | .init_gfxp_wfi_timeout_count = | ||
213 | gr_gp10b_init_gfxp_wfi_timeout_count, | ||
214 | .get_max_gfxp_wfi_timeout_count = | ||
215 | gr_gp10b_get_max_gfxp_wfi_timeout_count, | ||
212 | }, | 216 | }, |
213 | .fb = { | 217 | .fb = { |
214 | .reset = fb_gk20a_reset, | 218 | .reset = fb_gk20a_reset, |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c index a7491b20..a470377c 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -248,6 +248,10 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
248 | gr_gv11b_handle_tpc_sm_ecc_exception, | 248 | gr_gv11b_handle_tpc_sm_ecc_exception, |
249 | .decode_egpc_addr = gv11b_gr_decode_egpc_addr, | 249 | .decode_egpc_addr = gv11b_gr_decode_egpc_addr, |
250 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, | 250 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, |
251 | .init_gfxp_wfi_timeout_count = | ||
252 | gr_gv11b_init_gfxp_wfi_timeout_count, | ||
253 | .get_max_gfxp_wfi_timeout_count = | ||
254 | gr_gv11b_get_max_gfxp_wfi_timeout_count, | ||
251 | }, | 255 | }, |
252 | .fb = { | 256 | .fb = { |
253 | .reset = gv11b_fb_reset, | 257 | .reset = gv11b_fb_reset, |