This driver boosts enumerated devfreq devices upon input, and allows for boosting specific devfreq devices on other custom events. The boost frequencies for this driver should be set so that frame drops are near-zero at the boosted frequencies and power consumption is minimized at said frequencies. The goal of this driver is to provide an interface to achieve optimal device performance by requesting boosts on key events, such as when a frame is ready to rendered to the display. Currently, support is only present for boosting the cpu-llcc-ddr-bw devfreq device, but the driver is structured in a way that makes it easy to add support for new boostable devfreq devices in the future. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
35 lines
789 B
C
35 lines
789 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2018-2021 Sultan Alsawaf <sultan@kerneltoast.com>.
|
|
*/
|
|
#ifndef _DEVFREQ_BOOST_H_
|
|
#define _DEVFREQ_BOOST_H_
|
|
|
|
#include <linux/devfreq.h>
|
|
|
|
enum df_device {
|
|
DEVFREQ_CPU_LLCC_DDR_BW,
|
|
DEVFREQ_MAX
|
|
};
|
|
|
|
#ifdef CONFIG_DEVFREQ_BOOST
|
|
void devfreq_boost_kick(enum df_device device);
|
|
void devfreq_boost_kick_max(enum df_device device, unsigned int duration_ms);
|
|
void devfreq_register_boost_device(enum df_device device, struct devfreq *df);
|
|
#else
|
|
static inline
|
|
void devfreq_boost_kick(enum df_device device)
|
|
{
|
|
}
|
|
static inline
|
|
void devfreq_boost_kick_max(enum df_device device, unsigned int duration_ms)
|
|
{
|
|
}
|
|
static inline
|
|
void devfreq_register_boost_device(enum df_device device, struct devfreq *df)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _DEVFREQ_BOOST_H_ */
|