LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Vikash Garodia <vgarodia@codeaurora.org>,
hverkuil@xs4all.nl, mchehab@kernel.org, andy.gross@linaro.org,
bjorn.andersson@linaro.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
acourbot@google.com
Subject: Re: [PATCH 4/4] media: venus: add PIL support
Date: Tue, 22 May 2018 18:52:36 +0300 [thread overview]
Message-ID: <65b3d26a-8180-c051-1d34-44d49dca34ca@linaro.org> (raw)
In-Reply-To: <3822394c-b304-15c3-c978-ee39589308eb@linaro.org>
Hi,
On 05/22/2018 04:02 PM, Stanimir Varbanov wrote:
> Hi Vikash,
>
> On 05/17/2018 02:32 PM, Vikash Garodia wrote:
>> This adds support to load the video firmware
>> and bring ARM9 out of reset. This is useful
>> for platforms which does not have trustzone
>> to reset the ARM9.
>>
>> Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
>> ---
>> .../devicetree/bindings/media/qcom,venus.txt | 8 +-
>> drivers/media/platform/qcom/venus/core.c | 67 +++++++--
>> drivers/media/platform/qcom/venus/core.h | 6 +
>> drivers/media/platform/qcom/venus/firmware.c | 163 +++++++++++++++++----
>> drivers/media/platform/qcom/venus/firmware.h | 10 +-
>> 5 files changed, 217 insertions(+), 37 deletions(-)
>>
<snip>
>>
>> -int venus_shutdown(struct device *dev)
>> +int venus_boot_noTZ(struct venus_core *core, phys_addr_t mem_phys,
>> + size_t mem_size)
>> {
>> - return qcom_scm_pas_shutdown(VENUS_PAS_ID);
>> + struct iommu_domain *iommu;
>> + struct device *dev;
>> + int ret;
>> +
>> + if (!core->fw.dev)
>> + return -EPROBE_DEFER;
>> +
>> + dev = core->fw.dev;
>> +
>> + iommu = iommu_domain_alloc(&platform_bus_type);
>> + if (!iommu) {
>> + dev_err(dev, "Failed to allocate iommu domain\n");
>> + return -ENOMEM;
>> + }
>> +
>> + iommu->geometry.aperture_start = 0x0;
>> + iommu->geometry.aperture_end = VENUS_FW_MEM_SIZE;
>
> The same comment for geometry params as for venus_probe is valid here.
Infact aperture_end will be overwritten by arm-smmu driver in the next
call to iommu_attach_device(), and by chance geometry.force_aperture
will become true.
I wonder is that geometry params are supposed to be used by drivers or
by iommu drivers?
>
>> +
>> + ret = iommu_attach_device(iommu, dev);
>> + if (ret) {
>> + dev_err(dev, "could not attach device\n");
>> + goto err_attach;
>> + }
>> +
>> + ret = iommu_map(iommu, core->fw.iova, mem_phys, mem_size,
>> + IOMMU_READ|IOMMU_WRITE|IOMMU_PRIV);
>
> iova is not initialized and is zero, maybe we don't need that variable
> in the venus_firmware structure?
>
>> + if (ret) {
>> + dev_err(dev, "could not map video firmware region\n");
>> + goto err_map;
>> + }
>> + core->fw.iommu_domain = iommu;
>> + venus_reset_hw(core);
>> +
>> + return 0;
>> +
>> +err_map:
>> + iommu_detach_device(iommu, dev);
>> +err_attach:
>> + iommu_domain_free(iommu);
>> + return ret;
>> }
>> +
<snip>
--
regards,
Stan
next prev parent reply other threads:[~2018-05-22 15:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 11:32 [PATCH 0/4] Venus updates - PIL Vikash Garodia
2018-05-17 11:32 ` [PATCH 1/4] soc: qcom: mdt_loader: Add check to make scm calls Vikash Garodia
2018-05-17 15:50 ` Jordan Crouse
2018-05-18 5:28 ` Bjorn Andersson
2018-05-18 7:18 ` Vikash Garodia
2018-05-17 11:32 ` [PATCH 2/4] media: venus: add a routine to reset ARM9 Vikash Garodia
2018-05-17 15:57 ` Jordan Crouse
2018-05-17 11:32 ` [PATCH 3/4] venus: add check to make scm calls Vikash Garodia
2018-05-22 13:04 ` Stanimir Varbanov
2018-05-22 19:50 ` Jordan Crouse
2018-05-22 20:57 ` Stanimir Varbanov
2018-05-23 5:30 ` Vikash Garodia
2018-05-17 11:32 ` [PATCH 4/4] media: venus: add PIL support Vikash Garodia
2018-05-18 0:40 ` Trilok Soni
2018-05-18 12:20 ` Vikash Garodia
2018-05-22 13:02 ` Stanimir Varbanov
2018-05-22 15:52 ` Stanimir Varbanov [this message]
2018-06-01 6:53 ` Vikash Garodia
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=65b3d26a-8180-c051-1d34-44d49dca34ca@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=acourbot@google.com \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.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=linux-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=vgarodia@codeaurora.org \
--subject='Re: [PATCH 4/4] media: venus: add PIL support' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).