From: Dikshita Agarwal <dikshita@codeaurora.org>
To: linux-media@vger.kernel.org, stanimir.varbanov@linaro.org
Cc: linux-kernel@vger.kernel.org, vgarodia@codeaurora.org,
Dikshita Agarwal <dikshita@codeaurora.org>
Subject: [PATCH 2/7] media: venus: core: Add sc7280 DT compatible and resource data
Date: Wed, 19 May 2021 15:06:43 +0530 [thread overview]
Message-ID: <1621417008-6117-3-git-send-email-dikshita@codeaurora.org> (raw)
In-Reply-To: <1621417008-6117-1-git-send-email-dikshita@codeaurora.org>
Adds a sm7280 compatible binding to the venus core.
Co-developed-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
---
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
next prev parent reply other threads:[~2021-05-19 9:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 9:36 [PATCH 0/7] media: venus: Enable venus support on sc7280 Dikshita Agarwal
2021-05-19 9:36 ` [PATCH 1/7] venus: firmware: enable no tz fw loading for sc7280 Dikshita Agarwal
2021-05-31 9:01 ` Stanimir Varbanov
2021-05-19 9:36 ` Dikshita Agarwal [this message]
2021-05-31 11:18 ` [PATCH 2/7] media: venus: core: Add sc7280 DT compatible and resource data Stanimir Varbanov
2021-05-19 9:36 ` [PATCH 3/7] media: venus: Add num_vpp_pipes to resource structure Dikshita Agarwal
2021-05-31 11:19 ` Stanimir Varbanov
2021-05-19 9:36 ` [PATCH 4/7] media: venus: hfi: Skip AON register programming for V6 1pipe Dikshita Agarwal
2021-05-31 11:19 ` Stanimir Varbanov
2021-05-19 9:36 ` [PATCH 5/7] venus: vdec: set work route to fw Dikshita Agarwal
2021-05-31 10:32 ` Stanimir Varbanov
2021-05-19 9:36 ` [PATCH 6/7] media: venus: helpers: update NUM_MBS macro calculation Dikshita Agarwal
2021-05-31 11:21 ` Stanimir Varbanov
2021-05-19 9:36 ` [PATCH 7/7] media: venus: Set buffer to FW based on FW min count requirement Dikshita Agarwal
2021-05-31 11:28 ` Stanimir Varbanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621417008-6117-3-git-send-email-dikshita@codeaurora.org \
--to=dikshita@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=vgarodia@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).