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

From: Dmitry Baryshkov

Date: Fri Feb 13 2026 - 06:09:11 EST


On Thu, Feb 12, 2026 at 01:27:15PM +0000, Bryan O'Donoghue wrote:
> On 12/02/2026 13:05, Dikshita Agarwal wrote:
> >
> >
> > On 2/12/2026 5:13 PM, Konrad Dybcio wrote:
> > > On 2/12/26 12:16 PM, Dikshita Agarwal wrote:
> > > >
> > > >
> > > > On 2/9/2026 6:05 PM, Dmitry Baryshkov wrote:
> > > > > On Mon, Feb 09, 2026 at 05:04:48PM +0530, Dikshita Agarwal wrote:
> > > > > >
> > > > > >
> > > > > > On 2/9/2026 3:32 PM, Konrad Dybcio wrote:
> > > > > > > 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>
> > > > > > > > ---
> > >
> > > [...]
> > >
> > > > > > To avoid accidental matches, I can switch to an exact filename match
> > > > > > instead. That way, only the specific Gen2 image (for example
> > > > > > "qcom/vpu/vpu20_p1_gen2.mbn") will trigger the Gen2 path, and boards that
> > > > >
> > > > > How do you detect that for the OEM-signed firmware, which can have
> > > > > random name?
> > > > >
> > > > > > want to use Gen2 can opt in by naming the firmware accordingly.
> > > >
> > > > I Explored on suggested alternative approaches and seeing some limitation
> > > > with the both of them:
> > > >
> > > > 1. Detecting Gen1/Gen2 by scanning the firmware blob (fw->data)
> > > > It is possible to parse QC_IMAGE_VERSION_STRING from the .mbn and extract
> > > > the version string. The issues with this approach :
> > > >
> > > > - the version string has no explicit marker that identifies Gen1 vs Gen2.
> > > >
> > > > - This prefix is not a formal ABI, and it is not consistent across SoCs.
> > > > Each SoC family uses different naming patterns in the version string.
> > > >
> > > > Example : For SC7280 Gen1 we currently see:
> > > > QC_IMAGE_VERSION_STRING=video-firmware.1.0-<hash> while SM8250 has
> > > > QC_IMAGE_VERSION_STRING=VIDEO.VPU.1.0-00119-<>
> > > >
> > > > So the driver would need SoC‑specific string‑matching rules, which is hard
> > > > to maintain if we are looking for a design to address all available SOCs.
> > >
> > > The only SoC with such distinction today is kodiak. So we can simply check:
> > >
> > > if (kodiak && strstr(fw->data, "VIDEO.VPU.1.0.")
> > > hfi = gen2;
> >
> > Agree, this works for Kodiak. However, Dmitry was also referring to other
> > SoCs that may support both Gen1 and Gen2, and at the moment there isn’t a
> > generic way to handle that check.
> >
> > Also, please note that the Kodiak Gen1 firmware uses the string
> > video-firmware.1.0, whereas Gen2 uses VIDEO.VPU.3.4.
> >
> > >
> > >
> > > Can we agree that VIDEO.VPU.x firmwares are hfigen2? If so, problem also
> > > solved for <=8450
> > >
> >
> > Nope. that's not true for all, SM8250 uses VIDEO.VPU.1.0 which is gen1.
> >
> > Thanks,
> > Dikshita
> >
> > > Konrad
>
> I really don't see what the problem with Dikshita's proposal here is after
> all she literally controls the firmware name that goes to linux-firmware.
>
> Presumably you can attest to the naming format you have-sent and will-send
> in future.

Is qcvss8280.mbn using hfigen1 or gen2? Is qcvss8380.mbn using gen1 or
gen2 HFI? I really, really would warn against hardcoding something for
kodiak only, because at a later point there will be a business
requirement and some other platform will be upgraded from gen1 to gen2
in some other way. Also, in many cases, we don't rename the firmware
provided by the vendors (both inside linux-firmware and for the firmware
shipped with the device).

--
With best wishes
Dmitry