mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
bug 1648908 This commit adds support for FECS ctxsw tracing. Code is compiled conditionnaly under CONFIG_GK20_CTXSW_TRACE. This feature requires an updated FECS ucode that writes one record to a ring buffer on each context switch. On RM/Kernel side, the GPU driver reads records from the master ring buffer and generates trace entries into a user-facing VM ring buffer. For each record in the master ring buffer, RM/Kernel has to retrieve the vmid+pid of the user process that submitted related work. Features currently implemented: - master ring buffer allocation - debugfs to dump master ring buffer - FECS record per context switch (with both current and new contexts) - dedicated device for ctxsw tracing (access to VM ring buffer) - SOF generation (and access to PTIMER) - VM ring buffer allocation, and reconfiguration - enable/disable tracing at user level - event-based trace filtering - context_ptr to vmid+pid mapping - read system call for ctxsw dev - mmap system call for ctxsw dev (direct access to VM ring buffer) - poll system call for ctxsw dev - save/restore register on ELPG/CG6 - separate user ring from FECS ring handling Features requiring ucode changes: - enable/disable tracing at FECS level - actual busy time on engine (bug 1642354) - master ring buffer threshold interrupt (P1) - API for GPU to CPU timestamp conversion (P1) - vmid/pid/uid based filtering (P1) Change-Id: I8e39c648221ee0fa09d5df8524b03dca83fe24f3 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1022737 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
101 lines
2.3 KiB
Makefile
101 lines
2.3 KiB
Makefile
GCOV_PROFILE := y
|
|
|
|
ccflags-y += -Idrivers/gpu/nvgpu
|
|
ccflags-y += -Idrivers/video/tegra/host
|
|
ccflags-y += -Idrivers/devfreq
|
|
ccflags-y += -Wno-multichar
|
|
ccflags-y += -Werror
|
|
ccflags-y += -Wno-error=cpp
|
|
|
|
ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y)
|
|
ccflags-y += -I$(srctree)/../kernel-t18x/drivers/gpu/nvgpu
|
|
ccflags-y += -I$(srctree)/../kernel-t18x/include
|
|
ccflags-y += -I$(srctree)/../kernel-t18x/include/uapi
|
|
endif
|
|
|
|
obj-$(CONFIG_GK20A) := nvgpu.o
|
|
|
|
nvgpu-y := \
|
|
gk20a/gk20a.o \
|
|
gk20a/as_gk20a.o \
|
|
gk20a/ctrl_gk20a.o \
|
|
gk20a/ce2_gk20a.o \
|
|
gk20a/fifo_gk20a.o \
|
|
gk20a/channel_gk20a.o \
|
|
gk20a/channel_sync_gk20a.o \
|
|
gk20a/debug_gk20a.o \
|
|
gk20a/dbg_gpu_gk20a.o \
|
|
gk20a/regops_gk20a.o \
|
|
gk20a/gr_gk20a.o \
|
|
gk20a/kind_gk20a.o \
|
|
gk20a/mm_gk20a.o \
|
|
gk20a/pmu_gk20a.o \
|
|
gk20a/priv_ring_gk20a.o \
|
|
gk20a/semaphore_gk20a.o \
|
|
gk20a/fence_gk20a.o \
|
|
gk20a/therm_gk20a.o \
|
|
gk20a/gr_ctx_gk20a_sim.o \
|
|
gk20a/gr_ctx_gk20a.o \
|
|
gk20a/gk20a_gating_reglist.o \
|
|
gk20a/gk20a_sysfs.o \
|
|
gk20a/ltc_gk20a.o \
|
|
gk20a/fb_gk20a.o \
|
|
gk20a/hal.o \
|
|
gk20a/hal_gk20a.o \
|
|
gk20a/gk20a_allocator.o \
|
|
gk20a/cde_gk20a.o \
|
|
gk20a/platform_gk20a_generic.o \
|
|
gk20a/tsg_gk20a.o \
|
|
gk20a/ctxsw_trace_gk20a.o \
|
|
gk20a/fecs_trace_gk20a.o \
|
|
gk20a/mc_gk20a.o \
|
|
gm20b/hal_gm20b.o \
|
|
gm20b/ltc_gm20b.o \
|
|
gm20b/ce2_gm20b.o \
|
|
gm20b/gr_gm20b.o \
|
|
gm20b/gr_gm20b.o \
|
|
gm20b/fb_gm20b.o \
|
|
gm20b/fifo_gm20b.o \
|
|
gm20b/gr_ctx_gm20b.o \
|
|
gm20b/gm20b_gating_reglist.o \
|
|
gm20b/acr_gm20b.o \
|
|
gm20b/pmu_gm20b.o \
|
|
gm20b/mm_gm20b.o \
|
|
gm20b/regops_gm20b.o \
|
|
gm20b/mc_gm20b.o \
|
|
gm20b/debug_gm20b.o \
|
|
gm20b/cde_gm20b.o \
|
|
gm20b/therm_gm20b.o
|
|
nvgpu-$(CONFIG_TEGRA_GK20A) += gk20a/platform_gk20a_tegra.o
|
|
nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o
|
|
|
|
nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
|
|
gk20a/platform_vgpu_tegra.o \
|
|
vgpu/ltc_vgpu.o \
|
|
vgpu/gr_vgpu.o \
|
|
vgpu/fifo_vgpu.o \
|
|
vgpu/ce2_vgpu.o \
|
|
vgpu/mm_vgpu.o \
|
|
vgpu/debug_vgpu.o \
|
|
vgpu/vgpu.o \
|
|
vgpu/dbg_vgpu.o \
|
|
vgpu/fecs_trace_vgpu.o \
|
|
vgpu/gk20a/vgpu_hal_gk20a.o \
|
|
vgpu/gk20a/vgpu_gr_gk20a.o \
|
|
vgpu/gm20b/vgpu_hal_gm20b.o \
|
|
vgpu/gm20b/vgpu_gr_gm20b.o
|
|
|
|
nvgpu-$(CONFIG_TEGRA_CLK_FRAMEWORK) += \
|
|
gm20b/clk_gm20b.o \
|
|
gk20a/clk_gk20a.o
|
|
|
|
nvgpu-$(CONFIG_GK20A_DEVFREQ) += \
|
|
gk20a/gk20a_scale.o
|
|
|
|
nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \
|
|
gk20a/css_gr_gk20a.o
|
|
|
|
ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y)
|
|
include ../kernel-t18x/drivers/gpu/nvgpu/Makefile
|
|
endif
|