From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Hans Verkuil <hverkuil@xs4all.nl>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>
Subject: Re: [PATCH] venus: core: Parse firmware-name DT property
Date: Tue, 26 Jan 2021 11:55:17 -0600 [thread overview]
Message-ID: <YBBXhfFQNaqFz8tV@builder.lan> (raw)
In-Reply-To: <20210126084252.238078-1-stanimir.varbanov@linaro.org>
On Tue 26 Jan 02:42 CST 2021, Stanimir Varbanov wrote:
> 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.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
But firmware-name is not mentioned in the dt binding.
Regards,
Bjorn
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.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;
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-01-26 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 8:42 [PATCH] venus: core: Parse firmware-name DT property Stanimir Varbanov
2021-01-26 14:07 ` AngeloGioacchino Del Regno
2021-01-26 17:55 ` Bjorn Andersson [this message]
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
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=YBBXhfFQNaqFz8tV@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=angelogioacchino.delregno@somainline.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stanimir.varbanov@linaro.org \
/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.