[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2afcf41-5135-1ac0-c603-6394bb0ab492@somainline.org>
Date: Tue, 26 Jan 2021 15:07:19 +0100
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>
To: Stanimir Varbanov <stanimir.varbanov@...aro.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>,
Hans Verkuil <hverkuil@...all.nl>
Subject: Re: [PATCH] venus: core: Parse firmware-name DT property
Il 26/01/21 09:42, Stanimir Varbanov ha scritto:
> On production devices the firmware could be located on different
> places, this path could be provided by special firmware-name DT
> property.
>
> Here we check for existence of such DT property and if it exist
> take the firmware path from there. Otherwise, if the property
> is missing we fallback to the predefined path from driver resource
> structure.
>
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
> ---
> drivers/media/platform/qcom/venus/firmware.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> index d03e2dd5808c..56c8fb5a019b 100644
> --- a/drivers/media/platform/qcom/venus/firmware.c
> +++ b/drivers/media/platform/qcom/venus/firmware.c
> @@ -187,6 +187,7 @@ int venus_boot(struct venus_core *core)
> {
> struct device *dev = core->dev;
> const struct venus_resources *res = core->res;
> + const char *fwpath = NULL;
> phys_addr_t mem_phys;
> size_t mem_size;
> int ret;
> @@ -195,7 +196,12 @@ int venus_boot(struct venus_core *core)
> (core->use_tz && !qcom_scm_is_available()))
> return -EPROBE_DEFER;
>
> - ret = venus_load_fw(core, core->res->fwname, &mem_phys, &mem_size);
> + ret = of_property_read_string_index(dev->of_node, "firmware-name", 0,
> + &fwpath);
> + if (ret)
> + fwpath = core->res->fwname;
> +
> + ret = venus_load_fw(core, fwpath, &mem_phys, &mem_size);
> if (ret) {
> dev_err(dev, "fail to load video firmware\n");
> return -EINVAL;
>
Super! As you surely know, I totally agree.
It may not have huge value, but:
Reviewed-By: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>
Powered by blists - more mailing lists