Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "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: Tue, 01 Apr 2025 09:42:12 +0200	[thread overview]
Message-ID: <D8V4SZVFFHGD.17Y9J8WFKNHYY@fairphone.com> (raw)
In-Reply-To: <49f8a822-4df4-0a61-b342-bd6c418314c9@quicinc.com>

On Tue Apr 1, 2025 at 8:55 AM CEST, Vikash Garodia wrote:
>
>
> On 4/1/2025 11:47 AM, Vikash Garodia wrote:
>> Hi Luca,
>> 
>> On 3/28/2025 8:52 PM, 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.
>> The good part if IRIS2_1 configuration have firmware support with gen2 HFIs.
>> Since you are wiling to give a try, let me or Dikshita share the firmware with
>> you in a short while, and with that, you can directly try SM6350 with IRIS
>> driver. Given that we have already validated SC7280 with gen2 (downstream
>> version of IRIS though), i am quite hopeful that SM6350 can be up with iris.
>> FYI, iris is having just the h264 decoder at this point with RFC patches posted
>> for VP9 and H265 decoder.
> Pls try with below firmware bins on IRIS driver. We can debug from there. Hope
> you have the access to download the binary.
>
> https://git.codelinaro.org/clo/linux-kernel/linux-firmware/-/commit/56035bf6edac7eb4d2867528c598eb646ee68651

Hi Vikash,

Thanks for sharing these binaries!

I've signed them with sectools for my device and tried them first with
the venus driver.

There it looks like the firmware doesn't load at all:
[   44.798028] qcom-venus aa00000.video-codec: fail to load video firmware
[   44.800367] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22

Then with iris driver and qcom,sm8250-venus compatible while it does
seem to complete the probe function (I see a print I've added in
iris_probe before the last "return 0;"), the phone crashes.

I have the following diff on top of iris:

diff --git a/drivers/clk/qcom/videocc-sm6350.c b/drivers/clk/qcom/videocc-sm6350.c
index 84c6a1fcb395..504dcaad897b 100644
--- a/drivers/clk/qcom/videocc-sm6350.c
+++ b/drivers/clk/qcom/videocc-sm6350.c
@@ -111,7 +111,7 @@ static const struct freq_tbl ftbl_video_cc_iris_clk_src[] = {
 	F(240000000, P_VIDEO_PLL0_OUT_EVEN, 1.5, 0, 0),
 	F(300000000, P_VIDEO_PLL0_OUT_EVEN, 1, 0, 0),
 	F(380000000, P_VIDEO_PLL0_OUT_EVEN, 1, 0, 0),
-	F(460000000, P_VIDEO_PLL0_OUT_EVEN, 1, 0, 0),
+	//F(460000000, P_VIDEO_PLL0_OUT_EVEN, 1, 0, 0),

    ^ this is because my sm6350 opp-table only goes up to 380 MHz, SKU 0
    can go to 460 MHz but not SKU 1. I didn't check which SKU my SM7225
    is.

 	{ }
 };
 
diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c b/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
index 5c86fd7b7b6f..d958a6540949 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
@@ -61,7 +61,7 @@ static const struct icc_info sm8250_icc_table[] = {
 	{ "video-mem",  1000, 15000000 },
 };
 
-static const char * const sm8250_clk_reset_table[] = { "bus", "core" };
+static const char * const sm8250_clk_reset_table[] = { };
 
 static const struct bw_info sm8250_bw_table_dec[] = {
 	{ ((4096 * 2160) / 256) * 60, 2403000 },
@@ -72,12 +72,12 @@ static const struct bw_info sm8250_bw_table_dec[] = {
 
 static const char * const sm8250_pmdomain_table[] = { "venus", "vcodec0" };
 
-static const char * const sm8250_opp_pd_table[] = { "mx" };
+static const char * const sm8250_opp_pd_table[] = { "cx" };
 
 static const struct platform_clk_data sm8250_clk_table[] = {
 	{IRIS_AXI_CLK,  "iface"        },
 	{IRIS_CTRL_CLK, "core"         },
-	{IRIS_HW_CLK,   "vcodec0_core" },
+	{IRIS_HW_CLK,   "vcodec_core" },
 };
 
 static struct tz_cp_config tz_cp_config_sm8250 = {


  reply	other threads:[~2025-04-01  7:42 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
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 [this message]
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=D8V4SZVFFHGD.17Y9J8WFKNHYY@fairphone.com \
    --to=luca.weiss@fairphone.com \
    --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