diff options
4 files changed, 42 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 665e2ed1..986d3b82 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -328,7 +328,12 @@ static const struct gpu_ops gv11b_ops = { | |||
328 | .enable_exceptions = gr_gv11b_enable_exceptions, | 328 | .enable_exceptions = gr_gv11b_enable_exceptions, |
329 | .get_lrf_tex_ltc_dram_override = get_ecc_override_val, | 329 | .get_lrf_tex_ltc_dram_override = get_ecc_override_val, |
330 | .update_smpc_ctxsw_mode = gr_gk20a_update_smpc_ctxsw_mode, | 330 | .update_smpc_ctxsw_mode = gr_gk20a_update_smpc_ctxsw_mode, |
331 | .get_hw_accessor_stream_out_mode = | ||
332 | gr_gv100_get_hw_accessor_stream_out_mode, | ||
333 | .get_num_hwpm_perfmon = gr_gv100_get_num_hwpm_perfmon, | ||
334 | .set_pmm_register = gr_gv100_set_pmm_register, | ||
331 | .update_hwpm_ctxsw_mode = gr_gk20a_update_hwpm_ctxsw_mode, | 335 | .update_hwpm_ctxsw_mode = gr_gk20a_update_hwpm_ctxsw_mode, |
336 | .init_hwpm_pmm_register = gr_gv100_init_hwpm_pmm_register, | ||
332 | .record_sm_error_state = gv11b_gr_record_sm_error_state, | 337 | .record_sm_error_state = gv11b_gr_record_sm_error_state, |
333 | .clear_sm_error_state = gm20b_gr_clear_sm_error_state, | 338 | .clear_sm_error_state = gm20b_gr_clear_sm_error_state, |
334 | .suspend_contexts = gr_gp10b_suspend_contexts, | 339 | .suspend_contexts = gr_gp10b_suspend_contexts, |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h index 623a8c15..aa8e6190 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -144,6 +144,10 @@ static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void) | |||
144 | { | 144 | { |
145 | return 0x0U; | 145 | return 0x0U; |
146 | } | 146 | } |
147 | static inline u32 ctxsw_prog_main_image_pm_mode_stream_out_ctxsw_f(void) | ||
148 | { | ||
149 | return 0x2U; | ||
150 | } | ||
147 | static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void) | 151 | static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void) |
148 | { | 152 | { |
149 | return 0x7U << 3U; | 153 | return 0x7U << 3U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h index 1d4b2c16..a3341df7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_perf_gv11b.h | |||
@@ -60,6 +60,10 @@ static inline u32 perf_pmmgpc_perdomain_offset_v(void) | |||
60 | { | 60 | { |
61 | return 0x00000200U; | 61 | return 0x00000200U; |
62 | } | 62 | } |
63 | static inline u32 perf_pmmsys_perdomain_offset_v(void) | ||
64 | { | ||
65 | return 0x00000200U; | ||
66 | } | ||
63 | static inline u32 perf_pmmgpc_base_v(void) | 67 | static inline u32 perf_pmmgpc_base_v(void) |
64 | { | 68 | { |
65 | return 0x00180000U; | 69 | return 0x00180000U; |
@@ -232,4 +236,28 @@ static inline u32 perf_pmasys_enginestatus_rbufempty_empty_f(void) | |||
232 | { | 236 | { |
233 | return 0x10U; | 237 | return 0x10U; |
234 | } | 238 | } |
239 | static inline u32 perf_pmmsys_engine_sel_r(u32 i) | ||
240 | { | ||
241 | return 0x0024006cU + i*512U; | ||
242 | } | ||
243 | static inline u32 perf_pmmsys_engine_sel__size_1_v(void) | ||
244 | { | ||
245 | return 0x00000020U; | ||
246 | } | ||
247 | static inline u32 perf_pmmfbp_engine_sel_r(u32 i) | ||
248 | { | ||
249 | return 0x0020006cU + i*512U; | ||
250 | } | ||
251 | static inline u32 perf_pmmfbp_engine_sel__size_1_v(void) | ||
252 | { | ||
253 | return 0x00000020U; | ||
254 | } | ||
255 | static inline u32 perf_pmmgpc_engine_sel_r(u32 i) | ||
256 | { | ||
257 | return 0x0018006cU + i*512U; | ||
258 | } | ||
259 | static inline u32 perf_pmmgpc_engine_sel__size_1_v(void) | ||
260 | { | ||
261 | return 0x00000020U; | ||
262 | } | ||
235 | #endif | 263 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index eac57433..1fc1b0f2 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -81,6 +81,8 @@ | |||
81 | #include <gv11b/gr_ctx_gv11b.h> | 81 | #include <gv11b/gr_ctx_gv11b.h> |
82 | #include <gv11b/gr_gv11b.h> | 82 | #include <gv11b/gr_gv11b.h> |
83 | 83 | ||
84 | #include <gv100/gr_gv100.h> | ||
85 | |||
84 | #include <nvgpu/enabled.h> | 86 | #include <nvgpu/enabled.h> |
85 | #include <nvgpu/channel.h> | 87 | #include <nvgpu/channel.h> |
86 | 88 | ||
@@ -183,6 +185,8 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
183 | .enable_exceptions = NULL, | 185 | .enable_exceptions = NULL, |
184 | .get_lrf_tex_ltc_dram_override = NULL, | 186 | .get_lrf_tex_ltc_dram_override = NULL, |
185 | .update_smpc_ctxsw_mode = vgpu_gr_update_smpc_ctxsw_mode, | 187 | .update_smpc_ctxsw_mode = vgpu_gr_update_smpc_ctxsw_mode, |
188 | .get_hw_accessor_stream_out_mode = | ||
189 | gr_gv100_get_hw_accessor_stream_out_mode, | ||
186 | .update_hwpm_ctxsw_mode = vgpu_gr_update_hwpm_ctxsw_mode, | 190 | .update_hwpm_ctxsw_mode = vgpu_gr_update_hwpm_ctxsw_mode, |
187 | .record_sm_error_state = gv11b_gr_record_sm_error_state, | 191 | .record_sm_error_state = gv11b_gr_record_sm_error_state, |
188 | .clear_sm_error_state = vgpu_gr_clear_sm_error_state, | 192 | .clear_sm_error_state = vgpu_gr_clear_sm_error_state, |