From 7a4cb4a6ab6c861a94e9105360967894df749f03 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Wed, 15 Nov 2017 14:35:43 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1599658 Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h index 692b7ba3..805d8b0e 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h @@ -4292,6 +4292,10 @@ static inline u32 gr_fe_gfxp_wfi_timeout_count_disabled_f(void) { return 0x0U; } +static inline u32 gr_fe_gfxp_wfi_timeout_count_init_f(void) +{ + return 0x800U; +} static inline u32 gr_gpcs_tpcs_sm_texio_control_r(void) { return 0x00419bd8U; @@ -4936,4 +4940,20 @@ static inline u32 gr_fecs_falcon_ecc_uncorrected_err_count_unique_total_v(u32 r) { return (r >> 16U) & 0xffffU; } +static inline u32 gr_debug_2_r(void) +{ + return 0x00400088U; +} +static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_m(void) +{ + return 0x1U << 27U; +} +static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_usec_f(void) +{ + return 0x0U; +} +static inline u32 gr_debug_2_gfxp_wfi_timeout_unit_sysclk_f(void) +{ + return 0x8000000U; +} #endif -- cgit v1.2.2