All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Subject: Re: [PATCH v8 01/18] media: iris: Add Gen2 firmware autodetect and fallback
Date: Thu, 30 Jul 2026 21:02:11 +0100	[thread overview]
Message-ID: <d8137a89-5fe5-4a06-b3e8-be55e59327ca@kernel.org> (raw)
In-Reply-To: <20260730-iris-ar50lt-v8-1-6597c08cea6f@oss.qualcomm.com>

On 30/07/2026 16:20, Dmitry Baryshkov wrote:
> From: Dikshita Agarwal<dikshita.agarwal@oss.qualcomm.com>
> 
> 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.
> 
> Loading and generation detection are split into two steps.
> iris_load_firmware() applies the priority above and returns the loaded
> image together with a candidate descriptor. iris_detect_firmware() then
> runs only after qcom_mdt_load() has succeeded and publishes the chosen
> descriptor, so the driver commits to a HFI generation only for an image
> that has actually been loaded.
> 
> When a platform provides both Gen1 and Gen2 firmware descriptors and the
> firmware is loaded via a DT override, the candidate descriptor is only a
> default: iris_detect_firmware() inspects the loaded image to pick the
> generation, before authentication. It scans the memory populated by
> qcom_mdt_load() rather than the request_firmware() blob, so that a split
> .mdt image, whose version string lives in the .bNN data segments and not
> in the ELF headers, is classified correctly. 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.
> 
> 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>

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

  parent reply	other threads:[~2026-07-30 20:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <J0r-fdDYeS3FyqabzR_0wiwxC-2onZeePkUSfv0NavGV8KB3Anc-j8yKHqfY2I3X4VAiZpRkYSIZLaTwuyhKMA==@protonmail.internalid>
2026-07-30 15:20 ` [PATCH v8 00/18] media: iris: Add AR50LT core support and enable Agatti platform Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 01/18] media: iris: Add Gen2 firmware autodetect and fallback Dmitry Baryshkov
2026-07-30 15:37     ` sashiko-bot
2026-07-30 20:02     ` Bryan O'Donoghue [this message]
2026-07-30 15:20   ` [PATCH v8 02/18] media: iris: Skip UBWC configuration when not supported Dmitry Baryshkov
2026-07-30 15:32     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 03/18] media: iris: drop IRIS_FMT_foo enumeration Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 04/18] media: iris: Filter UBWC raw formats based on hardware capabilities Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 05/18] media: iris: Introduce set_preset_register as a vpu_op Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 06/18] media: iris: Introduce interrupt_init " Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 07/18] media: iris: add vpu op hook to disable ARP buffer Dmitry Baryshkov
2026-07-30 15:41     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 08/18] media: iris: Add platform data field for watchdog interrupt mask Dmitry Baryshkov
2026-07-30 15:32     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 09/18] media: iris: Add platform flag for instantaneous bandwidth voting Dmitry Baryshkov
2026-07-30 15:20   ` [PATCH v8 10/18] media: iris: skip PIPE if it is not supported by the platform Dmitry Baryshkov
2026-07-30 15:56     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 11/18] media: iris: Add framework support for AR50_LITE video core Dmitry Baryshkov
2026-07-30 15:41     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 12/18] media: iris: add minimal GET_PROPERTY implementation Dmitry Baryshkov
2026-07-30 15:39     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 13/18] media: iris: update buffer requirements based on received info Dmitry Baryshkov
2026-07-30 15:52     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 14/18] media: iris: implement support for the Agatti platform Dmitry Baryshkov
2026-07-30 15:54     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 15/18] media: iris: Introduce buffer size calculations for AR50LT Dmitry Baryshkov
2026-07-30 15:47     ` sashiko-bot
2026-07-30 15:20   ` [PATCH v8 16/18] media: iris: add Gen2 firmware support on the Agatti platform Dmitry Baryshkov
2026-07-30 15:21   ` [PATCH v8 17/18] media: venus: skip QCM2290 if Iris driver is enabled Dmitry Baryshkov
2026-07-30 15:39     ` sashiko-bot
2026-07-30 15:21   ` [PATCH v8 18/18] media: iris: constify inst_fw_cap_sm8250_dec Dmitry Baryshkov
2026-07-30 20:09   ` [PATCH v8 00/18] media: iris: Add AR50LT core support and enable Agatti platform Bryan O'Donoghue

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=d8137a89-5fe5-4a06-b3e8-be55e59327ca@kernel.org \
    --to=bod@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=andersson@kernel.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.