Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp526114ybj; Thu, 7 May 2020 01:15:21 -0700 (PDT) X-Google-Smtp-Source: APiQypKUNgQ4kiMjEhtoDACyovA7/q6e23z1clqtiJTnQms9Enx5BKwZf5yYgfcKmq05caMhg4HT X-Received: by 2002:a05:6402:1587:: with SMTP id c7mr10124768edv.61.1588839320992; Thu, 07 May 2020 01:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588839320; cv=none; d=google.com; s=arc-20160816; b=txZpWrkdisGxG9BB6A0ezGj82610+en33RRNCkv1yREJuVZTho+77aSRnj7mhkTN+e Y5F2+jfRa3dSbNPf1nJBovDlNFGeDIkatpU7qNsC1KUaQ3RODkyCUtivF1P+5zNB+uqs 6sSVTOopSDPL5Ebjwy9CQyHr4QRblH0Vr4ud2p3DTxt+ItpvUnAgvQteGGIOHZGI1kbs jsVZBXndKCwfi829MeXXyWrqnxbz0EKTJ6qBu30DRY5VSy+0/w+oujgsE6hAq0tEudVs 10t71cWPAuwpRI/P1YvMldre2op4WpSK7gAuz57zoh7oI3GDXvRp6PQLGdT9FzOKKZCr tQtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=J7Nyoh6TN298A/zGPu60YeuCRUMyhvi1B0VPpIRXkD8=; b=V54lZOM/N5dEDWPSpWNghcWMJl/XjQeKYCcizLZZle1B0XDmwI8KYM/+1tMHo7Nt+i CuXlHlpI38PRKInFVvmSADZTp9oJow6XtWoTSJBLCkHG4jbRRGGk7RfTYafAhuRNMm6C hGkytcHhSh1m8b/jQg+DUf0U/30INm0Te2/V1NrWg5moO8/woslVKbQbHiLm+mh1fBlK wUYtzdujxOfZEPd7ItuR+sBW8UDIusn/9AGUBlSxGmNen4RazvKZZxD+ma7ThAKsSVzR rRqOmpIBwvOj/7NBK2vNGC5IRkg9abRAwhxAn9D8KDHIOFvlwVppvth5ahPZfYO9CH2w ew8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Df6/Mbha"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si2612534edx.530.2020.05.07.01.14.57; Thu, 07 May 2020 01:15:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Df6/Mbha"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgEGINb (ORCPT + 99 others); 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-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