Re: [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280

From: Konrad Dybcio

Date: Mon Feb 09 2026 - 05:06:24 EST


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@xxxxxxxxxxxxxxxx>
> ---

[...]

> +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