summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/regops_gk20a.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
index b1c25ac9..1696f759 100644
--- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
@@ -405,7 +405,8 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s,
405 405
406 ok = validate_reg_ops(dbg_s, 406 ok = validate_reg_ops(dbg_s,
407 &ctx_rd_count, &ctx_wr_count, 407 &ctx_rd_count, &ctx_wr_count,
408 ops, num_ops) || g->allow_all; 408 ops, num_ops);
409
409 if (!ok) { 410 if (!ok) {
410 dev_err(dbg_s->dev, "invalid op(s)"); 411 dev_err(dbg_s->dev, "invalid op(s)");
411 err = -EINVAL; 412 err = -EINVAL;
@@ -678,6 +679,7 @@ static bool validate_reg_ops(struct dbg_session_gk20a *dbg_s,
678 u32 i; 679 u32 i;
679 int err; 680 int err;
680 bool ok = true; 681 bool ok = true;
682 struct gk20a *g = dbg_s->g;
681 683
682 /* keep going until the end so every op can get 684 /* keep going until the end so every op can get
683 * a separate error code if needed */ 685 * a separate error code if needed */
@@ -693,8 +695,11 @@ static bool validate_reg_ops(struct dbg_session_gk20a *dbg_s,
693 (*ctx_wr_count)++; 695 (*ctx_wr_count)++;
694 } 696 }
695 697
696 err = validate_reg_op_offset(dbg_s, &ops[i]); 698 /* if "allow_all" flag enabled, dont validate offset */
697 ok &= !err; 699 if (!g->allow_all) {
700 err = validate_reg_op_offset(dbg_s, &ops[i]);
701 ok &= !err;
702 }
698 } 703 }
699 704
700 gk20a_dbg(gpu_dbg_gpu_dbg, "ctx_wrs:%d ctx_rds:%d", 705 gk20a_dbg(gpu_dbg_gpu_dbg, "ctx_wrs:%d ctx_rds:%d",