mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: remove debugger include from regops
Regops does not depend on debug session logically We right now include debugger.h in regops_gk20a.c to extract channel pointer from debug session and to check if session is for profiling or not Update exec_regops_gk20a() to receive channel pointer and profiler flag directly as parameters, and remove dbg_session_gk20a from parameter list Remove ((!dbg_s->is_profiler) && (ch != NULL)) checks from check_whitelists(). Caller of exec_regops_gk20a() already ensures that we have context bound for debug session Use only is_profiler boolean flag in this case which should be sufficient Remove (ch == NULL) check in check_whitelists() if regops is of type gr_ctx. Instead move this check to earlier function call in validate_reg_ops(). If we have non-zero context operation on a profiler session, return error from validate_reg_ops() Update all subsequent calls with appropriate parameter list Remove debugger.h include from regops_gk20a.c Jira NVGPU-620 Change-Id: If857c21da1a43a2230c1f7ef2cc2ad6640ff48d9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1997868 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0ff5a49f45
commit
b3b87cf303
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tegra GK20A GPU Debugger/Profiler Driver
|
||||
*
|
||||
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2019, 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,
|
||||
@@ -882,8 +882,9 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s,
|
||||
if (err)
|
||||
break;
|
||||
|
||||
err = g->ops.regops.exec_regops(
|
||||
dbg_s, g->dbg_regops_tmp_buf, num_ops, &is_current_ctx);
|
||||
err = g->ops.regops.exec_regops(g, ch,
|
||||
g->dbg_regops_tmp_buf, num_ops,
|
||||
dbg_s->is_profiler, &is_current_ctx);
|
||||
|
||||
if (err) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user