Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280
Date: Mon, 9 Feb 2026 11:02:01 +0100	[thread overview]
Message-ID: <0da582a6-5bba-4450-99ec-cf57b67915e6@oss.qualcomm.com> (raw)
In-Reply-To: <20260209-iris_sc7280_gen2_support-v1-2-390000a4fa39@oss.qualcomm.com>

On 2/9/26 10:45 AM, Dikshita Agarwal wrote:
> SC7280 supports both Gen1 and Gen2 HFI firmware. The driver continues to
> use Gen1 by default, but boards that intend to use Gen2 firmware can
> opt‑in by specifying a Gen2 image through the Device Tree
> 'firmware-name' property.
> 
> Based on this property and the availability of the referenced
> firmware binary, the driver selects the appropriate HFI generation and
> updates its platform data accordingly. Boards that do not
> specify a Gen2 firmware, or where the firmware is not present,
> automatically fall back to Gen1.
> 
> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
> ---

[...]

> +int iris_update_platform_data(struct iris_core *core)
> +{
> +	const char *fwname = NULL;
> +	const struct firmware *fw;
> +	int ret;
> +
> +	if (of_device_is_compatible(core->dev->of_node, "qcom,sc7280-venus")) {
> +		ret = of_property_read_string_index(core->dev->of_node, "firmware-name", 0,
> +					    &fwname);
> +		if (ret)
> +			return 0;
> +
> +		if (strstr(fwname, "gen2")) {
> +			ret = request_firmware(&fw, fwname, core->dev);
> +			if (ret) {
> +				dev_err(core->dev, "Specified firmware is not present\n");
> +				return ret;

This is fragile - if someone names names their gen1 firmware something like
"myproduct_gen2_vidfw.mbn", it's going to match..

Could we instead do something like the explicit format checks in
venus/hfi_msgs.c : sys_get_prop_image_version(), based on the **contents**
of the binary?

Konrad

  reply	other threads:[~2026-02-09 10:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09  9:45 [PATCH 0/2] media: qcom: iris: Add Gen2 HFI support for SC7280 Dikshita Agarwal
2026-02-09  9:45 ` [PATCH 1/2] media: iris: Initialize HFI ops after firmware load in core init Dikshita Agarwal
2026-02-09 11:34   ` Bryan O'Donoghue
2026-02-09  9:45 ` [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280 Dikshita Agarwal
2026-02-09 10:02   ` Konrad Dybcio [this message]
2026-02-09 11:34     ` Dikshita Agarwal
2026-02-09 11:36       ` Bryan O'Donoghue
2026-02-09 11:39       ` Konrad Dybcio
2026-02-09 12:35       ` Dmitry Baryshkov
2026-02-12 11:16         ` Dikshita Agarwal
2026-02-12 11:43           ` Konrad Dybcio
2026-02-12 13:05             ` Dikshita Agarwal
2026-02-12 13:27               ` Bryan O'Donoghue
2026-02-12 14:50                 ` Konrad Dybcio
2026-02-13 11:08                 ` Dmitry Baryshkov
2026-02-13 12:04               ` Dmitry Baryshkov
2026-02-16  8:23                 ` Dikshita Agarwal
2026-02-16 12:03                   ` Dmitry Baryshkov
2026-02-16 12:24                     ` Dikshita Agarwal
2026-02-16 14:42                       ` Dmitry Baryshkov
2026-02-17  7:40                 ` Dikshita Agarwal
2026-02-17 10:37                   ` Bryan O'Donoghue
2026-02-17 12:04                     ` Dmitry Baryshkov
2026-02-17 12:20                   ` Konrad Dybcio
2026-02-20  6:20                     ` Dikshita Agarwal
2026-02-23  1:14                       ` Dmitry Baryshkov
2026-02-17 13:05                   ` Dmitry Baryshkov
2026-02-09 12:33   ` Dmitry Baryshkov

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=0da582a6-5bba-4450-99ec-cf57b67915e6@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=vikash.garodia@oss.qualcomm.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