[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cs4beqxgn7uedeohf5lks4ildjp7il6rtolsodvxltk2o4i7m4@ptahaxggutgw>
Date: Mon, 9 Feb 2026 14:33:25 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Dikshita Agarwal <dikshita.agarwal@....qualcomm.com>
Cc: Vikash Garodia <vikash.garodia@....qualcomm.com>,
Abhinav Kumar <abhinav.kumar@...ux.dev>,
Bryan O'Donoghue <bod@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280
On Mon, Feb 09, 2026 at 03:15:26PM +0530, 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.
What are the benefits of using Gen2 firmware? Why is it left as a
board-level selection? E.g. for the non-fused boards, would it be
benefitable to switch to Gen2 or not?
>
> 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@....qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_core.c | 30 ++++++++
> drivers/media/platform/qcom/iris/iris_core.h | 1 +
> .../platform/qcom/iris/iris_platform_common.h | 1 +
> .../media/platform/qcom/iris/iris_platform_gen1.c | 4 +-
> .../media/platform/qcom/iris/iris_platform_gen2.c | 83 ++++++++++++++++++++++
> .../platform/qcom/iris/iris_platform_sc7280.h | 15 ++++
> drivers/media/platform/qcom/iris/iris_probe.c | 3 -
> drivers/media/platform/qcom/iris/iris_vidc.c | 3 +
> 8 files changed, 135 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/platform/qcom/iris/iris_core.c
> index 8e4cc6d6123069dea860062f0172f1e4b90cfc13..b14b04b32b62e324a70a558063dc673f7b9c2981 100644
> --- a/drivers/media/platform/qcom/iris/iris_core.c
> +++ b/drivers/media/platform/qcom/iris/iris_core.c
> @@ -3,6 +3,7 @@
> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> +#include <linux/firmware.h>
> #include <linux/pm_runtime.h>
>
> #include "iris_core.h"
> @@ -10,6 +11,31 @@
> #include "iris_state.h"
> #include "iris_vpu_common.h"
>
> +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")) {
How is going to be applicable for the possibly vendor-signed firmware?
Or for the firmware which uses a different name? E.g.
qcom/qcm6490/fairphone5/venus.mbn - is it gen1 or gen2?
We need to query the firmware and detect the interface based on the
query results. Either check the file itself, or start the firmware and
query the running system.
Moreover, I guess, this is not limited to SC7280 only. My guess would be
that any platform can be either gen1 or gen2 (not implying that both
firmware versions actually exists for all the platforms).
> + ret = request_firmware(&fw, fwname, core->dev);
> + if (ret) {
> + dev_err(core->dev, "Specified firmware is not present\n");
Doesn't request_firmware already print a warning?
> + return ret;
> + }
> + release_firmware(fw);
> + core->iris_platform_data = &sc7280_gen2_data;
> + }
> + }
> + return 0;
> +}
> +
> void iris_core_deinit(struct iris_core *core)
> {
> pm_runtime_resume_and_get(core->dev);
--
With best wishes
Dmitry
Powered by blists - more mailing lists