From 9d37d8b78c2dac7fa480493d1ab67b95290b87f1 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 26 Jul 2017 11:13:15 -0700 Subject: gpu: nvgpu: Reorg fecs_trace HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the fecs_trace sub-module of the gpu_ops struct. Perform HAL function assignments in hal_gxxxx.c through the population of a chip-specific copy of gpu_ops. Jira NVGPU-74 Change-Id: I84485ad64997270c6a0fce3c95dc9ceb0094cf6c Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1527419 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h index 4979d6c6..454a33e8 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2017, 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, @@ -14,7 +14,21 @@ #ifndef __FECS_TRACE_GK20A_H #define __FECS_TRACE_GK20A_H -struct gpu_ops; -void gk20a_init_fecs_trace_ops(struct gpu_ops *ops); +struct gk20a; +struct channel_gk20a; +struct nvgpu_ctxsw_trace_filter; + +int gk20a_fecs_trace_poll(struct gk20a *g); +int gk20a_fecs_trace_init(struct gk20a *g); +int gk20a_fecs_trace_bind_channel(struct gk20a *g, + struct channel_gk20a *ch); +int gk20a_fecs_trace_unbind_channel(struct gk20a *g, struct channel_gk20a *ch); +int gk20a_fecs_trace_reset(struct gk20a *g); +int gk20a_fecs_trace_deinit(struct gk20a *g); +int gk20a_gr_max_entries(struct gk20a *g, + struct nvgpu_ctxsw_trace_filter *filter); +int gk20a_fecs_trace_enable(struct gk20a *g); +int gk20a_fecs_trace_disable(struct gk20a *g); +bool gk20a_fecs_trace_is_enabled(struct gk20a *g); #endif /* __FECS_TRACE_GK20A_H */ -- cgit v1.2.2