mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fecs ctxsw trace for gm20b
Register gk20a non-arch-specific functions for gm20b gpu_ops.fecs_trace, Register nvgpu_os_linux_ops.fecs_trace.init_debugfs gp10b_fecs_trace_flush is now replaced by gm20b_fecs_trace_flush in fecs_trace_gm20b.* and the fecs_trace_gp10b.* files are removed. Bug 2052906 Change-Id: I245c91ae8e6015b87bafeb3ec023b98fe4c57501 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2115247 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
27625718c4
commit
543a904e63
@@ -256,6 +256,7 @@ nvgpu-y += \
|
||||
gm20b/pmu_gm20b.o \
|
||||
gm20b/mm_gm20b.o \
|
||||
gm20b/regops_gm20b.o \
|
||||
gm20b/fecs_trace_gm20b.o \
|
||||
boardobj/boardobj.o \
|
||||
boardobj/boardobjgrp.o \
|
||||
boardobj/boardobjgrpmask.o \
|
||||
@@ -302,7 +303,6 @@ nvgpu-y += \
|
||||
gp10b/pmu_gp10b.o \
|
||||
gp10b/hal_gp10b.o \
|
||||
gp10b/regops_gp10b.o \
|
||||
gp10b/fecs_trace_gp10b.o \
|
||||
gp10b/gp10b.o \
|
||||
gp10b/ecc_gp10b.o \
|
||||
gp106/hal_gp106.o \
|
||||
|
||||
@@ -172,6 +172,7 @@ srcs := os/posix/nvgpu.c \
|
||||
gm20b/pmu_gm20b.c \
|
||||
gm20b/mm_gm20b.c \
|
||||
gm20b/regops_gm20b.c \
|
||||
gm20b/fecs_trace_gm20b.c \
|
||||
gp10b/gr_gp10b.c \
|
||||
gp10b/gr_ctx_gp10b.c \
|
||||
gp10b/ce_gp10b.c \
|
||||
@@ -181,7 +182,6 @@ srcs := os/posix/nvgpu.c \
|
||||
gp10b/hal_gp10b.c \
|
||||
gp10b/regops_gp10b.c \
|
||||
gp10b/clk_arb_gp10b.c \
|
||||
gp10b/fecs_trace_gp10b.c \
|
||||
gp10b/gp10b.c \
|
||||
gp10b/ecc_gp10b.c \
|
||||
gv11b/gv11b.c \
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
|
||||
#include "gk20a/fecs_trace_gk20a.h"
|
||||
|
||||
#include "fecs_trace_gp10b.h"
|
||||
#include "fecs_trace_gm20b.h"
|
||||
|
||||
#include <nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h>
|
||||
#include <nvgpu/hw/gp10b/hw_gr_gp10b.h>
|
||||
#include <nvgpu/hw/gm20b/hw_ctxsw_prog_gm20b.h>
|
||||
#include <nvgpu/hw/gm20b/hw_gr_gm20b.h>
|
||||
|
||||
#ifdef CONFIG_GK20A_CTXSW_TRACE
|
||||
int gp10b_fecs_trace_flush(struct gk20a *g)
|
||||
int gm20b_fecs_trace_flush(struct gk20a *g)
|
||||
{
|
||||
struct fecs_method_op_gk20a op = {
|
||||
.mailbox = { .id = 0, .data = 0,
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* GP10B GPU FECS traces
|
||||
* GM20B GPU FECS traces
|
||||
*
|
||||
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
@@ -22,11 +22,11 @@
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef NVGPU_FECS_TRACE_GP10B_H
|
||||
#define NVGPU_FECS_TRACE_GP10B_H
|
||||
#ifndef NVGPU_FECS_TRACE_GM20B_H
|
||||
#define NVGPU_FECS_TRACE_GM20B_H
|
||||
|
||||
struct gk20a;
|
||||
|
||||
int gp10b_fecs_trace_flush(struct gk20a *g);
|
||||
int gm20b_fecs_trace_flush(struct gk20a *g);
|
||||
|
||||
#endif /* NVGPU_FECS_TRACE_GP10B_H */
|
||||
#endif /* NVGPU_FECS_TRACE_GM20B_H */
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <nvgpu/gk20a.h>
|
||||
#include <nvgpu/channel.h>
|
||||
#include <nvgpu/tsg.h>
|
||||
#include <nvgpu/ctxsw_trace.h>
|
||||
|
||||
#include "common/clock_gating/gm20b_gating_reglist.h"
|
||||
#include "common/bus/bus_gm20b.h"
|
||||
@@ -51,6 +52,8 @@
|
||||
#include "gk20a/regops_gk20a.h"
|
||||
#include "gk20a/pmu_gk20a.h"
|
||||
#include "gk20a/gr_gk20a.h"
|
||||
#include "gk20a/fecs_trace_gk20a.h"
|
||||
#include "gm20b/fecs_trace_gm20b.h"
|
||||
|
||||
#include "gr_gm20b.h"
|
||||
#include "fifo_gm20b.h"
|
||||
@@ -484,6 +487,24 @@ static const struct gpu_ops gm20b_ops = {
|
||||
.get_netlist_name = gr_gm20b_get_netlist_name,
|
||||
.is_fw_defined = gr_gm20b_is_firmware_defined,
|
||||
},
|
||||
#ifdef CONFIG_GK20A_CTXSW_TRACE
|
||||
.fecs_trace = {
|
||||
.alloc_user_buffer = gk20a_ctxsw_dev_ring_alloc,
|
||||
.free_user_buffer = gk20a_ctxsw_dev_ring_free,
|
||||
.mmap_user_buffer = gk20a_ctxsw_dev_mmap_buffer,
|
||||
.init = gk20a_fecs_trace_init,
|
||||
.deinit = gk20a_fecs_trace_deinit,
|
||||
.enable = gk20a_fecs_trace_enable,
|
||||
.disable = gk20a_fecs_trace_disable,
|
||||
.is_enabled = gk20a_fecs_trace_is_enabled,
|
||||
.reset = gk20a_fecs_trace_reset,
|
||||
.flush = gm20b_fecs_trace_flush,
|
||||
.poll = gk20a_fecs_trace_poll,
|
||||
.bind_channel = gk20a_fecs_trace_bind_channel,
|
||||
.unbind_channel = gk20a_fecs_trace_unbind_channel,
|
||||
.max_entries = gk20a_gr_max_entries,
|
||||
},
|
||||
#endif /* CONFIG_GK20A_CTXSW_TRACE */
|
||||
.mm = {
|
||||
.support_sparse = gm20b_mm_support_sparse,
|
||||
.gmmu_map = gk20a_locked_gmmu_map,
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
#include "gk20a/gr_gk20a.h"
|
||||
|
||||
#include "gp10b/gr_gp10b.h"
|
||||
#include "gp10b/fecs_trace_gp10b.h"
|
||||
#include "gp10b/mm_gp10b.h"
|
||||
#include "gp10b/ce_gp10b.h"
|
||||
#include "gp10b/regops_gp10b.h"
|
||||
@@ -71,6 +70,7 @@
|
||||
#include "gm20b/pmu_gm20b.h"
|
||||
#include "gm20b/acr_gm20b.h"
|
||||
#include "gm20b/gr_gm20b.h"
|
||||
#include "gm20b/fecs_trace_gm20b.h"
|
||||
|
||||
#include "gp106/acr_gp106.h"
|
||||
#include "gp106/sec2_gp106.h"
|
||||
@@ -570,7 +570,7 @@ static const struct gpu_ops gp106_ops = {
|
||||
.disable = gk20a_fecs_trace_disable,
|
||||
.is_enabled = gk20a_fecs_trace_is_enabled,
|
||||
.reset = gk20a_fecs_trace_reset,
|
||||
.flush = gp10b_fecs_trace_flush,
|
||||
.flush = gm20b_fecs_trace_flush,
|
||||
.poll = gk20a_fecs_trace_poll,
|
||||
.bind_channel = gk20a_fecs_trace_bind_channel,
|
||||
.unbind_channel = gk20a_fecs_trace_unbind_channel,
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "gk20a/gr_gk20a.h"
|
||||
|
||||
#include "gp10b/gr_gp10b.h"
|
||||
#include "gp10b/fecs_trace_gp10b.h"
|
||||
#include "gp10b/mm_gp10b.h"
|
||||
#include "gp10b/ce_gp10b.h"
|
||||
#include "gp10b/pmu_gp10b.h"
|
||||
@@ -76,6 +75,7 @@
|
||||
#include "gm20b/pmu_gm20b.h"
|
||||
#include "gm20b/clk_gm20b.h"
|
||||
#include "gm20b/mm_gm20b.h"
|
||||
#include "gm20b/fecs_trace_gm20b.h"
|
||||
|
||||
#include "gp10b.h"
|
||||
#include "hal_gp10b.h"
|
||||
@@ -537,7 +537,7 @@ static const struct gpu_ops gp10b_ops = {
|
||||
.disable = gk20a_fecs_trace_disable,
|
||||
.is_enabled = gk20a_fecs_trace_is_enabled,
|
||||
.reset = gk20a_fecs_trace_reset,
|
||||
.flush = gp10b_fecs_trace_flush,
|
||||
.flush = gm20b_fecs_trace_flush,
|
||||
.poll = gk20a_fecs_trace_poll,
|
||||
.bind_channel = gk20a_fecs_trace_bind_channel,
|
||||
.unbind_channel = gk20a_fecs_trace_unbind_channel,
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include "gm20b/mm_gm20b.h"
|
||||
#include "gm20b/pmu_gm20b.h"
|
||||
#include "gm20b/acr_gm20b.h"
|
||||
#include "gm20b/fecs_trace_gm20b.h"
|
||||
|
||||
#include "gp106/clk_arb_gp106.h"
|
||||
#include "gp106/pmu_gp106.h"
|
||||
@@ -77,7 +78,6 @@
|
||||
#include "gp10b/gr_gp10b.h"
|
||||
#include "gp10b/ce_gp10b.h"
|
||||
#include "gp10b/fifo_gp10b.h"
|
||||
#include "gp10b/fecs_trace_gp10b.h"
|
||||
#include "gp10b/mm_gp10b.h"
|
||||
#include "gp10b/pmu_gp10b.h"
|
||||
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
#include "gm20b/mm_gm20b.h"
|
||||
#include "gm20b/acr_gm20b.h"
|
||||
#include "gm20b/pmu_gm20b.h"
|
||||
#include "gm20b/fecs_trace_gm20b.h"
|
||||
|
||||
#include "gp10b/ce_gp10b.h"
|
||||
#include "gp10b/fifo_gp10b.h"
|
||||
#include "gp10b/fecs_trace_gp10b.h"
|
||||
#include "gp10b/mm_gp10b.h"
|
||||
#include "gp10b/pmu_gp10b.h"
|
||||
#include "gp10b/gr_gp10b.h"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "cde_gm20b.h"
|
||||
#include "debug_clk_gm20b.h"
|
||||
#include "debug_fecs_trace.h"
|
||||
|
||||
|
||||
static struct nvgpu_os_linux_ops gm20b_os_linux_ops = {
|
||||
#ifdef CONFIG_NVGPU_SUPPORT_CDE
|
||||
@@ -28,6 +30,10 @@ static struct nvgpu_os_linux_ops gm20b_os_linux_ops = {
|
||||
.clk = {
|
||||
.init_debugfs = gm20b_clk_init_debugfs,
|
||||
},
|
||||
|
||||
.fecs_trace = {
|
||||
.init_debugfs = nvgpu_fecs_trace_init_debugfs,
|
||||
},
|
||||
};
|
||||
|
||||
void nvgpu_gm20b_init_os_ops(struct nvgpu_os_linux *l)
|
||||
@@ -36,4 +42,6 @@ void nvgpu_gm20b_init_os_ops(struct nvgpu_os_linux *l)
|
||||
l->ops.cde = gm20b_os_linux_ops.cde;
|
||||
#endif
|
||||
l->ops.clk = gm20b_os_linux_ops.clk;
|
||||
|
||||
l->ops.fecs_trace = gm20b_os_linux_ops.fecs_trace;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user