devfreq_boost: Update and expand to handle CPUBW/LLCCBW boosting
This will enable us to more accurately replicate Pixel 4 userspace DDR boosting by adding support for both CPUBW and LLCCBW devices. https://android.googlesource.com/device/google/coral/+/refs/heads/master/init.power.rc https://android.googlesource.com/device/google/coral/+/refs/heads/master/powerhint.json Signed-off-by: idkwhoiam322 <idkwhoiam322@raphielgang.org> Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com> Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
committed by
UtsavBalar1231
parent
cd504c975d
commit
77817b0443
@@ -292,7 +292,14 @@ config DEVFREQ_MSM_CPUBW_BOOST_FREQ
|
||||
int "Boost freq for cpubw device"
|
||||
default "0"
|
||||
help
|
||||
Boost frequency for the MSM DDR bus.
|
||||
CPUBW boost frequency for the MSM DDR bus.
|
||||
|
||||
|
||||
config DEVFREQ_MSM_LLCCBW_BOOST_FREQ
|
||||
int "Boost freq for llccbw device"
|
||||
default "0"
|
||||
help
|
||||
LLCCBW boost frequency for the MSM DDR bus.
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -50,7 +50,9 @@ static void devfreq_max_unboost(struct work_struct *work);
|
||||
|
||||
static struct df_boost_drv df_boost_drv_g __read_mostly = {
|
||||
BOOST_DEV_INIT(df_boost_drv_g, DEVFREQ_MSM_CPUBW,
|
||||
CONFIG_DEVFREQ_MSM_CPUBW_BOOST_FREQ)
|
||||
CONFIG_DEVFREQ_MSM_CPUBW_BOOST_FREQ),
|
||||
BOOST_DEV_INIT(df_boost_drv_g, DEVFREQ_MSM_LLCCBW,
|
||||
CONFIG_DEVFREQ_MSM_LLCCBW_BOOST_FREQ)
|
||||
};
|
||||
|
||||
static void __devfreq_boost_kick(struct boost_dev *b)
|
||||
|
||||
@@ -238,9 +238,12 @@ int devfreq_add_devbw(struct device *dev)
|
||||
return PTR_ERR(d->df);
|
||||
}
|
||||
|
||||
if (!strcmp(dev_name(dev), "soc:qcom,cpu-llcc-ddr-bw"))
|
||||
if (!strcmp(dev_name(dev), "soc:qcom,cpu-cpu-llcc-bw"))
|
||||
devfreq_register_boost_device(DEVFREQ_MSM_CPUBW, d->df);
|
||||
|
||||
if (!strcmp(dev_name(dev), "soc:qcom,cpu-llcc-ddr-bw"))
|
||||
devfreq_register_boost_device(DEVFREQ_MSM_LLCCBW, d->df);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2248,8 +2248,10 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
|
||||
(arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
|
||||
return -EINVAL;
|
||||
|
||||
if (!(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY))
|
||||
if (!(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY)) {
|
||||
devfreq_boost_kick(DEVFREQ_MSM_CPUBW);
|
||||
devfreq_boost_kick(DEVFREQ_MSM_LLCCBW);
|
||||
}
|
||||
|
||||
drm_modeset_acquire_init(&ctx, 0);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
enum df_device {
|
||||
DEVFREQ_MSM_CPUBW,
|
||||
DEVFREQ_MSM_LLCCBW,
|
||||
DEVFREQ_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -4217,6 +4217,7 @@ retry:
|
||||
|
||||
/* Boost when memory is low so allocation latency doesn't get too bad */
|
||||
cpu_input_boost_kick_max(100);
|
||||
devfreq_boost_kick_max(DEVFREQ_MSM_LLCCBW, 100);
|
||||
devfreq_boost_kick_max(DEVFREQ_MSM_CPUBW, 100);
|
||||
|
||||
if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
|
||||
|
||||
Reference in New Issue
Block a user