Re: [PATCH v4 4/5] arm64: dts: sdm845: Add OPP tables and power-domains for venus

From: Stanimir Varbanov
Date: Fri Jul 24 2020 - 06:16:30 EST


Hi,

On 7/24/20 11:49 AM, Rajendra Nayak wrote:
> Hey Stan,
>
> On 7/23/2020 11:36 PM, Stanimir Varbanov wrote:
>> Hi Rajendra,
>>
>> After applying 2,3 and 4/5 patches on linaro-integration v5.8-rc2 I see
>> below messages on db845:
>>
>> qcom-venus aa00000.video-codec: dev_pm_opp_set_rate: failed to find
>> current OPP for freq 533000097 (-34)
>>
>> ^^^ This one is new.
>
> I was hoping to be able to reproduce this on the 845 mtp (I don't have
> a db845), but I can;t seem to get venus working on mainline [1]
> (neither with linux-next, nor with linaro integration)

The driver should at least load without errors on -next and
linaro-integration for db845. As to MTP and haven't checked because I
don't have such board with me.

I will try to debug dev_pm_opp_set_rate -ERANGE error.

> Do you know if I might be missing some fix?
>
>>
>> qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x30000
>>
>> ^^^ and this message is annoying, can we make it pr_debug in rpmh?
>
> Sure, I'll send a patch for that and see what the rpmh owners have to say.
>
> [1]
>
> [ÂÂÂ 1.632147] qcom-venus aa00000.video-codec: Adding to iommu group 2
> [ÂÂÂ 1.638920] qcom-venus aa00000.video-codec: non legacy binding
> [ÂÂÂ 1.648313] ------------[ cut here ]------------
> [ÂÂÂ 1.652976] video_cc_venus_ctl_axi_clk status stuck at 'off'

I guess this means that venus_gdsc is not powered on.

> [ÂÂÂ 1.653068] WARNING: CPU: 7 PID: 1 at
> drivers/clk/qcom/clk-branch.c:92 clk_b8
> [ÂÂÂ 1.667977] Modules linked in:
> [ÂÂÂ 1.671076] CPU: 7 PID: 1 Comm: swapper/0 Not tainted
> 5.8.0-rc6-00254-gc43551
> [ÂÂÂ 1.678704] Hardware name: Qualcomm Technologies, Inc. SDM845 MTP (DT)
> [ÂÂÂ 1.685294] pstate: 60c00085 (nZCv daIf +PAN +UAO BTYPE=--)
> [ÂÂÂ 1.690911] pc : clk_branch_toggle+0x14c/0x168
> [ÂÂÂ 1.695397] lr : clk_branch_toggle+0x14c/0x168
> [ÂÂÂ 1.699881] sp : ffff80001005b900
> [ÂÂÂ 1.703232] x29: ffff80001005b900 x28: ffffb58586ac2f38
> [ÂÂÂ 1.708594] x27: ffff0000f86c6d48 x26: ffffb58586f09000
> [ÂÂÂ 1.713953] x25: ffffb585867c0bd8 x24: 0000000000000000
> [ÂÂÂ 1.719312] x23: ffffb5858702df28 x22: ffffb58585a3c6a8
> [ÂÂÂ 1.724672] x21: 0000000000000001 x20: ffffb58586f09000
> [ÂÂÂ 1.730031] x19: 0000000000000000 x18: ffffb58586f09948
> [ÂÂÂ 1.735390] x17: 0000000000000001 x16: 0000000000000019
> [ÂÂÂ 1.740749] x15: ffff80009005b5a7 x14: 0000000000000006
> [ÂÂÂ 1.746107] x13: ffff80001005b5b5 x12: ffffb58586f21d68
> [ÂÂÂ 1.751466] x11: 0000000000000000 x10: 0000000005f5e0ff
> [ÂÂÂ 1.756825] x9 : ffff80001005b900 x8 : 2766666f27207461
> [ÂÂÂ 1.762184] x7 : 206b637574732073 x6 : ffffb58587141848
> [ÂÂÂ 1.767543] x5 : 0000000000000000 x4 : 0000000000000000
> [ÂÂÂ 1.772902] x3 : 00000000ffffffff x2 : ffff4a7b76cd8000
> [ÂÂÂ 1.778261] x1 : ad405f90446fcf00 x0 : 0000000000000000
> [ÂÂÂ 1.783624] Call trace:
> [ÂÂÂ 1.786103]Â clk_branch_toggle+0x14c/0x168
> [ÂÂÂ 1.790241]Â clk_branch2_enable+0x18/0x20
> [ÂÂÂ 1.794306]Â clk_core_enable+0x60/0xa8
> [ÂÂÂ 1.798090]Â clk_core_enable_lock+0x20/0x40
> [ÂÂÂ 1.802316]Â clk_enable+0x14/0x28
> [ÂÂÂ 1.805682]Â core_clks_enable+0x94/0xd8
> [ÂÂÂ 1.809562]Â core_power_v4+0x48/0x50
> [ÂÂÂ 1.813178]Â venus_runtime_resume+0x24/0x40
> [ÂÂÂ 1.817417]Â pm_generic_runtime_resume+0x28/0x40
> [ÂÂÂ 1.822079]Â __rpm_callback+0xa0/0x138
> [ÂÂÂ 1.825861]Â rpm_callback+0x24/0x98
> [ÂÂÂ 1.829390]Â rpm_resume+0x32c/0x490
> [ÂÂÂ 1.832917]Â __pm_runtime_resume+0x38/0x88
> [ÂÂÂ 1.837051]Â venus_probe+0x1f0/0x34c
> [ÂÂÂ 1.840667]Â platform_drv_probe+0x4c/0xa8
> [ÂÂÂ 1.844727]Â really_probe+0x100/0x388
> [ÂÂÂ 1.848428]Â driver_probe_device+0x54/0xb8
> [ÂÂÂ 1.852563]Â device_driver_attach+0x6c/0x78
> [ÂÂÂ 1.856790]Â __driver_attach+0xb0/0xf0
> [ÂÂÂ 1.860576]Â bus_for_each_dev+0x68/0xc8
> [ÂÂÂ 1.864456]Â driver_attach+0x20/0x28
> [ÂÂÂ 1.868064]Â bus_add_driver+0x148/0x200
> [ÂÂÂ 1.871941]Â driver_register+0x60/0x110
> [ÂÂÂ 1.875819]Â __platform_driver_register+0x44/0x50
> [ÂÂÂ 1.880576]Â qcom_venus_driver_init+0x18/0x20
> [ÂÂÂ 1.884990]Â do_one_initcall+0x58/0x1a0
> [ÂÂÂ 1.888878]Â kernel_init_freeable+0x1fc/0x28c
> [ÂÂÂ 1.893292]Â kernel_init+0x10/0x108
> [ÂÂÂ 1.896821]Â ret_from_fork+0x10/0x1c
> [ÂÂÂ 1.900441] ---[ end trace f12a7e5e182f3e4e ]---
> [ÂÂÂ 1.906415] qcom-venus: probe of aa00000.video-codec failed with
> error -16
>
>>
>> On 7/23/20 2:26 PM, Rajendra Nayak wrote:
>>> Add the OPP tables in order to be able to vote on the performance
>>> state of
>>> a power-domain.
>>>
>>> Signed-off-by: Rajendra Nayak <rnayak@xxxxxxxxxxxxxx>
>>> ---
>>> Â arch/arm64/boot/dts/qcom/sdm845.dtsi | 40
>>> ++++++++++++++++++++++++++++++++++--
>>> Â 1 file changed, 38 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> index e506793..5ca2265 100644
>>> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
>>> @@ -3631,8 +3631,10 @@
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ power-domains = <&videocc VENUS_GDSC>,
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&videocc VCODEC0_GDSC>,
>>> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&videocc VCODEC1_GDSC>;
>>> -ÂÂÂÂÂÂÂÂÂÂÂ power-domain-names = "venus", "vcodec0", "vcodec1";
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&videocc VCODEC1_GDSC>,
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&rpmhpd SDM845_CX>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂ power-domain-names = "venus", "vcodec0", "vcodec1", "cx";
>>> +ÂÂÂÂÂÂÂÂÂÂÂ operating-points-v2 = <&venus_opp_table>;
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>,
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&videocc VIDEO_CC_VENUS_AHB_CLK>,
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>,
>>> @@ -3654,6 +3656,40 @@
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ video-core1 {
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ compatible = "venus-encoder";
>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂ venus_opp_table: venus-opp-table {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ compatible = "operating-points-v2";
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-100000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <100000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_min_svs>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-200000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <200000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_low_svs>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-320000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <320000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_svs>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-380000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <380000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_svs_l1>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-444000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <444000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_nom>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-533000000 {
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ opp-hz = /bits/ 64 <533000000>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ required-opps = <&rpmhpd_opp_turbo>;
>>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ };
>>> +ÂÂÂÂÂÂÂÂÂÂÂ };
>>> ÂÂÂÂÂÂÂÂÂ };
>>> Â ÂÂÂÂÂÂÂÂÂ videocc: clock-controller@ab00000 {
>>>
>>
>

--
regards,
Stan