mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 10:32:25 -04:00
Using pmu counters for usage stats. This enables dynamic frequency scaling on all of the currently supported Tegra gpus. The register offsets are valid for gk20a, gm20b, gp10b, and gv11b. If support is added for ga10b, this will need rearchitected. Signed-off-by: Aaron Kling <webgeek1234@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> [fixed tab alignment in gk20a_devfreq_target()] Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250906-gk20a-devfreq-v2-1-0217f53ee355@gmail.com
25 lines
672 B
C
25 lines
672 B
C
/* SPDX-License-Identifier: MIT */
|
|
#ifndef __GK20A_DEVFREQ_H__
|
|
#define __GK20A_DEVFREQ_H__
|
|
|
|
#include <linux/devfreq.h>
|
|
|
|
struct gk20a_devfreq;
|
|
|
|
#if defined(CONFIG_PM_DEVFREQ)
|
|
int gk20a_devfreq_init(struct nvkm_clk *base, struct gk20a_devfreq **devfreq);
|
|
|
|
int gk20a_devfreq_resume(struct device *dev);
|
|
int gk20a_devfreq_suspend(struct device *dev);
|
|
#else
|
|
static inline int gk20a_devfreq_init(struct nvkm_clk *base, struct gk20a_devfreq **devfreq)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int gk20a_devfreq_resume(struct device dev) { return 0; }
|
|
static inline int gk20a_devfreq_suspend(struct device *dev) { return 0; }
|
|
#endif /* CONFIG_PM_DEVFREQ */
|
|
|
|
#endif /* __GK20A_DEVFREQ_H__ */
|