Re: [PATCH v3 20/23] interconnect: qcom: icc-rpm: Fix bucket number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12.06.2023 22:57, Stephan Gerhold wrote:
> On Mon, Jun 12, 2023 at 08:24:37PM +0200, Konrad Dybcio wrote:
>> SMD RPM only provides two buckets, one each for the active-only and
>> active-sleep RPM contexts. Use the correct constant to allocate and
>> operate on them.
>>
>> This will make the qcom,icc.h header no longer work with this driver,
>> mostly because.. it was never meant to! The commit that introduced
>> bucket support to SMD RPM was trying to shove a square into a round
>> hole and it did not work out very well. That said, there are no
>> active users of SMD RPM ICC + qcom,icc.h, so that doesn't hurt.
>>
>> Fixes: dcbce7b0a79c ("interconnect: qcom: icc-rpm: Support multiple buckets")
>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
>> ---
>>  drivers/interconnect/qcom/icc-rpm.c | 14 +++++++-------
>>  drivers/interconnect/qcom/icc-rpm.h |  4 ++--
>>  2 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
>> index 5ffcf5ca8914..54a9999fe55d 100644
>> --- a/drivers/interconnect/qcom/icc-rpm.c
>> +++ b/drivers/interconnect/qcom/icc-rpm.c
>> @@ -249,7 +249,7 @@ static void qcom_icc_pre_bw_aggregate(struct icc_node *node)
>>  	size_t i;
>>  
>>  	qn = node->data;
>> -	for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
>> +	for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
>>  		qn->sum_avg[i] = 0;
>>  		qn->max_peak[i] = 0;
>>  	}
>> @@ -275,7 +275,7 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
>>  	if (!tag)
>>  		tag = QCOM_ICC_TAG_ALWAYS;
> 
> We should replace this with the RPM variant. Also, can you check which
> header/file still includes qcom,icc.h? Don't think we should have it
> included at all for RPM so that referencing the wrong things cannot
> happen.
Nice catch

Konrad
> 
> Thanks,
> Stephan



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux