From patchwork Fri Aug 4 20:09:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 131343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp85867vqr; Fri, 4 Aug 2023 13:33:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSwW8CqLoy8o2dYlJ+7bHDXw5Ac5SiCo64c6UJ/mNE7IftKZYP3PTve55zw43Xd7w35A4C X-Received: by 2002:a05:6a00:1501:b0:675:ef91:7922 with SMTP id q1-20020a056a00150100b00675ef917922mr3022047pfu.4.1691181192920; Fri, 04 Aug 2023 13:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691181192; cv=none; d=google.com; s=arc-20160816; b=iwtfyiYoasun+/QTA7vVd3A2kbsgqfg1rLbnVySNKhCAQH855ByvTAdCDXhek7Irgc s3yAPxUx+K4fBmMHiFyRGhm3/eqWV5rygPoLLWpCDJmX7KriqclqN8obpy48bnZvvBw5 g94tKZZnOu7gOnycTQ5MLMumFCKysu7L/1fvv7c4HUNo1ILieIgG1KROoKxCq7v9qTcJ 6mV19QWH2umEOgqNwfqH4CRko9Z4FVA3qBXUG7ftAnA/TEdCsa0gQxuaN4mGtxmi/+n0 Z82QXEL8B1PS+R5M61y2wkP+fFp8FizCOwGslyZjpayREMufl2vxC217qmomFV/7I23W DiJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; fh=YwPEnDP0lHwHsH9CarSShm+/U4DnsczT6gMuGjnjhlA=; b=gv4hGFqFS4sSpqm/iMbBBsr+6TXw1u+Dd3LqeiOZbjqWdrBQWrjHrmnqLbJ9+/ZcEW 0ZYidF3rKPEyLCT0jTFtwMdmHF5nEJxbrNypgeW3sTtNlVuLf55QHe9+qRUwAbZ3FPbv Itafgt1rp8jJQ0uAabdf/L+gQobXUx0voUvtFArdwp8vCrfWBGo/dJORn9oJ5oPwNaEd k/lcb6qkjdzgF82LBrbBBUbBhpr2oV2APg2piEo0HO45Pkh7eRlXV7An838HENb5rI8P eLT3/GioS9yA3ehaymnj/yM+X7GoIpF1pVdK35FnEbsIifkij4W3JFdOCn3a35j7SL+b 08lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V4iAp70p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a056a001d8a00b006870a643e61si2181643pfw.218.2023.08.04.13.33.00; Fri, 04 Aug 2023 13:33:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V4iAp70p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230333AbjHDUJq (ORCPT + 99 others); Fri, 4 Aug 2023 16:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbjHDUJa (ORCPT ); Fri, 4 Aug 2023 16:09:30 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073783A8C for ; Fri, 4 Aug 2023 13:09:24 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b9c66e2e36so30900481fa.1 for ; Fri, 04 Aug 2023 13:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691179763; x=1691784563; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; b=V4iAp70pVK1GSSuJGqjPoX5t5a8sfEZUzvv4C5LhZAE3lnSAEvm0R9B7CW+/wjn79P VHtTsJqwUtdGcRZsmf2uMt3D+FmAwjMRQFxrxQGZQIooNyq0DCDKwUszEr+w1Mlily8B 9LmYDkegkCDEfQtLLX6qqvX+BBFvPN7hQ128FvZ9jg1PkCWSWnLTDl9/yJFXaW02221b nlK1GyUoS/TSSQa82DBXCfx7uLVdtLvbvj8W4Waj6e6AWwCaUh18/30luXux1hofiMkz jjG0NKu0/B7BzDWyjxsHoLt9lNmic3FlvD1RLG1mKnvW3npKH6U1RFCBmVcFD+A5/p9l uEDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691179763; x=1691784563; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BBO4Vdvml2SYBdu5NUZqbYfg4CTImrGpccpVKF2w13k=; b=S5Qw7xoodQ5dBC8Tr9ho8Oa2BR9xOT47RnObVy89pVOZr/+KLnjpskQtXSi3fkbaGK mxJj3FjNz5ENLOr9s2+4sIp7vpSOMzs7vL7HWZx0BkPSQH6fnkPZx6dsrz1BR4FMW7Db 570+56eThPogVyGAA6vU2N0xgCXLXfNDyVFOK0S9Xk9qf3+cIw2TRJ4wXesgbGcAUlCn ShoMWl0YFIxxNrGh6qKuNQ6/cdAJ73iC+osSCjZE+g/n+k1LxXUJ2CEmi/Q+3Ce6xxSF 0r90PE5eBkSbys593ep4oXeKK+Y5g1/348GVltLK/hc68KUueTi4mDTAvOSMqN17NkOr xDog== X-Gm-Message-State: AOJu0Yy27DpMak8SCYgICJ0HQKchh6+Gf/JilDdu60aNO/d+DMj0s27T 3QiO81Fl+3e53CS5agAmyCnLtQ== X-Received: by 2002:a05:651c:200a:b0:2ba:1286:d99e with SMTP id s10-20020a05651c200a00b002ba1286d99emr207090ljo.1.1691179763173; Fri, 04 Aug 2023 13:09:23 -0700 (PDT) Received: from [192.168.1.101] (abym15.neoplus.adsl.tpnet.pl. [83.9.32.15]) by smtp.gmail.com with ESMTPSA id m8-20020a2e97c8000000b002b6fed37b18sm580048ljj.101.2023.08.04.13.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 13:09:22 -0700 (PDT) From: Konrad Dybcio Date: Fri, 04 Aug 2023 22:09:13 +0200 Subject: [PATCH 6/6] media: venus: core: Add SC8280XP resource struct MIME-Version: 1.0 Message-Id: <20230731-topic-8280_venus-v1-6-8c8bbe1983a5@linaro.org> References: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> In-Reply-To: <20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , Konrad Dybcio , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691179750; l=2590; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=ha53B+QQKlS6cZf/sln/5h8cUTUGAcICl3MpcEH5dmg=; b=K0lLgvFpQKiaTwNfLvVCPicVclZYdtr9Z1AYSsOZjtnhAZ8bWA0srGRdn3PHL4aiex9Wgf8NH yBYG0oPN5KuBUbFehP3gGMXykbemozZD3aTwqLkLRQYJT1lLyPV2E8w X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773332010656594617 X-GMAIL-MSGID: 1773332010656594617 Add SC8280XP configuration data and related compatible. Signed-off-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 5f285ae75e9d..32591b624a36 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -940,6 +940,50 @@ static const struct venus_resources sc7280_res = { .fwname = "qcom/vpu-2.0/venus.mbn", }; +static const struct freq_tbl sc8280xp_freq_table[] = { + { 0, 239999999 }, + { 0, 338000000 }, + { 0, 366000000 }, + { 0, 444000000 }, + { 0, 533000000 }, + { 0, 560000000 }, +}; + +static const struct venus_resources sc8280xp_res = { + .freq_tbl = sc8280xp_freq_table, + .freq_tbl_size = ARRAY_SIZE(sc8280xp_freq_table), + .reg_tbl = sm8350_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm8350_reg_preset), + .bw_tbl_enc = sm8250_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sm8250_bw_table_enc), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sm8250_bw_table_dec), + .clks = { "core", "iface" }, + .clks_num = 2, + .resets = { "core" }, + .resets_num = 1, + .vcodec0_clks = { "vcodec0_core" }, + .vcodec_clks_num = 1, + .vcodec_pmdomains = { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "mx", NULL }, + .vcodec_num = 1, + .max_load = 7833600, /* 7680x4320@60fps */ + .hfi_version = HFI_VERSION_6XX, + .vpu_version = VPU_VERSION_IRIS2, + .num_vpp_pipes = 4, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = GENMASK(31, 29) - 1, + .cp_start = 0, + .cp_size = 0x25800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, + .fwname = "qcom/vpu-2.0/venus.mbn", +}; + + static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res }, @@ -948,6 +992,7 @@ static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2 }, { .compatible = "qcom,sc7180-venus", .data = &sc7180_res }, { .compatible = "qcom,sc7280-venus", .data = &sc7280_res }, + { .compatible = "qcom,sc8280xp-venus", .data = &sc8280xp_res }, { .compatible = "qcom,sm8250-venus", .data = &sm8250_res }, { .compatible = "qcom,sm8350-venus", .data = &sm8350_res }, { }