From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75E9FC2D0D0 for ; Mon, 23 Dec 2019 10:43:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DA452053B for ; Mon, 23 Dec 2019 10:43:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hmsl3JEt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbfLWKnZ (ORCPT ); Mon, 23 Dec 2019 05:43:25 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:42674 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfLWKnZ (ORCPT ); Mon, 23 Dec 2019 05:43:25 -0500 Received: by mail-ed1-f68.google.com with SMTP id e10so14899969edv.9 for ; Mon, 23 Dec 2019 02:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uk7naUju2+XbutO3mWqlPuK0fzl6xEjormjMxI+qpl8=; b=hmsl3JEtm3nmnkhumYmwRTOC19hA7BaLhnTRrHH1S5/z6VywLyGNHuRCFtG1Mps340 JwYL7ixxMa0X7G2Jm3Hbe0G+GMf5CvjC87tfxTfU5fi9xbr9RbIWy5ssft3S/ZKDkXue xL9+tlHsEP4+yN7KvLQPnTALQTZovIKws3LeFG99J2xTTe4+glksinN5Rtt4ZS3y8IBm P1YkWz5BGkv+S1p2LxDFQucAxMCL+uxaM7k8+EGcaQNHh1Dg0K8MwsSmmk8+eI43KJ+G 7NDv/0LWEs2kmgYl3gEC6VHrnudvOypshfYxFWln18a0JCKOmUWciBKgd9d8CQeohHoW THhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uk7naUju2+XbutO3mWqlPuK0fzl6xEjormjMxI+qpl8=; b=ZXlYOnmRXM3w2gDReRGUR5scD85Vu1DbPgTBbxZVm6/GNbd5z/RiqMSHMDa5sPtsW4 3CWWi76DhaZtJW4+BYHp7j4gIZPXEsQlgNYz3z9cqVh6i5V+8nTL5aNASrX5XPgubgWB XRgYZstaz+vim6Fh7P/Exvw1S1i4PbRUNkVYPjG4xjCVx2brNoexD7Ha5YoF1X1HWy26 +zuyV3JARetmBMFo/ajcTRwyGdgQOyUdhs0vrKSGpe90VhirfWg29aL1omA2W+TyLUjF 87mx6U9xrwjikhLfdukk2I0nBx1RQlaRGfPSskhmHy0Imm5dVFqi0RK1ihxIkTrmBIfR B2UA== X-Gm-Message-State: APjAAAX2FFieUH5S8szHz+S2HtZy5k9hDYG9nU3lRr0FduoBshYQi4aW vbHskliOBgVzO8YgErUaFAaDAw== X-Google-Smtp-Source: APXvYqyWEpmt29x0qQj5AT9WoLd0KyIuXpzp58GzNrpJ0iW9CCWNUHZbp3UHiIf4zluasnKm5DBz5Q== X-Received: by 2002:a05:6402:12d2:: with SMTP id k18mr31420757edx.253.1577097803403; Mon, 23 Dec 2019 02:43:23 -0800 (PST) Received: from [192.168.27.209] ([37.157.136.193]) by smtp.googlemail.com with ESMTPSA id z22sm2200251edq.79.2019.12.23.02.43.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Dec 2019 02:43:22 -0800 (PST) Subject: Re: [PATCH 3/3] venus: core: add sc7180 DT compatible and resource struct To: dikshita@codeaurora.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vgarodia@codeaurora.org References: <1576828760-13176-1-git-send-email-dikshita@codeaurora.org> <1576828760-13176-4-git-send-email-dikshita@codeaurora.org> <98c83352cae3a5e38a3711f81dc28df5@codeaurora.org> From: Stanimir Varbanov Message-ID: Date: Mon, 23 Dec 2019 12:43:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <98c83352cae3a5e38a3711f81dc28df5@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Dikshita, On 12/23/19 12:04 PM, dikshita@codeaurora.org wrote: > Hi Stan, > > Thanks for the review! > > On 2019-12-20 15:03, Stanimir Varbanov wrote: >> 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 >>> --- >>>  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 > Sure, I will address this in next version. >> >>>  }; >>> >>>  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? > .load is not being used any longer to calculate load and is a dummy value. > So keeping it 0. Hmm, ok I forgot about that fact. I suppose it is fine then. I found some other issue. Looking into [1], for sc7180 we have two more clock-controller frequencies, could you add them too in the table. And last, in the same patch we have 19.2MHz do you think such frequency makes any sense? [1] https://lkml.org/lkml/2019/11/15/361 > >> >>> +}; >>> + >>> +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. > Sure, I will address this in next version. >> >>> + >>> +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. > > After checking further on this I see that max_load can be removed since > it is not being used now to determine if H/W is overloaded or not. > What do you suggest? Lets have it just for informational reasons. -- regards, Stan