[Nouveau] [PATCH 2/4] pmu/fuc: add macros for pdaemon pwr counters
Martin Peres
martin.peres at free.fr
Sun Feb 14 21:14:27 UTC 2016
On 26/10/15 20:13, Karol Herbst wrote:
> From: Karol Herbst <git at karolherbst.de>
>
> ---
> drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
> index c5ec61f..86b8fd4 100644
> --- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
> +++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
> @@ -66,6 +66,29 @@
> #define NV_PPWR_RFIFO_GET 0x04cc
> #define NV_PPWR_H2D 0x04d0
> #define NV_PPWR_D2H 0x04dc
> +#define NV_PPWR_COUNTER_MASK(i) (0x10 * (i) + 0x0504)
> +#define NV_PPWR_COUNTER_COUNT(i) (0x10 * (i) + 0x0508)
> +#define NV_PPWR_COUNTER_COUNT_RESET 0x80000000
> +#define NV_PPWR_COUNTER_MODE(i) (0x10 * (i) + 0x050c)
> +#define NV_PPWR_COUNTER_MODE_NEVER 0
> +#define NV_PPWR_COUNTER_MODE_IF_ALL 1
> +#define NV_PPWR_COUNTER_MODE_IF_NOT_ALL 2
> +#define NV_PPWR_COUNTER_MODE_ALWAYS 3
> +#define NV_PPWR_COUNTER_SIG_GR_IDLE 0x00000001
> +#define NV_PPWR_COUNTER_SIG_GR_HUB_IDLE 0x00000002
> +#define NV_PPWR_COUNTER_SIG_GR_GPC_IDLE 0x00000004
> +#define NV_PPWR_COUNTER_SIG_GR_ROP_IDLE 0x00000008
> +#define NV_PPWR_COUNTER_SIG_PVLD_IDLE 0x00000010
> +#define NV_PPWR_COUNTER_SIG_PPDEC_IDLE 0x00000020
> +#define NV_PPWR_COUNTER_SIG_PPPP_IDLE 0x00000040
> +#define NV_PPWR_COUNTER_SIG_BFB_PART0_REQ 0x00000080
> +#define NV_PPWR_COUNTER_SIG_FB_PART0_REQ 0x00000100
> +#define NV_PPWR_COUNTER_SIG_PMFB 0x00001000
> +#define NV_PPWR_COUNTER_SIG_PVENC 0x00020000
> +#define NV_PPWR_COUNTER_SIG_PCOPY0_IDLE 0x00080000
> +#define NV_PPWR_COUNTER_SIG_PCOPY1_IDLE 0x00100000
> +#define NV_PPWR_COUNTER_SIG_PCOPY2_IDLE 0x00200000
> +#define NV_PPWR_COUNTER_SIG_PCIE 0x20000000
> #if NVKM_PPWR_CHIPSET < GK208
> #define NV_PPWR_DSCRATCH(i) (4 * (i) + 0x05d0)
> #endif
Why call the signals _IDLE when they are set when the engine is busy and
cleared when idle? This is why I named the bitfield
gt215_pdaemon_counter_busy_signals in envytools.
With this fixed:
Reviewed-by: Martin Peres <martin.peres at free.fr>
More information about the Nouveau
mailing list