mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
interconnect: qcom: Add support for mask-based BCMs
Some BCMs aren't directly associated with the data path (i.e. ACV) and therefore don't communicate using BW. Instead, they are simply enabled/disabled with a simple bit mask. Add support for these. Origin commit retrieved from:2d1573e020
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org> [narmstrong: removed copyright change from original commit] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-1-709474b151cc@linaro.org Fixes:fafc114a46
("interconnect: qcom: Add SM8450 interconnect provider driver") Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit is contained in:
parent
06c2afb862
commit
d8630f050d
@ -83,6 +83,11 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm)
|
||||
|
||||
temp = agg_peak[bucket] * bcm->vote_scale;
|
||||
bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit);
|
||||
|
||||
if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) {
|
||||
bcm->vote_x[bucket] = 0;
|
||||
bcm->vote_y[bucket] = bcm->enable_mask;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 &&
|
||||
|
@ -81,6 +81,7 @@ struct qcom_icc_node {
|
||||
* @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm
|
||||
* @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm
|
||||
* @vote_scale: scaling factor for vote_x and vote_y
|
||||
* @enable_mask: optional mask to send as vote instead of vote_x/vote_y
|
||||
* @dirty: flag used to indicate whether the bcm needs to be committed
|
||||
* @keepalive: flag used to indicate whether a keepalive is required
|
||||
* @aux_data: auxiliary data used when calculating threshold values and
|
||||
@ -97,6 +98,7 @@ struct qcom_icc_bcm {
|
||||
u64 vote_x[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 vote_y[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 vote_scale;
|
||||
u32 enable_mask;
|
||||
bool dirty;
|
||||
bool keepalive;
|
||||
struct bcm_db aux_data;
|
||||
|
Loading…
Reference in New Issue
Block a user