diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2015-02-19 08:20:32 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:07:50 -0400 |
commit | f93a8cc36b68500c1d1ae235f929c35c4a039497 (patch) | |
tree | 572392435d4ce0610107bb1732839eb6abe909b2 /drivers/gpu/nvgpu | |
parent | 142c377d60947cd707cff612f06d9f58b72bb7e3 (diff) |
gpu: nvgpu: validate reg ops always
Call validate_reg_ops() even when allow_all is set, since that function
takes care of counting ctxsw regops which would not be executed without
the counters set.
Bug 1517458
Change-Id: Ie6173229fb6580e8812b7d2a52bfa8661f3d95e5
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/709439
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Sandarbh Jain <sanjain@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index 11ab7bc3..ceda48b3 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Tegra GK20A GPU Debugger Driver Register Ops | 2 | * Tegra GK20A GPU Debugger Driver Register Ops |
3 | * | 3 | * |
4 | * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -403,9 +403,9 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, | |||
403 | if (gk20a_gpu_is_virtual(dbg_s->pdev)) | 403 | if (gk20a_gpu_is_virtual(dbg_s->pdev)) |
404 | return -ENOSYS; | 404 | return -ENOSYS; |
405 | 405 | ||
406 | ok = g->allow_all || 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); | 408 | ops, num_ops) || g->allow_all; |
409 | if (!ok) { | 409 | if (!ok) { |
410 | dev_err(dbg_s->dev, "invalid op(s)"); | 410 | dev_err(dbg_s->dev, "invalid op(s)"); |
411 | err = -EINVAL; | 411 | err = -EINVAL; |