From f93a8cc36b68500c1d1ae235f929c35c4a039497 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 19 Feb 2015 15:20:32 +0200 Subject: 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 Reviewed-on: http://git-master/r/709439 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Sandarbh Jain Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') 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 @@ /* * Tegra GK20A GPU Debugger Driver Register Ops * - * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2013-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * 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, if (gk20a_gpu_is_virtual(dbg_s->pdev)) return -ENOSYS; - ok = g->allow_all || validate_reg_ops(dbg_s, + ok = validate_reg_ops(dbg_s, &ctx_rd_count, &ctx_wr_count, - ops, num_ops); + ops, num_ops) || g->allow_all; if (!ok) { dev_err(dbg_s->dev, "invalid op(s)"); err = -EINVAL; -- cgit v1.2.2