summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
diff options
context:
space:
mode:
authorPeter Boonstoppel <pboonstoppel@nvidia.com>2017-05-02 15:09:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-17 13:24:20 -0400
commit39a9e251da0fb4da8512593d3ce4f6eba47d5e0c (patch)
tree4b0cc5a4c196ba815aff2856034ffbf115cc2fa6 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c
parent65de2a2d65a2d7f748580cbc646438a7b4e99d13 (diff)
gpu: nvgpu: Add czf_bypass sysfs node for gp10b
This change adds a new sysfs node to allow configuring CZF_BYPASS, to enable platforms with low context-switching latency requirements. /sys/devices/17000000.gp10b/czf_bypass Values: 0 - always 1 - lateZ (default) 2 - single pass 3 - never The specified value will apply only to newly allocated contexts. Bug 1914014 Change-Id: Ibb9a8e86089acaadaa7260b00eedec5c80762d6f Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-on: http://git-master/r/1478567 (cherry picked from commit 3bc022cb385b53f698b04f218db535e8162e8c94) Reviewed-on: http://git-master/r/1473820 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index a43252de..1853aaec 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -27,6 +27,7 @@
27#include "gk20a/gk20a.h" 27#include "gk20a/gk20a.h"
28#include "gk20a/gr_gk20a.h" 28#include "gk20a/gr_gk20a.h"
29#include "gk20a/dbg_gpu_gk20a.h" 29#include "gk20a/dbg_gpu_gk20a.h"
30#include "gk20a/regops_gk20a.h"
30 31
31#include "gm20b/gr_gm20b.h" 32#include "gm20b/gr_gm20b.h"
32#include "gp10b/gr_gp10b.h" 33#include "gp10b/gr_gp10b.h"
@@ -2304,6 +2305,22 @@ static void gr_gp10b_write_preemption_ptr(struct gk20a *g,
2304 2305
2305} 2306}
2306 2307
2308int gr_gp10b_set_czf_bypass(struct gk20a *g, struct channel_gk20a *ch)
2309{
2310 struct nvgpu_dbg_gpu_reg_op ops;
2311
2312 ops.op = REGOP(WRITE_32);
2313 ops.type = REGOP(TYPE_GR_CTX);
2314 ops.status = REGOP(STATUS_SUCCESS);
2315 ops.value_hi = 0;
2316 ops.and_n_mask_lo = gr_gpc0_prop_debug1_czf_bypass_m();
2317 ops.and_n_mask_hi = 0;
2318 ops.offset = gr_gpc0_prop_debug1_r();
2319 ops.value_lo = gr_gpc0_prop_debug1_czf_bypass_f(
2320 g->gr.czf_bypass);
2321
2322 return __gr_gk20a_exec_ctx_ops(ch, &ops, 1, 1, 0, false);
2323}
2307 2324
2308void gp10b_init_gr(struct gpu_ops *gops) 2325void gp10b_init_gr(struct gpu_ops *gops)
2309{ 2326{
@@ -2355,4 +2372,5 @@ void gp10b_init_gr(struct gpu_ops *gops)
2355 gops->gr.load_smid_config = gr_gp10b_load_smid_config; 2372 gops->gr.load_smid_config = gr_gp10b_load_smid_config;
2356 gops->gr.set_boosted_ctx = gr_gp10b_set_boosted_ctx; 2373 gops->gr.set_boosted_ctx = gr_gp10b_set_boosted_ctx;
2357 gops->gr.update_boosted_ctx = gr_gp10b_update_boosted_ctx; 2374 gops->gr.update_boosted_ctx = gr_gp10b_update_boosted_ctx;
2375 gops->gr.set_czf_bypass = gr_gp10b_set_czf_bypass;
2358} 2376}