diff mbox series

[v2,1/4] dt-bindings: media: venus: Add an optional power domain for perf voting

Message ID 1594878139-3402-2-git-send-email-rnayak@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series DVFS support for Venus | expand

Commit Message

Rajendra Nayak July 16, 2020, 5:42 a.m. UTC
Add an optional power domain which when specified can be used for
setting the performance state of Venus.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
---
This is a resend of https://lore.kernel.org/patchwork/patch/1241077/

 Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml    | 6 +++++-
 Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

Comments

Rob Herring July 16, 2020, 7:59 p.m. UTC | #1
On Thu, Jul 16, 2020 at 11:12:16AM +0530, Rajendra Nayak wrote:
> Add an optional power domain which when specified can be used for
> setting the performance state of Venus.

The h/w suddenly grew a new power island/domain? Seems like an abuse of 
power-domains...

> 
> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
> ---
> This is a resend of https://lore.kernel.org/patchwork/patch/1241077/
> 
>  Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml    | 6 +++++-
>  Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 6 +++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> index 55f2d67..1e8675b 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> @@ -25,12 +25,16 @@ properties:
>      maxItems: 1
>  
>    power-domains:
> -    maxItems: 2
> +    minItems: 2
> +    maxItems: 3
>  
>    power-domain-names:
> +    minItems: 2
> +    maxItems: 3
>      items:
>        - const: venus
>        - const: vcodec0
> +      - const: opp-pd
>  
>    clocks:
>      maxItems: 5
> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> index 157dff8..437286d 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> @@ -25,13 +25,17 @@ properties:
>      maxItems: 1
>  
>    power-domains:
> -    maxItems: 3
> +    minItems: 3
> +    maxItems: 4
>  
>    power-domain-names:
> +    minItems: 3
> +    maxItems: 4
>      items:
>        - const: venus
>        - const: vcodec0
>        - const: vcodec1
> +      - const: opp-pd
>  
>    clocks:
>      maxItems: 7
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
Bjorn Andersson July 16, 2020, 11:43 p.m. UTC | #2
On Wed 15 Jul 22:42 PDT 2020, Rajendra Nayak wrote:

> Add an optional power domain which when specified can be used for
> setting the performance state of Venus.
> 
> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
> ---
> This is a resend of https://lore.kernel.org/patchwork/patch/1241077/
> 
>  Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml    | 6 +++++-
>  Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 6 +++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> index 55f2d67..1e8675b 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
> @@ -25,12 +25,16 @@ properties:
>      maxItems: 1
>  
>    power-domains:
> -    maxItems: 2
> +    minItems: 2
> +    maxItems: 3
>  
>    power-domain-names:
> +    minItems: 2
> +    maxItems: 3
>      items:
>        - const: venus
>        - const: vcodec0
> +      - const: opp-pd

In line with Rob's question, the "opp power-domain" seems like a
software construct, wouldn't this be better named e.g. "cx"?

Regards,
Bjorn

>  
>    clocks:
>      maxItems: 5
> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> index 157dff8..437286d 100644
> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
> @@ -25,13 +25,17 @@ properties:
>      maxItems: 1
>  
>    power-domains:
> -    maxItems: 3
> +    minItems: 3
> +    maxItems: 4
>  
>    power-domain-names:
> +    minItems: 3
> +    maxItems: 4
>      items:
>        - const: venus
>        - const: vcodec0
>        - const: vcodec1
> +      - const: opp-pd
>  
>    clocks:
>      maxItems: 7
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
Rajendra Nayak July 17, 2020, 5:13 a.m. UTC | #3
On 7/17/2020 5:13 AM, Bjorn Andersson wrote:
> On Wed 15 Jul 22:42 PDT 2020, Rajendra Nayak wrote:
> 
>> Add an optional power domain which when specified can be used for
>> setting the performance state of Venus.
>>
>> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
>> ---
>> This is a resend of https://lore.kernel.org/patchwork/patch/1241077/
>>
>>   Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml    | 6 +++++-
>>   Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 6 +++++-
>>   2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> index 55f2d67..1e8675b 100644
>> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> @@ -25,12 +25,16 @@ properties:
>>       maxItems: 1
>>   
>>     power-domains:
>> -    maxItems: 2
>> +    minItems: 2
>> +    maxItems: 3
>>   
>>     power-domain-names:
>> +    minItems: 2
>> +    maxItems: 3
>>       items:
>>         - const: venus
>>         - const: vcodec0
>> +      - const: opp-pd
> 
> In line with Rob's question, the "opp power-domain" seems like a
> software construct, wouldn't this be better named e.g. "cx"?

The reason I chose to call it 'opp-pd' was to signify its the domain
that supports scaling (performance state) and not something that's just
turned on/off. I am fine calling it cx if that makes it look more 'real'

> 
> Regards,
> Bjorn
> 
>>   
>>     clocks:
>>       maxItems: 5
>> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> index 157dff8..437286d 100644
>> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> @@ -25,13 +25,17 @@ properties:
>>       maxItems: 1
>>   
>>     power-domains:
>> -    maxItems: 3
>> +    minItems: 3
>> +    maxItems: 4
>>   
>>     power-domain-names:
>> +    minItems: 3
>> +    maxItems: 4
>>       items:
>>         - const: venus
>>         - const: vcodec0
>>         - const: vcodec1
>> +      - const: opp-pd
>>   
>>     clocks:
>>       maxItems: 7
>> -- 
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>> of Code Aurora Forum, hosted by The Linux Foundation
>>
Rajendra Nayak July 17, 2020, 5:52 a.m. UTC | #4
On 7/17/2020 1:29 AM, Rob Herring wrote:
> On Thu, Jul 16, 2020 at 11:12:16AM +0530, Rajendra Nayak wrote:
>> Add an optional power domain which when specified can be used for
>> setting the performance state of Venus.
> 
> The h/w suddenly grew a new power island/domain? Seems like an abuse of
> power-domains...

The power-domain always existed, we have just managed to survive without
having venus support DVFS and have the domain always be at a high performance
level (set statically by boot code)
Now, if we care to do DVFS and support better PM on the SoC, its important
for the devices to manage this additional power domain (and dynamically
scale it)

That said, if the name 'opp-pd' makes it look like a software construct,
like Bjorn mentioned, I am fine to give it a real name like 'cx-pd'
Does that sound good?

PS: Like I mentioned earlier [1], cx is a shared power island,
not a power island specific to this block, and definitely not a software
pm-domain construct.

[1] https://lore.kernel.org/patchwork/patch/1241077/

> 
>>
>> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
>> ---
>> This is a resend of https://lore.kernel.org/patchwork/patch/1241077/
>>
>>   Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml    | 6 +++++-
>>   Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 6 +++++-
>>   2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> index 55f2d67..1e8675b 100644
>> --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
>> @@ -25,12 +25,16 @@ properties:
>>       maxItems: 1
>>   
>>     power-domains:
>> -    maxItems: 2
>> +    minItems: 2
>> +    maxItems: 3
>>   
>>     power-domain-names:
>> +    minItems: 2
>> +    maxItems: 3
>>       items:
>>         - const: venus
>>         - const: vcodec0
>> +      - const: opp-pd
>>   
>>     clocks:
>>       maxItems: 5
>> diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> index 157dff8..437286d 100644
>> --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
>> @@ -25,13 +25,17 @@ properties:
>>       maxItems: 1
>>   
>>     power-domains:
>> -    maxItems: 3
>> +    minItems: 3
>> +    maxItems: 4
>>   
>>     power-domain-names:
>> +    minItems: 3
>> +    maxItems: 4
>>       items:
>>         - const: venus
>>         - const: vcodec0
>>         - const: vcodec1
>> +      - const: opp-pd
>>   
>>     clocks:
>>       maxItems: 7
>> -- 
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>> of Code Aurora Forum, hosted by The Linux Foundation
>>
Rob Herring July 17, 2020, 6:56 p.m. UTC | #5
On Thu, Jul 16, 2020 at 11:52 PM Rajendra Nayak <rnayak@codeaurora.org> wrote:
>
>
> On 7/17/2020 1:29 AM, Rob Herring wrote:
> > On Thu, Jul 16, 2020 at 11:12:16AM +0530, Rajendra Nayak wrote:
> >> Add an optional power domain which when specified can be used for
> >> setting the performance state of Venus.
> >
> > The h/w suddenly grew a new power island/domain? Seems like an abuse of
> > power-domains...
>
> The power-domain always existed, we have just managed to survive without
> having venus support DVFS and have the domain always be at a high performance
> level (set statically by boot code)
> Now, if we care to do DVFS and support better PM on the SoC, its important
> for the devices to manage this additional power domain (and dynamically
> scale it)
>
> That said, if the name 'opp-pd' makes it look like a software construct,
> like Bjorn mentioned, I am fine to give it a real name like 'cx-pd'
> Does that sound good?

He suggested 'cx' as '-pd' would be redundant. I have no idea what
'cx' means, but fine.

> PS: Like I mentioned earlier [1], cx is a shared power island,
> not a power island specific to this block, and definitely not a software
> pm-domain construct.

Put this context/detail into your patches. Assume I don't remember
what happened last week.

Unfortunately, gmail seems to have no way to filter on unread mails in
reply to my replies and doesn't move the thread up in 'Sent' filter,
so older threads get lost.

Rob

> [1] https://lore.kernel.org/patchwork/patch/1241077/
Rajendra Nayak July 20, 2020, 4:29 a.m. UTC | #6
On 7/18/2020 12:26 AM, Rob Herring wrote:
> On Thu, Jul 16, 2020 at 11:52 PM Rajendra Nayak <rnayak@codeaurora.org> wrote:
>>
>>
>> On 7/17/2020 1:29 AM, Rob Herring wrote:
>>> On Thu, Jul 16, 2020 at 11:12:16AM +0530, Rajendra Nayak wrote:
>>>> Add an optional power domain which when specified can be used for
>>>> setting the performance state of Venus.
>>>
>>> The h/w suddenly grew a new power island/domain? Seems like an abuse of
>>> power-domains...
>>
>> The power-domain always existed, we have just managed to survive without
>> having venus support DVFS and have the domain always be at a high performance
>> level (set statically by boot code)
>> Now, if we care to do DVFS and support better PM on the SoC, its important
>> for the devices to manage this additional power domain (and dynamically
>> scale it)
>>
>> That said, if the name 'opp-pd' makes it look like a software construct,
>> like Bjorn mentioned, I am fine to give it a real name like 'cx-pd'
>> Does that sound good?
> 
> He suggested 'cx' as '-pd' would be redundant. I have no idea what
> 'cx' means, but fine.
> 
>> PS: Like I mentioned earlier [1], cx is a shared power island,
>> not a power island specific to this block, and definitely not a software
>> pm-domain construct.
> 
> Put this context/detail into your patches. Assume I don't remember
> what happened last week.

Thanks Rob, will do when I re-post shortly.

> 
> Unfortunately, gmail seems to have no way to filter on unread mails in
> reply to my replies and doesn't move the thread up in 'Sent' filter,
> so older threads get lost.
> 
> Rob
> 
>> [1] https://lore.kernel.org/patchwork/patch/1241077/
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
index 55f2d67..1e8675b 100644
--- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml
@@ -25,12 +25,16 @@  properties:
     maxItems: 1
 
   power-domains:
-    maxItems: 2
+    minItems: 2
+    maxItems: 3
 
   power-domain-names:
+    minItems: 2
+    maxItems: 3
     items:
       - const: venus
       - const: vcodec0
+      - const: opp-pd
 
   clocks:
     maxItems: 5
diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
index 157dff8..437286d 100644
--- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
@@ -25,13 +25,17 @@  properties:
     maxItems: 1
 
   power-domains:
-    maxItems: 3
+    minItems: 3
+    maxItems: 4
 
   power-domain-names:
+    minItems: 3
+    maxItems: 4
     items:
       - const: venus
       - const: vcodec0
       - const: vcodec1
+      - const: opp-pd
 
   clocks:
     maxItems: 7