aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/interconnect-provider.h
diff options
context:
space:
mode:
authorGeorgi Djakov <georgi.djakov@linaro.org>2020-08-25 20:01:51 +0300
committerGeorgi Djakov <georgi.djakov@linaro.org>2020-09-18 08:56:52 +0300
commitb1d681d8d32499bcf284462d92aeb5f9fe72bf5b (patch)
tree8c82999b36d2c99a0dc601556bcc2b48ebc9f0fd /include/linux/interconnect-provider.h
parentinterconnect: Add get_bw() callback (diff)
downloadlinux-dev-b1d681d8d32499bcf284462d92aeb5f9fe72bf5b.tar.xz
linux-dev-b1d681d8d32499bcf284462d92aeb5f9fe72bf5b.zip
interconnect: Add sync state support
The bootloaders often do some initial configuration of the interconnects in the system and we want to keep this configuration until all consumers have probed and expressed their bandwidth needs. This is because we don't want to change the configuration by starting to disable unused paths until every user had a chance to request the amount of bandwidth it needs. To accomplish this we will implement an interconnect specific sync_state callback which will synchronize (aggregate and set) the current bandwidth settings when all consumers have been probed. Link: https://lore.kernel.org/r/20200825170152.6434-3-georgi.djakov@linaro.org Reviewed-by: Saravana Kannan <saravanak@google.com> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'include/linux/interconnect-provider.h')
-rw-r--r--include/linux/interconnect-provider.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 520f70fe5a31..f713308b8a8f 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -75,6 +75,8 @@ struct icc_provider {
* @req_list: a list of QoS constraint requests associated with this node
* @avg_bw: aggregated value of average bandwidth requests from all consumers
* @peak_bw: aggregated value of peak bandwidth requests from all consumers
+ * @init_avg: average bandwidth value that is read from the hardware during init
+ * @init_peak: peak bandwidth value that is read from the hardware during init
* @data: pointer to private data
*/
struct icc_node {
@@ -91,6 +93,8 @@ struct icc_node {
struct hlist_head req_list;
u32 avg_bw;
u32 peak_bw;
+ u32 init_avg;
+ u32 init_peak;
void *data;
};
@@ -108,6 +112,7 @@ int icc_nodes_remove(struct icc_provider *provider);
int icc_provider_add(struct icc_provider *provider);
int icc_provider_del(struct icc_provider *provider);
struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
+void icc_sync_state(struct device *dev);
#else