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>
94 lines
2.5 KiB
Plaintext
94 lines
2.5 KiB
Plaintext
config GK20A
|
||
tristate "Nvidia GK20A GPU support"
|
||
default y
|
||
help
|
||
Choose this option if you have an SoC with integrated
|
||
Nvidia GPU IP.
|
||
|
||
config GK20A_DEFAULT_TIMEOUT
|
||
depends on GK20A
|
||
int "Default timeout for submits"
|
||
default 3000
|
||
help
|
||
Default timeout for jobs in milliseconds. Set to zero for no timeout.
|
||
|
||
config GK20A_PMU
|
||
bool "Support GK20A PMU"
|
||
depends on GK20A
|
||
default n
|
||
help
|
||
Say Y here to enable GK20A PMU features.
|
||
|
||
choice
|
||
depends on GK20A
|
||
prompt "Enable GK20A frequency scaling"
|
||
default GK20A_PERFMON
|
||
optional
|
||
help
|
||
Select this entry to enable gk20a scaling
|
||
|
||
config GK20A_PERFMON
|
||
bool "Use Perfmon"
|
||
help
|
||
Select this to enable built-in perfmon scaling.
|
||
The built-in scaling option uses simplistic
|
||
scaling mechanism (if busy, increase frequency and
|
||
decrease frequency if idle).
|
||
|
||
config GK20A_DEVFREQ
|
||
depends on TEGRA_CLK_FRAMEWORK || COMMON_CLK
|
||
bool "Use Devfreq"
|
||
help
|
||
Select this to use devfreq based scaling.
|
||
Devfreq is a common framework that allows using
|
||
variety of different governors and changing
|
||
between governors on the fly. By default, no
|
||
governor is selected.
|
||
|
||
endchoice
|
||
|
||
config GK20A_CYCLE_STATS
|
||
bool "Support GK20A GPU CYCLE STATS"
|
||
depends on GK20A
|
||
default y
|
||
help
|
||
Say Y here to enable the cycle stats debugging features.
|
||
|
||
config GK20A_CTXSW_TRACE
|
||
bool "Support GK20A Context Switch tracing"
|
||
depends on GK20A
|
||
default n
|
||
help
|
||
Enable support for the GK20A Context Switch Tracing. In this mode,
|
||
FECS collects timestamps for contexts loaded on GR engine. This
|
||
allows tracking context switches on GR engine, as well as
|
||
identifying processes that submitted work.
|
||
|
||
config TEGRA_GK20A
|
||
bool "Enable the GK20A GPU on Tegra"
|
||
depends on TEGRA_GRHOST || TEGRA_HOST1X
|
||
depends on GK20A
|
||
default y
|
||
help
|
||
Enable support for the GK20A graphics engine on Tegra
|
||
by adding a Tegra platfrom interface to the GK20A driver.
|
||
The Tegra platform interface requires TEGRA_GRHOST (host1x).
|
||
|
||
config TEGRA_ACR
|
||
bool "Enable HS bin support on GM20B GPU on Tegra"
|
||
depends on GK20A_PMU
|
||
default n
|
||
help
|
||
Enable Support for Loading High Secure binary, and using
|
||
Write Protected Regions (WPR) for storing ucodes, and bootstrap
|
||
PMU, FECS and GPCCS in Low Secure mode.
|
||
|
||
config TEGRA_USE_NA_GPCPLL
|
||
bool "Enable noise aware mode of GM20B GPCPLL on Tegra"
|
||
depends on TEGRA_CLK_FRAMEWORK
|
||
default n
|
||
help
|
||
Enable noise aware (NA) mode of GM20b GPCPLL. In this mode PLL output
|
||
frequency is automatically adjusted when GM20b voltage is fluctuating
|
||
because of transient PMIC or power distribution tree noise.
|