[01/53] dt-bindings: interconnect: qcom,icc: Introduce fixed BCM voter indices

Message ID 20230708-topic-rpmh_icc_rsc-v1-1-b223bd2ac8dd@linaro.org
State New
Headers
Series icc-rpmh multi-RSC voting groundwork |

Commit Message

Konrad Dybcio July 11, 2023, 12:18 p.m. UTC
  It makes zero (or less) sense to consume BCM voters per interconnect
provider. They are shared throughout the entire system and it's enough
to keep a single reference to each of them.

Storing them in a shared array at fixed indices will let us improve both
the representation of the RPMh architecture (every RSC can hold a resource
vote on any bus, they're not limited in that regard) and save as much as
kilobytes worth of RAM.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 include/dt-bindings/interconnect/qcom,icc.h | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Krzysztof Kozlowski July 12, 2023, 8:39 p.m. UTC | #1
On 11/07/2023 14:18, Konrad Dybcio wrote:
> It makes zero (or less) sense to consume BCM voters per interconnect
> provider. They are shared throughout the entire system and it's enough
> to keep a single reference to each of them.
> 
> Storing them in a shared array at fixed indices will let us improve both
> the representation of the RPMh architecture (every RSC can hold a resource
> vote on any bus, they're not limited in that regard) and save as much as
> kilobytes worth of RAM.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  include/dt-bindings/interconnect/qcom,icc.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/dt-bindings/interconnect/qcom,icc.h b/include/dt-bindings/interconnect/qcom,icc.h
> index cd34f36daaaa..9c13ef8a044e 100644
> --- a/include/dt-bindings/interconnect/qcom,icc.h
> +++ b/include/dt-bindings/interconnect/qcom,icc.h
> @@ -23,4 +23,12 @@
>  #define QCOM_ICC_TAG_ALWAYS		(QCOM_ICC_TAG_AMC | QCOM_ICC_TAG_WAKE |\
>  					 QCOM_ICC_TAG_SLEEP)
>  
> +#define ICC_BCM_VOTER_APPS		0
> +#define ICC_BCM_VOTER_DISP		1
> +#define ICC_BCM_VOTER_CAM0		2
> +#define ICC_BCM_VOTER_CAM1		3
> +#define ICC_BCM_VOTER_CAM2		4
> +
> +#define ICC_BCM_VOTER_MAX		64

I proposed to skip the max. If you actually use it, you won't be able to
change it ever.


Best regards,
Krzysztof
  
Konrad Dybcio July 15, 2023, 3:09 p.m. UTC | #2
On 12.07.2023 22:39, Krzysztof Kozlowski wrote:
> On 11/07/2023 14:18, Konrad Dybcio wrote:
>> It makes zero (or less) sense to consume BCM voters per interconnect
>> provider. They are shared throughout the entire system and it's enough
>> to keep a single reference to each of them.
>>
>> Storing them in a shared array at fixed indices will let us improve both
>> the representation of the RPMh architecture (every RSC can hold a resource
>> vote on any bus, they're not limited in that regard) and save as much as
>> kilobytes worth of RAM.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  include/dt-bindings/interconnect/qcom,icc.h | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/include/dt-bindings/interconnect/qcom,icc.h b/include/dt-bindings/interconnect/qcom,icc.h
>> index cd34f36daaaa..9c13ef8a044e 100644
>> --- a/include/dt-bindings/interconnect/qcom,icc.h
>> +++ b/include/dt-bindings/interconnect/qcom,icc.h
>> @@ -23,4 +23,12 @@
>>  #define QCOM_ICC_TAG_ALWAYS		(QCOM_ICC_TAG_AMC | QCOM_ICC_TAG_WAKE |\
>>  					 QCOM_ICC_TAG_SLEEP)
>>  
>> +#define ICC_BCM_VOTER_APPS		0
>> +#define ICC_BCM_VOTER_DISP		1
>> +#define ICC_BCM_VOTER_CAM0		2
>> +#define ICC_BCM_VOTER_CAM1		3
>> +#define ICC_BCM_VOTER_CAM2		4
>> +
>> +#define ICC_BCM_VOTER_MAX		64
> 
> I proposed to skip the max. If you actually use it, you won't be able to
> change it ever.
I guess I can just add the max in the driver.

Konrad

> 
> 
> Best regards,
> Krzysztof
>
  

Patch

diff --git a/include/dt-bindings/interconnect/qcom,icc.h b/include/dt-bindings/interconnect/qcom,icc.h
index cd34f36daaaa..9c13ef8a044e 100644
--- a/include/dt-bindings/interconnect/qcom,icc.h
+++ b/include/dt-bindings/interconnect/qcom,icc.h
@@ -23,4 +23,12 @@ 
 #define QCOM_ICC_TAG_ALWAYS		(QCOM_ICC_TAG_AMC | QCOM_ICC_TAG_WAKE |\
 					 QCOM_ICC_TAG_SLEEP)
 
+#define ICC_BCM_VOTER_APPS		0
+#define ICC_BCM_VOTER_DISP		1
+#define ICC_BCM_VOTER_CAM0		2
+#define ICC_BCM_VOTER_CAM1		3
+#define ICC_BCM_VOTER_CAM2		4
+
+#define ICC_BCM_VOTER_MAX		64
+
 #endif