From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: "Dwivedi, Avaneesh Kumar (avani)" <akdwived@codeaurora.org>,
Stephen Boyd <sboyd@codeaurora.org>,
agross@codeaurora.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RESEND PATCH v2] remoteproc: qcom: Add venus rproc support on msm8996 platform.
Date: Mon, 12 Dec 2016 22:51:18 -0800 [thread overview]
Message-ID: <20161213065118.GF3439@tuxbot> (raw)
In-Reply-To: <afdf7731-52e5-c6ed-cfaa-1fc4ae826d18@linaro.org>
On Wed 30 Nov 01:22 PST 2016, Stanimir Varbanov wrote:
[..]
>
> Then I'd propose to add compatible string for msm8916 too. We will need
> to distinguish between SoCs in order to select proper Venus firmware
> file too.
>
This does make sense.
> I think using power domain in remoteproc driver will break power
> management of the v4l2 venus driver. Presently I use runtime pm to
> switch ON/OFF GDSC and enable/disable Venus clocks.
>
> When the .probe of venus remoteproc driver is called the power domain
> will become ON and never switched OFF (except when platform driver
> .remove method is called). One possible solution would be to add runtime
> pm in venus remoreproc driver.
>
> IMO we should think more about that.
>
> Bjorn, Stephen what are your opinions?
>
Sorry for not getting back to you on this after our earlier discussion
on the topic.
Modelling the remoteproc and codec drivers as completely separate
entities (with only the rproc phandle) gives us issues with the timing
between the two. As I pulled down and started playing with [1] I noticed
that I was not able to get the codec driver to probe unless I compiled
it as a module which I insmoded after my /lib/firmware became available.
In addition to this, there's no way for the remoteproc driver to inform
the codec driver when it's actually shutting down and booting back up
during a crash recovery (an async operation).
And lastly when I talked to Rob about the DT binding the obvious
question of why one piece of hardware have two disjunct nodes in the DT.
So I believe we should represent the codec driver as a child of the
remoteproc driver, utilizing the newly introduced "remoteproc
subdevices" to probe and remove the codec driver based on the state of
the remoteproc driver. This relationship will also allow us to tie
certain resources (e.g. the clocks and power-domain) to the remoteproc
driver and use pm_runtime in either driver to make sure the resources
are enabled appropriately.
I did backport some patches from my v4.10 remoteproc pull request into
[2] and merged this into [1] and made a prototype of this. You can find
it here [3], I did test that I can boot the remoteproc and run
v4l2-compliance, shut it down, boot it back up and re-run
v4l2-compliance, and it seems to work fine.
With these patches you can compile the remoteproc driver builtin to the
kernel and once your system is booted you can issue:
echo start > /sys/class/remoteproc/remoteproc0/state
and venus should boot and the codec should be probed.
echo stop > /sys/class/remoteproc/remoteproc0/state
will shut down the core after removing the codec.
Please let me know if you think this is a viable solution.
(This is only tested on db410c so far, looks like we might need a few
more clocks for 8996 and we should probably be explicit about the noc
and its resources)
[1] https://git.linaro.org/people/stanimir.varbanov/linux.git/log/?h=release/qcomlt-4.9-venus-wip
[2] https://github.com/andersson/kernel/commits/qcomlt/v4.9-rproc-backport
[3] https://github.com/andersson/kernel/commits/qcomlt/venus-wip
Regards,
Bjorn
next prev parent reply other threads:[~2016-12-13 6:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 10:50 [RESEND PATCH v2] remoteproc: qcom: Venus firmware loader support for msm8996 Avaneesh Kumar Dwivedi
2016-11-29 10:50 ` [RESEND PATCH v2] remoteproc: qcom: Add venus rproc support on msm8996 platform Avaneesh Kumar Dwivedi
2016-11-29 19:27 ` Stephen Boyd
2016-11-30 5:24 ` Dwivedi, Avaneesh Kumar (avani)
2016-11-30 9:22 ` Stanimir Varbanov
2016-12-05 9:46 ` Dwivedi, Avaneesh Kumar (avani)
2016-12-07 10:49 ` Stanimir Varbanov
2016-12-13 6:51 ` Bjorn Andersson [this message]
2016-12-17 0:56 ` Stephen Boyd
2016-12-17 7:11 ` Bjorn Andersson
2016-12-21 6:40 ` Dwivedi, Avaneesh Kumar (avani)
2017-01-25 12:37 ` Stanimir Varbanov
2016-11-29 19:24 ` [RESEND PATCH v2] remoteproc: qcom: Venus firmware loader support for msm8996 Stephen Boyd
2016-11-30 5:15 ` Dwivedi, Avaneesh Kumar (avani)
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=20161213065118.GF3439@tuxbot \
--to=bjorn.andersson@linaro.org \
--cc=agross@codeaurora.org \
--cc=akdwived@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=sboyd@codeaurora.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 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).