From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Georgi Djakov <georgi.djakov@linaro.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Cc: Vikash Garodia <vgarodia@codeaurora.org>,
Andy Gross <agross@kernel.org>,
Aniket Masule <amasule@codeaurora.org>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 1/2] venus: use on-chip interconnect API
Date: Wed, 21 Aug 2019 10:53:20 +0300 [thread overview]
Message-ID: <939ace85-e006-db6d-02d2-b55385fa5043@linaro.org> (raw)
In-Reply-To: <cc85f55c-3d21-c3b2-6848-e48513263e39@linaro.org>
Hi Georgi,
Thanks for the review!
On 8/20/19 12:34 PM, Georgi Djakov wrote:
> Hi Stan,
>
> On 8/14/19 11:47, Stanimir Varbanov wrote:
>> This aims to add a requests for bandwidth scaling depending
>> on the resolution and framerate (macroblocks per second). The
>> exact value ff the requested bandwidth is get from a
>
> s/ff/of/
>
>> pre-calculated tables for encoder and decoder.
>>
>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>> ---
>> drivers/media/platform/qcom/venus/core.c | 34 +++++++++++
>> drivers/media/platform/qcom/venus/core.h | 14 +++++
>> drivers/media/platform/qcom/venus/helpers.c | 67 ++++++++++++++++++++-
>> 3 files changed, 114 insertions(+), 1 deletion(-)
>
> It looks like venus can be built-in, so how about the case when venus is
> built-in and the interconnect provider is a module? Maybe add a dependency in
> Kconfig to depend on INTERCONNECT || !INTERCONNECT?
yes, I forgot about that dependency.
>
>>
>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>> index 0acc7576cc58..19cbe9d5d028 100644
>> --- a/drivers/media/platform/qcom/venus/core.c
>> +++ b/drivers/media/platform/qcom/venus/core.c
>> @@ -5,6 +5,7 @@
>> */
>> #include <linux/clk.h>
>> #include <linux/init.h>
>> +#include <linux/interconnect.h>
>> #include <linux/ioctl.h>
>> #include <linux/list.h>
>> #include <linux/module.h>
>> @@ -239,6 +240,14 @@ static int venus_probe(struct platform_device *pdev)
>> if (IS_ERR(core->base))
>> return PTR_ERR(core->base);
>>
>> + core->video_path = of_icc_get(dev, "video-mem");
>> + if (IS_ERR(core->video_path))
>> + return PTR_ERR(core->video_path);
>> +
>> + core->cpucfg_path = of_icc_get(dev, "cpu-cfg");
>> + if (IS_ERR(core->cpucfg_path))
>> + return PTR_ERR(core->cpucfg_path);
>> +
>> core->irq = platform_get_irq(pdev, 0);
>> if (core->irq < 0)
>> return core->irq;
>> @@ -273,6 +282,10 @@ static int venus_probe(struct platform_device *pdev)
>> if (ret)
>> return ret;
>>
>> + ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
>> + if (ret)
>> + return ret;
>> +
>> ret = hfi_create(core, &venus_core_ops);
>> if (ret)
>> return ret;
>> @@ -355,6 +368,9 @@ static int venus_remove(struct platform_device *pdev)
>> pm_runtime_put_sync(dev);
>> pm_runtime_disable(dev);
>>
>> + icc_put(core->video_path);
>> + icc_put(core->cpucfg_path);
>> +
>
> Do you have any plans to scale the bandwidth on suspend/resume too?
Yes, we definitely need that in suspend/resume, but I guess the plan
should be add it once we implement pm_runtime autosuspend functionality
in order to easily test that.
--
regards,
Stan
next prev parent reply other threads:[~2019-08-21 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 8:46 [PATCH 0/2] Venus interconnect support for sdm845 Stanimir Varbanov
2019-08-14 8:47 ` [PATCH 1/2] venus: use on-chip interconnect API Stanimir Varbanov
2019-08-20 9:34 ` Georgi Djakov
2019-08-21 7:53 ` Stanimir Varbanov [this message]
2019-09-04 4:22 ` Bjorn Andersson
2019-09-12 15:11 ` Georgi Djakov
2019-08-14 8:47 ` [PATCH 2/2] arm64: dts: sdm845: Add interconnect properties for Venus Stanimir Varbanov
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=939ace85-e006-db6d-02d2-b55385fa5043@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=agross@kernel.org \
--cc=amasule@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=georgi.djakov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=vgarodia@codeaurora.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).