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=-13.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 56F24C54E49 for ; Thu, 7 May 2020 08:13:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 303A820753 for ; Thu, 7 May 2020 08:13:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Df6/Mbha" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgEGINb (ORCPT ); Thu, 7 May 2020 04:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726074AbgEGINa (ORCPT ); Thu, 7 May 2020 04:13:30 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5D7C0610D6 for ; Thu, 7 May 2020 01:13:29 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id k1so5206429wrx.4 for ; Thu, 07 May 2020 01:13:29 -0700 (PDT) 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=J7Nyoh6TN298A/zGPu60YeuCRUMyhvi1B0VPpIRXkD8=; b=Df6/MbhaEVfEMhHwUNcTRMIYUT9M/0U7WL0VSOMhhFZneTCeZNZC/3pFk4TAipIMT0 xp2xcpNiCkBgvgse0AeKftj58pwORKkjnwon9g3du+eSV+2bCTkCgHj9OncMCGqlQKq3 VCmFUyFXhiGRf9t65xr3URIgKtRwHajRWxvybsS/qcjlM/xfXZR059+o9IyjvCXbW11P ibj2b7//mwD0B6P7LmHtKZUWbxVVVXt+IrbU9Uj8yY4xoDzGO7zoJGxcrVc9o+ukPx0n vhmsIJRFDQC9yL45QQtGgUt8nhqV3aMHTbtJxlaFY+Vanip1Ibg5gT9UlKsLc25W3hy/ 3rnA== 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=J7Nyoh6TN298A/zGPu60YeuCRUMyhvi1B0VPpIRXkD8=; b=JgxWoo8YU8Ns0IzC1CzHvW4mqU2FoHUgJR4FLRYtHt0qH2KcSW6oyM72MN7FcIInGA j/dIhKApNh9s7Wh8ig47epy3DmA1M5kWUWFunIenDUbTuyihy15t63kmdC2wd+IuxSmn hCYmtSa3o0f4qE6dr7Yjv4YlojxYz/XwC9iLk97PiGmEcIUIt5cpxCIOw8V7/uUCOoi8 OGDUYJp5KXztMi79z6Jj8hnuDPFG5iHy55gIDjR292sNs9BDuTT42yQxuBlqRczdhCFw S2zzbDBP8GCoZJKcLR79qyl2Io5BWCl0Kjb0heElaP3Dh4GNNinI83l+Kc0qd2wpoET/ TWZA== X-Gm-Message-State: AGi0PuavIFDOnY9hFpJeCWgrBu1gRQbd2NoDxO7ArKI80r89nW23P4WF v6GXO1KL7jtXzW5zBYf6gmQvM5cob/kZnw== X-Google-Smtp-Source: APiQypJn2l9LEXuUtrCJU4T9xg/aguaE6+ll31meUQQy/XlK4lu1w23zu47PB8L6M4tnbGGhLUVbTA== X-Received: by 2002:adf:f652:: with SMTP id x18mr13797663wrp.262.1588839207953; Thu, 07 May 2020 01:13:27 -0700 (PDT) Received: from [192.168.1.3] (212-5-158-166.ip.btc-net.bg. [212.5.158.166]) by smtp.googlemail.com with ESMTPSA id s18sm7542852wra.94.2020.05.07.01.13.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 01:13:27 -0700 (PDT) Subject: Re: [PATCH 1/2] media: venus: Add support for MSM8939 To: Konrad Dybcio Cc: skrzynka@konradybcio.pl, Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , linux-arm-msm , linux-media@vger.kernel.org, DTML , Linux Kernel Mailing List References: <20200501203505.144362-1-konradybcio@gmail.com> <20200501203505.144362-2-konradybcio@gmail.com> <3d73eb09-ba4e-5706-042c-0d1894928a35@linaro.org> From: Stanimir Varbanov Message-ID: Date: Thu, 7 May 2020 11:13:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, On 5/7/20 12:23 AM, Konrad Dybcio wrote: > Hi Stan, > > I have found some issues with the submitted GCC driver, related to > venus, but I have to further look into them locally and work out some > stuff. One of the things is that freq table for venus clock should be > changed to the values found here [1] (currently it has 8916 > frequencies). When I find all the causes I'll resubmit this and > include them in the cover letter, as I might've overlooked something > wrt venus driver itself when creating this patch from my WIP branch. > Also it seems like I tested this very patch incorrectly (getting > segfaults in ffmpeg with v4l2m2m now)... Anyways, I'll get back to you > when I make it work for sure. Sorry again for the inconvenience. OK. Thanks for the details, I'm waiting for good news :). If you need some help with Venus bringup ping me on IRC - my nickname is svarbanov on #v4l channel. Regarding to venus clocks, these two clocks exist in below gcc driver but missing in msm8916: gcc_venus0_core0_vcodec0_clk gcc_venus0_core1_vcodec0_clk but the Venus IP block should be the same as in msm8916. Can you point me to the donwstream gcc driver or check from where they comes. > > > [1] https://github.com/konradybcio/android_kernel_asus_msm8916-1/blob/minimal/drivers/clk/qcom/clock-gcc-8936.c#L1613-L1618 > > Konrad > > wt., 5 maj 2020 o 13:43 Stanimir Varbanov > napisaƂ(a): >> >> Hi Konrad, >> >> On 5/1/20 11:35 PM, Konrad Dybcio wrote: >>> Signed-off-by: Konrad Dybcio >>> --- >>> drivers/media/platform/qcom/venus/core.c | 33 ++++++++++++++++++++++++ >>> 1 file changed, 33 insertions(+) >>> >>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c >>> index 194b10b987672..f3a15991ac763 100644 >>> --- a/drivers/media/platform/qcom/venus/core.c >>> +++ b/drivers/media/platform/qcom/venus/core.c >>> @@ -405,6 +405,38 @@ static const struct venus_resources msm8916_res = { >>> .fwname = "qcom/venus-1.8/venus.mdt", >>> }; >>> >>> +static const struct freq_tbl msm8939_freq_table[] = { >>> + { 489600, 266670000 }, /* 1080p @ 60 */ >>> + { 244800, 200000000 }, /* 1080p @ 30 */ >>> + { 244800, 133330000 }, /* 1080p @ 30 (decode only) */ >>> + { 220800, 133330000 }, /* 720p @ 60 (decode only?) */ >>> + { 108000, 133330000 }, /* 720p @ 30*/ >>> + { 72000, 133330000 }, /* VGA @ 60 */ >>> + { 36000, 133330000 }, /* VGA @ 30 */ >> >> 133MHz is the minimum clock frequency in the GCC driver? Do you think >> that will change? >> >>> +}; >>> + >>> +static const struct reg_val msm8939_reg_preset[] = { >>> + { 0xe0020, 0x0aaaaaaa }, >>> + { 0xe0024, 0x0aaaaaaa }, >>> + { 0x80124, 0x00000003 }, >>> +}; >>> + >>> +static const struct venus_resources msm8939_res = { >>> + .freq_tbl = msm8939_freq_table, >>> + .freq_tbl_size = ARRAY_SIZE(msm8939_freq_table), >>> + .reg_tbl = msm8939_reg_preset, >>> + .reg_tbl_size = ARRAY_SIZE(msm8939_reg_preset), >>> + .clks = { "core", "iface", "bus", }, >>> + .clks_num = 3, >>> + .max_load = 489600, /* 1080p @ 60 */ >>> + .hfi_version = HFI_VERSION_1XX, >>> + .vmem_id = VIDC_RESOURCE_NONE, >>> + .vmem_size = 0, >>> + .vmem_addr = 0, >>> + .dma_mask = 0xddc00000 - 1, >>> + .fwname = "qcom/venus-1.8/venus.mdt", >>> +}; >>> + >>> static const struct freq_tbl msm8996_freq_table[] = { >>> { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */ >>> { 972000, 520000000 }, /* 4k UHD @ 30 */ >>> @@ -567,6 +599,7 @@ static const struct venus_resources sc7180_res = { >>> >>> static const struct of_device_id venus_dt_match[] = { >>> { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, >>> + { .compatible = "qcom,msm8939-venus", .data = &msm8939_res, }, >>> { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, >>> { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, >>> { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, >>> >> >> -- >> regards, >> Stan -- regards, Stan