[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc85f55c-3d21-c3b2-6848-e48513263e39@linaro.org>
Date: Tue, 20 Aug 2019 12:34:59 +0300
From: Georgi Djakov <georgi.djakov@...aro.org>
To: Stanimir Varbanov <stanimir.varbanov@...aro.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org
Cc: Vikash Garodia <vgarodia@...eaurora.org>,
Andy Gross <agross@...nel.org>,
Aniket Masule <amasule@...eaurora.org>,
Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 1/2] venus: use on-chip interconnect API
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@...aro.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?
>
> 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?
Thanks,
Georgi
Powered by blists - more mailing lists