FROMLIST: media: qcom: iris: Add generic Gen2 firmware detection and loading#1191
FROMLIST: media: qcom: iris: Add generic Gen2 firmware detection and loading#1191gouravk-qualcomm wants to merge 2 commits into
Conversation
… init The HFI sys ops were previously initialized in probe() but, we don't have firmware loaded at probe time. Since HFI is tightly coupled to firmware, initialize the HFI sys ops after firmware has been successfully loaded and booted. Link: https://lore.kernel.org/all/20260512-kodiak-gen2-support-v4-v5-1-a98968423d24@oss.qualcomm.com/ Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
🔨 Build Failure Analysis — PR #1191PR: #1191
Verdict1 of 1 error is introduced by this PR; the struct field rename in 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1191PR: #1191
Verdict1 of 1 error is introduced by this PR: the struct field rename in 📎 Detailed analysis: Full report |
PR #1191 — validate-patchPR: #1191
Final Summary
|
PR #1191 — checker-log-analyzerPR: #1191
Detailed report: Full report
|
Some Iris platforms support both Gen1 and Gen2 HFI firmware images. Update the firmware loading logic to handle this generically by preferring Gen2 when available, while safely falling back to Gen1 when required. The firmware loading logic is updated with the following priority: 1. Device Tree (`firmware-name`): If specified, load unconditionally. 2. Gen2 default : If no DT override exists, select the Gen2 firmware descriptor when present and attempt to load the corresponding firmware image. 3. Gen1 Fallback: If loading the Gen2 firmware fails and a Gen1 descriptor is available, retry with the Gen1 firmware image. When a platform provides both Gen1 and Gen2 firmware descriptors and the firmware is loaded via a DT override, the driver detects the firmware generation at runtime before authentication by inspecting the firmware data. The firmware is classified as Gen2 if the QC_IMAGE_VERSION_STRING starts with "vfw" or matches the "video-firmware.N.M" format with N >= 2. If a Gen1 firmware image is detected in this case, the driver switches to the Gen1 firmware descriptor and associated platform data so that the correct HFI implementation is used. This change makes firmware generation detection platform‑agnostic, preserves DT overrides, prefers newer Gen2 firmware when available, and maintains compatibility with platforms that only support Gen1. Link: https://lore.kernel.org/all/20260512-kodiak-gen2-support-v4-v5-2-a98968423d24@oss.qualcomm.com/ Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Co-developed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
4ede995 to
1990aaf
Compare
PR #1191 — validate-patchPR: #1191
Final SummaryPatch 1 —
Patch 2 —
|
PR #1191 — checker-log-analyzerPR: #1191
Detailed report: Full report
|
@qlijarvis / @knaveen-qc This appears to be caused by baseline differences. Could you please review this and confirm if any changes are required for this PR? |

This series enhances the Iris driver to support platforms that provide both
Gen1 and Gen2 HFI firmware by adding generic runtime firmware generation
detection and selection logic.
Some Iris platforms are capable of running either Gen1 or Gen2 HFI‑based
firmware, but the driver has historically assumed a single firmware
generation selected at build or platform‑definition time. This series
updates the firmware loading mechanism to dynamically determine the
firmware generation at runtime and select the appropriate HFI
implementation accordingly.
When no Device Tree firmware override is present, the driver now prefers
Gen2 firmware when available and falls back to Gen1 if loading Gen2
fails. When a firmware name is explicitly provided via Device Tree and
both Gen1 and Gen2 descriptors are available, the loaded firmware image
is inspected prior to authentication to determine its generation. Based
on this detection, the driver updates its firmware descriptor and
platform data so that the correct HFI implementation is used.
CRs-Fixed: 4496236 , 4521169