Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
	"Vikash Garodia" <quic_vgarodia@quicinc.com>,
	"Dikshita Agarwal" <quic_dikshita@quicinc.com>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	<linux-arm-msm@vger.kernel.org>
Subject: Re: Venus probe issues on SM6350 SoC
Date: Mon, 31 Mar 2025 08:43:21 +0200	[thread overview]
Message-ID: <D8U8XDW1QRAY.35U7ER6E74G55@fairphone.com> (raw)
In-Reply-To: <6ae076fc-e30a-431e-b75e-7f9b9d7bff08@linaro.org>

Hi Bryan,

On Fri Mar 28, 2025 at 5:39 PM CET, Bryan O'Donoghue wrote:
> On 28/03/2025 15:22, Luca Weiss wrote:
>> Hi all, and Vikash and Dikshita,
>> 
>> Konrad Dybcio was suggesting I write an email here, maybe someone has a
>> good idea what I can try.
>> 
>> I've been working on bringup for SM6350/SM7225 ("lagoon") for the
>> Fairphone 4 smartphone but have been stuck on getting Venus working for
>> a long time (~January 2022). Essentially, whatever I try probe fails
>> with the following error:
>> 
>> [   41.939451] qcom-venus aa00000.video-codec: non legacy binding
>> [   42.162105] qcom-venus aa00000.video-codec: wait for cpu and video core idle fail (-110)
>> [   42.167037] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -110
>> 
>> I've double checked the videocc driver against downstream, the videocc
>> GDSCs and their flags, compared dts bits, checked basic driver bits but
>> I couldn't find anything to get further than this.
>> 
>> For driver / compatible, it doesn't seem to matter if I use sm8250 or
>> sc7280 compatible or actually the struct I created for sm6350.
>> 
>> I'll attach the log with some extra debug prints below.
>> 
>> My git branch for reference: https://github.com/z3ntu/linux/commits/sm6350-6.14.y-wip-venus/
>> 
>> I didn't try the new Iris driver yet, mostly because as far as I can
>> tell, VPU_VERSION_IRIS2_1 is not yet supported there, just IRIS2
>> (sm8250) and IRIS3 (sm8550). But I'm also happy to try something there.
>> 
>> Regards
>> Luca
>> 
>> 

<snip>

>> [   57.868683] qcom-venus aa00000.video-codec: venus_cpu_and_video_core_idle:1535 cpu_status=0 (OK 0) ctrl_status=1 (OK 0)
>> [   57.868690] qcom-venus aa00000.video-codec: wait for cpu and video core idle fail (-110)
>> [   57.868699] venus_probe:505 ret=-110
>> [   57.873495] venus_hfi_destroy:1690
>> [   57.873519] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -110
>> 
>> 
>
> Have you matched the GDSC flags ?
>
> sm6350:
>
> static struct gdsc mvsc_gdsc = {
>          .gdscr = 0x2004,
>          .en_rest_wait_val = 0x2,
>          .en_few_wait_val = 0x2,
>          .clk_dis_wait_val = 0x6,
>          .pd = {
>                  .name = "mvsc_gdsc",
>          },
>          .pwrsts = PWRSTS_OFF_ON,
> };
>
> static struct gdsc mvs0_gdsc = {
>          .gdscr = 0x3004,
>          .en_rest_wait_val = 0x2,
>          .en_few_wait_val = 0x2,
>          .clk_dis_wait_val = 0x6,
>          .pd = {
>                  .name = "mvs0_gdsc",
>          },
>          .pwrsts = PWRSTS_OFF_ON,
>          .flags = HW_CTRL_TRIGGER,
> };
>
> sc7280:
> static struct gdsc mvsc_gdsc = {
>          .gdscr = 0x2004,
>          .en_rest_wait_val = 0x2,
>          .en_few_wait_val = 0x2,
>          .clk_dis_wait_val = 0x6,
>          .pd = {
>                  .name = "mvsc_gdsc",
>          },
>          .flags = RETAIN_FF_ENABLE,
>          .pwrsts = PWRSTS_OFF_ON,
> };
>
> static struct gdsc mvs0_gdsc = {
>          .gdscr = 0x3004,
>          .en_rest_wait_val = 0x2,
>          .en_few_wait_val = 0x2,
>          .clk_dis_wait_val = 0x6,
>          .pd = {
>                  .name = "mvs0_gdsc",
>          },
>          .pwrsts = PWRSTS_OFF_ON,
>          .flags = HW_CTRL_TRIGGER | RETAIN_FF_ENABLE,
> };

I didn't add RETAIN_FF_ENABLE on SM6350 (lagoon) because the GDSCs don't
have the property 'qcom,retain-regs' in the downstream dts, compared to
SC7280 (yupik).

>
> Also why not turn those apss_smmu entires you have commented out back on ?
>
> https://github.com/z3ntu/linux/commit/281d07ae965ce0101bdb528e98bf8c00c94f86ec#diff-ea117dfbd122406c02e5b143ee0969a3de21416b6c192e3b5ad024571f6e4bffR2016

As far as I can see, other SoCs only have the IOMMU that is downstream
non_secure_cb.

But unfortunately applying both changes (RETAIN_FF_ENABLE + iommus)
doesn't change anything, it's still the same error:

[   82.603202] qcom-venus aa00000.video-codec: venus_cpu_and_video_core_idle:1535 cpu_status=0 (OK 0) ctrl_status=1 (OK 0)
[   82.604738] qcom-venus aa00000.video-codec: venus_cpu_and_video_core_idle:1535 cpu_status=0 (OK 0) ctrl_status=1 (OK 0)
[   82.606263] qcom-venus aa00000.video-codec: venus_cpu_and_video_core_idle:1535 cpu_status=0 (OK 0) ctrl_status=1 (OK 0)
[   82.606273] qcom-venus aa00000.video-codec: venus_cpu_and_video_core_idle:1535 cpu_status=0 (OK 0) ctrl_status=1 (OK 0)
[   82.606280] qcom-venus aa00000.video-codec: wait for cpu and video core idle fail (-110)
[   82.606287] venus_probe:505 ret=-110
[   82.610767] venus_hfi_destroy:1690
[   82.610783] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -110

Also one thing I can add from my notes, what I didn't write yet. This is
how the register looks with msm-4.19 downstream. IIRC the values here
are not directly comparable because of bitmasks and stuff.

[   48.936285] __prepare_pc_iris2:267 DBG
[   48.940352] __prepare_pc_iris2:299 DBG wfi_status=0 ctrl_status=40000001
[   48.947624] __prepare_pc_iris2:299 DBG wfi_status=1 ctrl_status=101
[   48.954212] __prepare_pc_iris2:301 DBG
[   48.958178] __prepare_pc_iris2:314 DBG

Regards
Luca

>
> ---
> bod


  reply	other threads:[~2025-03-31  6:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6P5iXJOUxv3jsPGI11XbeZOagg2ht2Ws-WbN2HjXSFC_xeFgWyGM3a9T6y30gmys3KSxJF9Tv3f7jAehZ6AlOQ==@protonmail.internalid>
2025-03-28 15:22 ` Venus probe issues on SM6350 SoC Luca Weiss
2025-03-28 16:39   ` Bryan O'Donoghue
2025-03-31  6:43     ` Luca Weiss [this message]
2025-03-31  9:47       ` Bryan O'Donoghue
2025-04-01  7:28         ` Luca Weiss
2025-04-01  6:17   ` Vikash Garodia
2025-04-01  6:55     ` Vikash Garodia
2025-04-01  7:42       ` Luca Weiss
2025-04-01  9:21         ` Vikash Garodia
2025-04-01  9:40           ` Luca Weiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D8U8XDW1QRAY.35U7ER6E74G55@fairphone.com \
    --to=luca.weiss@fairphone.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=quic_dikshita@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox