devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Dikshita Agarwal <dikshita@codeaurora.org>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, vgarodia@codeaurora.org
Subject: Re: [PATCH 3/3] venus: core: add sc7180 DT compatible and resource struct
Date: Fri, 20 Dec 2019 11:33:39 +0200	[thread overview]
Message-ID: <b1b5ee06-bc39-cfc0-b2c8-8073f8857fde@linaro.org> (raw)
In-Reply-To: <1576828760-13176-4-git-send-email-dikshita@codeaurora.org>

Hi Dikshita,

Thanks for the patch!

On 12/20/19 9:59 AM, Dikshita Agarwal wrote:
> This add DT compatible string and resource structure for sc7180.
> 
> Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
> ---
>  drivers/media/platform/qcom/venus/core.c | 58 +++++++++++++++++++++++++++++++-
>  1 file changed, 57 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index c7525d9..e8c8b28 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -469,7 +469,7 @@ static __maybe_unused int venus_runtime_resume(struct device *dev)
>  	{ 2073600, 3929000, 0, 5551000, 0 },	/* 4096x2160@60 */
>  	{ 1036800, 1987000, 0, 2797000, 0 },	/* 4096x2160@30 */
>  	{  489600, 1040000, 0, 1298000, 0 },	/* 1920x1080@60 */
> -	{  244800,  530000, 0,  659000, 0 },	/* 1920x1080@30 */
> +	{  244800,  442000, 0,  659000, 0 },	/* 1920x1080@30 */

unrelated change, please drop it

>  };
>  
>  static const struct venus_resources sdm845_res = {
> @@ -521,11 +521,67 @@ static __maybe_unused int venus_runtime_resume(struct device *dev)
>  	.fwname = "qcom/venus-5.2/venus.mdt",
>  };
>  
> +static const struct freq_tbl sc7180_freq_table[] = {
> +	{  0, 380000000 },
> +	{  0, 340000000 },
> +	{  0, 270000000 },
> +	{  0, 150000000 },

why .load is zero?

> +};
> +
> +static struct codec_freq_data sc7180_codec_freq_data[] =  {
> +	{ V4L2_PIX_FMT_H264, VIDC_SESSION_TYPE_ENC, 675, 10 },
> +	{ V4L2_PIX_FMT_HEVC, VIDC_SESSION_TYPE_ENC, 675, 10 },
> +	{ V4L2_PIX_FMT_VP8, VIDC_SESSION_TYPE_ENC, 675, 10 },
> +	{ V4L2_PIX_FMT_MPEG2, VIDC_SESSION_TYPE_DEC, 200, 10 },
> +	{ V4L2_PIX_FMT_H264, VIDC_SESSION_TYPE_DEC, 200, 10 },
> +	{ V4L2_PIX_FMT_HEVC, VIDC_SESSION_TYPE_DEC, 200, 10 },
> +	{ V4L2_PIX_FMT_VP8, VIDC_SESSION_TYPE_DEC, 200, 10 },
> +	{ V4L2_PIX_FMT_VP9, VIDC_SESSION_TYPE_DEC, 200, 10 },
> +};

the table is exactly the same as sdm845 one, please reuse it.

> +
> +static const struct bw_tbl sc7180_bw_table_enc[] = {
> +	{  972000,  750000, 0, 0, 0 },	/* 3840x2160@30 */
> +	{  489600,  451000, 0, 0, 0 },	/* 1920x1080@60 */
> +	{  244800,  234000, 0, 0, 0 },	/* 1920x1080@30 */
> +};
> +
> +static const struct bw_tbl sc7180_bw_table_dec[] = {
> +	{ 1036800, 1386000, 0, 1875000, 0 },	/* 4096x2160@30 */
> +	{  489600,  865000, 0, 1146000, 0 },	/* 1920x1080@60 */
> +	{  244800,  530000, 0,  583000, 0 },	/* 1920x1080@30 */
> +};
> +
> +static const struct venus_resources sc7180_res = {
> +	.freq_tbl = sc7180_freq_table,
> +	.freq_tbl_size = ARRAY_SIZE(sc7180_freq_table),
> +	.bw_tbl_enc = sc7180_bw_table_enc,
> +	.bw_tbl_enc_size = ARRAY_SIZE(sc7180_bw_table_enc),
> +	.bw_tbl_dec = sc7180_bw_table_dec,
> +	.bw_tbl_dec_size = ARRAY_SIZE(sc7180_bw_table_dec),
> +	.codec_freq_data = sc7180_codec_freq_data,
> +	.codec_freq_data_size = ARRAY_SIZE(sc7180_codec_freq_data),
> +	.clks = {"core", "iface", "bus" },
> +	.clks_num = 3,
> +	.vcodec0_clks = { "vcodec0_core", "vcodec0_bus" },
> +	.vcodec_clks_num = 2,
> +	.vcodec_pmdomains = { "venus", "vcodec0" },
> +	.vcodec_pmdomains_num = 2,
> +	.vcodec_num = 1,
> +	.max_load = 3110400,	/* 4096x2160@90 */

Looking into above bandwidth tables I can guess that the maximimum load
is reached at 4096x2160@30? If so you have to change it here.

<cut>

-- 
regards,
Stan

  reply	other threads:[~2019-12-20  9:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  7:59 [PATCH v2,0/3] Enable video on sc7180 Dikshita Agarwal
2019-12-20  7:59 ` [PATCH 1/3] arm64: dts: sc7180: Add Venus video codec DT node Dikshita Agarwal
2019-12-20  9:34   ` Stanimir Varbanov
2019-12-23  9:50     ` dikshita
2019-12-24 12:12     ` Sai Prakash Ranjan
2019-12-24 13:24       ` Sai Prakash Ranjan
2019-12-29  3:18   ` Bjorn Andersson
2020-01-02  7:54     ` vgarodia
2019-12-20  7:59 ` [PATCH 2/3] dt-bindings: media: venus: Add sc7180 DT schema Dikshita Agarwal
2019-12-20  9:37   ` Stanimir Varbanov
2019-12-23 10:56     ` dikshita
2019-12-20  7:59 ` [PATCH 3/3] venus: core: add sc7180 DT compatible and resource struct Dikshita Agarwal
2019-12-20  9:33   ` Stanimir Varbanov [this message]
2019-12-23 10:04     ` dikshita
2019-12-23 10:43       ` 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=b1b5ee06-bc39-cfc0-b2c8-8073f8857fde@linaro.org \
    --to=stanimir.varbanov@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@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).