mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "soc: qcom: add CDSP request manager"
This commit is contained in:
commit
ee26b2fc8a
5 changed files with 1380 additions and 0 deletions
|
|
@ -725,6 +725,16 @@ config QCOM_SOC_SLEEP_STATS
|
|||
various SoC level low power modes statistics and export to sysfs
|
||||
interface.
|
||||
|
||||
config QCOM_CDSP_RM
|
||||
tristate "CDSP request manager"
|
||||
depends on QCOM_GLINK
|
||||
help
|
||||
This driver serves CDSP requests for CPU L3 clock and CPU QoS thus
|
||||
improving CDSP performance. Using this driver, CDSP can set appropriate
|
||||
CPU L3 clock for improving IO-Coherent throughput and opt for QoS mode
|
||||
to improve RPC latency. The driver also registers cooling devices for
|
||||
CDSP subsystem and implements Cx ipeak limit management.
|
||||
|
||||
config QCOM_WATCHDOG
|
||||
tristate "Qualcomm Watchdog Support"
|
||||
depends on ARCH_QCOM
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ obj-$(CONFIG_QTI_RPM_STATS_LOG) += rpmh_master_stat.o
|
|||
obj-$(CONFIG_QPNP_PBS) += qpnp-pbs.o
|
||||
obj-$(CONFIG_QCOM_WATCHDOG) += qcom_watchdog.o
|
||||
obj-$(CONFIG_MSM_SPCOM) += spcom.o
|
||||
obj-$(CONFIG_QCOM_CDSP_RM) += cdsprm.o
|
||||
obj-$(CONFIG_QCOM_FSA4480_I2C) += fsa4480-i2c.o
|
||||
obj-$(CONFIG_QCOM_EUD) += eud.o
|
||||
obj-$(CONFIG_QCOM_GUESTVM) += guestvm_loader.o
|
||||
|
|
|
|||
1244
drivers/soc/qcom/cdsprm.c
Normal file
1244
drivers/soc/qcom/cdsprm.c
Normal file
File diff suppressed because it is too large
Load diff
42
include/linux/soc/qcom/cdsprm.h
Normal file
42
include/linux/soc/qcom/cdsprm.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This header is for cdspl3 devfreq governor in drivers/devfreq.
|
||||
*/
|
||||
|
||||
#ifndef __QCOM_CDSPRM_H__
|
||||
#define __QCOM_CDSPRM_H__
|
||||
|
||||
/**
|
||||
* struct cdsprm_l3 - register with set L3 clock frequency method
|
||||
* @set_l3_freq: Sets desired L3 clock frequency in kilo-hertz.
|
||||
* cdsprm module would call this method to set L3
|
||||
* clock frequency as requested by CDSP subsystem.
|
||||
*/
|
||||
struct cdsprm_l3 {
|
||||
int (*set_l3_freq)(unsigned int freq_khz);
|
||||
};
|
||||
|
||||
/**
|
||||
* cdsprm_register_cdspl3gov() - Register a method to set L3 clock
|
||||
* frequency
|
||||
* @arg: cdsprm_l3 structure with set L3 clock frequency method
|
||||
*
|
||||
* Note: To be called from cdspl3 governor only. Called when the governor is
|
||||
* started.
|
||||
*/
|
||||
void cdsprm_register_cdspl3gov(struct cdsprm_l3 *arg);
|
||||
|
||||
/**
|
||||
* cdsprm_unregister_cdspl3gov() - Unregister the method to set L3 clock
|
||||
* frequency
|
||||
*
|
||||
* Note: To be called from cdspl3 governor only. Called when the governor is
|
||||
* stopped
|
||||
*/
|
||||
void cdsprm_unregister_cdspl3gov(void);
|
||||
|
||||
#endif
|
||||
83
include/linux/soc/qcom/cdsprm_cxlimit.h
Normal file
83
include/linux/soc/qcom/cdsprm_cxlimit.h
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __QCOM_CDSPRM_LIMITS_H__
|
||||
#define __QCOM_CDSPRM_LIMITS_H__
|
||||
|
||||
enum cdsprm_npu_corner {
|
||||
CDSPRM_NPU_CLK_OFF = 0,
|
||||
CDSPRM_NPU_MIN_SVS,
|
||||
CDSPRM_NPU_LOW_SVS,
|
||||
CDSPRM_NPU_SVS,
|
||||
CDSPRM_NPU_SVS_L1,
|
||||
CDSPRM_NPU_NOM,
|
||||
CDSPRM_NPU_NOM_L1,
|
||||
CDSPRM_NPU_TURBO,
|
||||
CDSPRM_NPU_TURBO_L1,
|
||||
};
|
||||
|
||||
struct cdsprm_npu_limit_cbs {
|
||||
int (*set_corner_limit)(enum cdsprm_npu_corner);
|
||||
};
|
||||
|
||||
enum cdsprm_compute_priority {
|
||||
CDSPRM_COMPUTE_HVX_MAX = 1,
|
||||
CDSPRM_COMPUTE_AIX_MAX = 2,
|
||||
CDSPRM_COMPUTE_HVX_OVER_AIX = 3,
|
||||
CDSPRM_COMPUTE_AIX_OVER_HVX = 4,
|
||||
CDSPRM_COMPUTE_BALANCED = 5,
|
||||
};
|
||||
|
||||
int cdsprm_compute_core_set_priority(enum cdsprm_compute_priority);
|
||||
|
||||
/* For NPU driver */
|
||||
|
||||
/**
|
||||
* cdsprm_cxlimit_npu_limit_register() - Register NPU corner limit method with
|
||||
* cdspprm cxlimit driver.
|
||||
* @arg: cdsprm_npu_limit_cbs structure with set_corner_limit method defined
|
||||
*
|
||||
* Note: To be called from NPU driver only.
|
||||
*/
|
||||
int cdsprm_cxlimit_npu_limit_register(const struct cdsprm_npu_limit_cbs *arg);
|
||||
/**
|
||||
* cdsprm_cxlimit_npu_limit_deregister() - deregister NPU corner limit
|
||||
* notification from cdsprm cxlimit driver.
|
||||
*
|
||||
* Note: To be called from NPU driver only.
|
||||
*/
|
||||
int cdsprm_cxlimit_npu_limit_deregister(void);
|
||||
/**
|
||||
* cdsprm_cxlimit_npu_activity_notify() - Notify NPU activity status to
|
||||
* cdsprm cxlimit driver.
|
||||
* @arg: b_enabled 0 - After NPU activity stop
|
||||
* 1 - Before NPU activity start
|
||||
*
|
||||
* Note: To be called from NPU driver only.
|
||||
*/
|
||||
int cdsprm_cxlimit_npu_activity_notify(unsigned int b_enabled);
|
||||
/**
|
||||
* cdsprm_cxlimit_npu_corner_notify() - Notify cdsprm cxlimit driver of NPU
|
||||
* corner request.
|
||||
* @arg: enum cdsprm_npu_corner - NPU corner value.
|
||||
* CDSPRM_NPU_CLK_OFF for clock off notification.
|
||||
*
|
||||
* Note: To be called from NPU driver only.
|
||||
*/
|
||||
enum cdsprm_npu_corner cdsprm_cxlimit_npu_corner_notify(enum cdsprm_npu_corner);
|
||||
|
||||
/* For Camera driver */
|
||||
|
||||
/**
|
||||
* cdsprm_cxlimit_camera_activity_notify() - Notify cdsprm cxlimit driver of
|
||||
* Camera activity
|
||||
* @arg: b_enabled 0 - After Camera activity stop
|
||||
* 1 - Before Camera activity start
|
||||
*
|
||||
* Note: To be called from Camera driver only.
|
||||
*/
|
||||
int cdsprm_cxlimit_camera_activity_notify(unsigned int b_enabled);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue