Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1726846pxj; Wed, 19 May 2021 12:26:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXMyCxzJ7d9/did9O4UVbAJyWlaKkGRT1Y8eYfhU77nrpLxAkFFiWr6yQxpvUgH34MLiqp X-Received: by 2002:aa7:cfcd:: with SMTP id r13mr659105edy.177.1621452373266; Wed, 19 May 2021 12:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452373; cv=none; d=google.com; s=arc-20160816; b=aOi+MJiw92AtlTJ0mX2ib/LhSJVHi7eiJrZVdnC2WrzpKhm92IuPPmXTgIyCUNycGy i97lVuPVwlEgOLsj/DEA/UzhAcHXfFn0ky+wzg9trElfDPY/xbM9bCeqLy821tEGbJXs ONFSPNPS3VfJws3jEx70GcWRfTyg+TubVB8SjEaxLB79nQ/e1QzS1Bs7ILM45L2dR8+b O1S6JPAEO92+Fmb1wHCFK3eNu1OO2yOjoEcYZdJ3WT4RqbwLSMita93A8YQODuhJ9mM4 Wv8RnmCalY6roLzKGDO84TvALZraRw7B9Q28MbHJK5XyoBzaq67r+FzeCfao0T1XKYA5 xAdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=BuYEbc16MhlU5wEMuSxspULEXmLHqFyrlUljdhdAJBs=; b=ola3F8i10hndzxsC4NUgbfI6P24iQUM1T+kK68BWSof/Nh3hZGkR1U/Pb9I/k26evH xtutlGf7Z2AbHOQm9O69KYyl8soRq94QVxDB3YOZHRQTf7hwkLTKz9b0Lpk2tLbIvws+ mlFY/pWw0th8zlGB/ZYNhQbUhpSddTDvi7zi43mWBKG+QT3YnZ+zigTUqkKCyHHr5EI6 h9k5xa3ch4K5bMM4uvgRW9ktXOKOG3rgMObpqgTzql20bavcJ4juG192nsVCyEpq230d A3H0arpKJUiXgoGn/QuCVQDiJJjNwKZCvFhr+RFvd/0F1cVLockHEW8ugwCftTLDPKsA NcGA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si71794edx.381.2021.05.19.12.25.47; Wed, 19 May 2021 12:26:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345757AbhESJiz (ORCPT + 99 others); Wed, 19 May 2021 05:38:55 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:23523 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345763AbhESJiw (ORCPT ); Wed, 19 May 2021 05:38:52 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 19 May 2021 02:37:33 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 19 May 2021 02:37:31 -0700 X-QCInternal: smtphost Received: from dikshita-linux.qualcomm.com ([10.204.65.237]) by ironmsg02-blr.qualcomm.com with ESMTP; 19 May 2021 15:07:29 +0530 Received: by dikshita-linux.qualcomm.com (Postfix, from userid 347544) id 525DD219DC; Wed, 19 May 2021 15:07:28 +0530 (IST) From: Dikshita Agarwal To: linux-media@vger.kernel.org, stanimir.varbanov@linaro.org Cc: linux-kernel@vger.kernel.org, vgarodia@codeaurora.org, Dikshita Agarwal Subject: [PATCH 2/7] media: venus: core: Add sc7280 DT compatible and resource data Date: Wed, 19 May 2021 15:06:43 +0530 Message-Id: <1621417008-6117-3-git-send-email-dikshita@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621417008-6117-1-git-send-email-dikshita@codeaurora.org> References: <1621417008-6117-1-git-send-email-dikshita@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds a sm7280 compatible binding to the venus core. Co-developed-by: Mansur Alisha Shaik Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/core.c | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 91b1584..f9e4a3eb 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -736,6 +736,57 @@ static const struct venus_resources sm8250_res = { .fwname = "qcom/vpu-1.0/venus.mdt", }; +static const struct freq_tbl sc7280_freq_table[] = { + { 0, 460000000 }, + { 0, 424000000 }, + { 0, 335000000 }, + { 0, 240000000 }, + { 0, 133333333 }, +}; + +static const struct bw_tbl sc7280_bw_table_enc[] = { + { 1944000, 1896000, 0, 3657000, 0 }, /* 3840x2160@60 */ + { 972000, 968000, 0, 1848000, 0 }, /* 3840x2160@30 */ + { 489600, 618000, 0, 941000, 0 }, /* 1920x1080@60 */ + { 244800, 318000, 0, 480000, 0 }, /* 1920x1080@30 */ +}; + +static const struct bw_tbl sc7280_bw_table_dec[] = { + { 2073600, 2128000, 0, 3831000, 0 }, /* 4096x2160@60 */ + { 1036800, 1085000, 0, 1937000, 0 }, /* 4096x2160@30 */ + { 489600, 779000, 0, 998000, 0 }, /* 1920x1080@60 */ + { 244800, 400000, 0, 509000, 0 }, /* 1920x1080@30 */ +}; + +static const struct reg_val sm7280_reg_preset[] = { + { 0xb0088, 0 }, +}; + +static const struct venus_resources sc7280_res = { + .freq_tbl = sc7280_freq_table, + .freq_tbl_size = ARRAY_SIZE(sc7280_freq_table), + .reg_tbl = sm7280_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm7280_reg_preset), + .bw_tbl_enc = sc7280_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sc7280_bw_table_enc), + .bw_tbl_dec = sc7280_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sc7280_bw_table_dec), + .clks = {"core", "bus", "iface"}, + .clks_num = 3, + .vcodec0_clks = {"vcodec_core", "vcodec_bus"}, + .vcodec_clks_num = 2, + .vcodec_pmdomains = { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = NULL, + .vcodec_num = 1, + .hfi_version = HFI_VERSION_6XX, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/vpu-2.0/venus.mdt", +}; + static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, @@ -743,6 +794,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,sm8250-venus", .data = &sm8250_res, }, + { .compatible = "qcom,sc7280-venus", .data = &sc7280_res, }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); -- 2.7.4