linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Bjorn Andersson <andersson@kernel.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH v4 12/42] drm/msm/dpu: split SM6115 catalog entry to the separate file
Date: Tue,  4 Apr 2023 16:05:52 +0300	[thread overview]
Message-ID: <20230404130622.509628-13-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230404130622.509628-1-dmitry.baryshkov@linaro.org>

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    | 95 +++++++++++++++++++
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 89 +----------------
 2 files changed, 97 insertions(+), 87 deletions(-)
 create mode 100644 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h

diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
new file mode 100644
index 000000000000..f6db2d42a0ed
--- /dev/null
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h
@@ -0,0 +1,95 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DPU_6_3_SM6115_H
+#define _DPU_6_3_SM6115_H
+
+static const struct dpu_caps sm6115_dpu_caps = {
+	.max_mixer_width = DEFAULT_DPU_LINE_WIDTH,
+	.max_mixer_blendstages = 0x4,
+	.qseed_type = DPU_SSPP_SCALER_QSEED4,
+	.has_dim_layer = true,
+	.has_idle_pc = true,
+	.max_linewidth = 2160,
+	.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
+};
+
+static const struct dpu_ubwc_cfg sm6115_ubwc_cfg = {
+	.ubwc_version = DPU_HW_UBWC_VER_10,
+	.highest_bank_bit = 0x1,
+	.ubwc_swizzle = 0x7,
+};
+
+static const struct dpu_mdp_cfg sm6115_mdp[] = {
+	{
+	.name = "top_0", .id = MDP_TOP,
+	.base = 0x0, .len = 0x494,
+	.features = 0,
+	.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
+	.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
+	},
+};
+
+static const struct dpu_sspp_cfg sm6115_sspp[] = {
+	SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK,
+		sm6115_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
+	SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
+		sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
+};
+
+static const struct dpu_perf_cfg sm6115_perf_data = {
+	.max_bw_low = 3100000,
+	.max_bw_high = 4000000,
+	.min_core_ib = 2400000,
+	.min_llcc_ib = 800000,
+	.min_dram_ib = 800000,
+	.min_prefill_lines = 24,
+	.danger_lut_tbl = {0xff, 0xffff, 0x0},
+	.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
+	.qos_lut_tbl = {
+		{.nentry = ARRAY_SIZE(sc7180_qos_linear),
+		.entries = sc7180_qos_linear
+		},
+		{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
+		.entries = sc7180_qos_macrotile
+		},
+		{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
+		.entries = sc7180_qos_nrt
+		},
+		/* TODO: macrotile-qseed is different from macrotile */
+	},
+	.cdp_cfg = {
+		{.rd_enable = 1, .wr_enable = 1},
+		{.rd_enable = 1, .wr_enable = 0}
+	},
+	.clk_inefficiency_factor = 105,
+	.bw_inefficiency_factor = 120,
+};
+
+static const struct dpu_mdss_cfg sm6115_dpu_cfg = {
+	.caps = &sm6115_dpu_caps,
+	.ubwc = &sm6115_ubwc_cfg,
+	.mdp_count = ARRAY_SIZE(sm6115_mdp),
+	.mdp = sm6115_mdp,
+	.ctl_count = ARRAY_SIZE(qcm2290_ctl),
+	.ctl = qcm2290_ctl,
+	.sspp_count = ARRAY_SIZE(sm6115_sspp),
+	.sspp = sm6115_sspp,
+	.mixer_count = ARRAY_SIZE(qcm2290_lm),
+	.mixer = qcm2290_lm,
+	.dspp_count = ARRAY_SIZE(qcm2290_dspp),
+	.dspp = qcm2290_dspp,
+	.pingpong_count = ARRAY_SIZE(qcm2290_pp),
+	.pingpong = qcm2290_pp,
+	.intf_count = ARRAY_SIZE(qcm2290_intf),
+	.intf = qcm2290_intf,
+	.vbif_count = ARRAY_SIZE(sdm845_vbif),
+	.vbif = sdm845_vbif,
+	.perf = &sm6115_perf_data,
+	.mdss_irqs = IRQ_SC7180_MASK,
+};
+
+#endif
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 16fd7fd41ea0..6a31a70ea764 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -366,16 +366,6 @@ static const struct dpu_caps sc7180_dpu_caps = {
 	.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
 };
 
-static const struct dpu_caps sm6115_dpu_caps = {
-	.max_mixer_width = DEFAULT_DPU_LINE_WIDTH,
-	.max_mixer_blendstages = 0x4,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
-	.has_dim_layer = true,
-	.has_idle_pc = true,
-	.max_linewidth = 2160,
-	.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
-};
-
 static const struct dpu_caps sm8150_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
@@ -435,12 +425,6 @@ static const struct dpu_ubwc_cfg sc7180_ubwc_cfg = {
 	.highest_bank_bit = 0x3,
 };
 
-static const struct dpu_ubwc_cfg sm6115_ubwc_cfg = {
-	.ubwc_version = DPU_HW_UBWC_VER_10,
-	.highest_bank_bit = 0x1,
-	.ubwc_swizzle = 0x7,
-};
-
 static const struct dpu_ubwc_cfg sm8150_ubwc_cfg = {
 	.ubwc_version = DPU_HW_UBWC_VER_30,
 	.highest_bank_bit = 0x2,
@@ -551,18 +535,6 @@ static const struct dpu_mdp_cfg sc8180x_mdp[] = {
 	},
 };
 
-static const struct dpu_mdp_cfg sm6115_mdp[] = {
-	{
-	.name = "top_0", .id = MDP_TOP,
-	.base = 0x0, .len = 0x494,
-	.features = 0,
-	.clk_ctrls[DPU_CLK_CTRL_VIG0] = {
-		.reg_off = 0x2ac, .bit_off = 0},
-	.clk_ctrls[DPU_CLK_CTRL_DMA0] = {
-		.reg_off = 0x2ac, .bit_off = 8},
-	},
-};
-
 static const struct dpu_mdp_cfg sm8250_mdp[] = {
 	{
 	.name = "top_0", .id = MDP_TOP,
@@ -898,13 +870,6 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 =
 				_VIG_SBLK("0", 2, DPU_SSPP_SCALER_QSEED4);
 
-static const struct dpu_sspp_cfg sm6115_sspp[] = {
-	SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK,
-		sm6115_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
-	SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
-		sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
-};
-
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 =
 				_VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED4);
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 =
@@ -1679,35 +1644,6 @@ static const struct dpu_perf_cfg sc7180_perf_data = {
 	.bw_inefficiency_factor = 120,
 };
 
-static const struct dpu_perf_cfg sm6115_perf_data = {
-	.max_bw_low = 3100000,
-	.max_bw_high = 4000000,
-	.min_core_ib = 2400000,
-	.min_llcc_ib = 800000,
-	.min_dram_ib = 800000,
-	.min_prefill_lines = 24,
-	.danger_lut_tbl = {0xff, 0xffff, 0x0},
-	.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
-	.qos_lut_tbl = {
-		{.nentry = ARRAY_SIZE(sc7180_qos_linear),
-		.entries = sc7180_qos_linear
-		},
-		{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
-		.entries = sc7180_qos_macrotile
-		},
-		{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
-		.entries = sc7180_qos_nrt
-		},
-		/* TODO: macrotile-qseed is different from macrotile */
-	},
-	.cdp_cfg = {
-		{.rd_enable = 1, .wr_enable = 1},
-		{.rd_enable = 1, .wr_enable = 0}
-	},
-	.clk_inefficiency_factor = 105,
-	.bw_inefficiency_factor = 120,
-};
-
 static const struct dpu_perf_cfg sm8150_perf_data = {
 	.max_bw_low = 12800000,
 	.max_bw_high = 12800000,
@@ -1894,29 +1830,6 @@ static const struct dpu_mdss_cfg sc7180_dpu_cfg = {
 	.mdss_irqs = IRQ_SC7180_MASK,
 };
 
-static const struct dpu_mdss_cfg sm6115_dpu_cfg = {
-	.caps = &sm6115_dpu_caps,
-	.ubwc = &sm6115_ubwc_cfg,
-	.mdp_count = ARRAY_SIZE(sm6115_mdp),
-	.mdp = sm6115_mdp,
-	.ctl_count = ARRAY_SIZE(qcm2290_ctl),
-	.ctl = qcm2290_ctl,
-	.sspp_count = ARRAY_SIZE(sm6115_sspp),
-	.sspp = sm6115_sspp,
-	.mixer_count = ARRAY_SIZE(qcm2290_lm),
-	.mixer = qcm2290_lm,
-	.dspp_count = ARRAY_SIZE(qcm2290_dspp),
-	.dspp = qcm2290_dspp,
-	.pingpong_count = ARRAY_SIZE(qcm2290_pp),
-	.pingpong = qcm2290_pp,
-	.intf_count = ARRAY_SIZE(qcm2290_intf),
-	.intf = qcm2290_intf,
-	.vbif_count = ARRAY_SIZE(sdm845_vbif),
-	.vbif = sdm845_vbif,
-	.perf = &sm6115_perf_data,
-	.mdss_irqs = IRQ_SC7180_MASK,
-};
-
 static const struct dpu_mdss_cfg sm8150_dpu_cfg = {
 	.caps = &sm8150_dpu_caps,
 	.ubwc = &sm8150_ubwc_cfg,
@@ -2025,6 +1938,8 @@ static const struct dpu_mdss_cfg qcm2290_dpu_cfg = {
 	.mdss_irqs = IRQ_SC7180_MASK,
 };
 
+#include "catalog/dpu_6_3_sm6115.h"
+
 #include "catalog/dpu_7_0_sm8350.h"
 #include "catalog/dpu_7_2_sc7280.h"
 
-- 
2.39.2


  parent reply	other threads:[~2023-04-04 13:08 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 13:05 [PATCH v4 00/42] drm/msm/dpu: rework HW catalog Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 01/42] drm/msm/dpu: use CTL_SC7280_MASK for sm8450's ctl_0 Dmitry Baryshkov
2023-04-04 22:12   ` Abhinav Kumar
2023-04-05  0:33     ` Dmitry Baryshkov
2023-04-05  0:39       ` Abhinav Kumar
2023-04-05  0:43         ` Dmitry Baryshkov
2023-04-05  1:00           ` Abhinav Kumar
2023-04-05  1:17             ` Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 02/42] drm/msm/dpu: Allow variable SSPP_BLK size Dmitry Baryshkov
2023-04-04 22:19   ` Abhinav Kumar
2023-04-05  0:35     ` Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 03/42] drm/msm/dpu: Allow variable INTF_BLK size Dmitry Baryshkov
2023-04-04 22:30   ` Abhinav Kumar
2023-04-05  0:37     ` Dmitry Baryshkov
2023-04-05  1:02       ` Abhinav Kumar
2023-04-04 13:05 ` [PATCH v4 04/42] drm/msm/dpu: constify DSC data structures Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 05/42] drm/msm/dpu: mark remaining pp data as const Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 06/42] drm/msm/dpu: move UBWC/memory configuration to separate struct Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 07/42] drm/msm/dpu: split SM8550 catalog entry to the separate file Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 08/42] drm/msm/dpu: split SM8450 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 09/42] drm/msm/dpu: split SC8280XP " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 10/42] drm/msm/dpu: split SC7280 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 11/42] drm/msm/dpu: split SM8350 " Dmitry Baryshkov
2023-04-04 13:05 ` Dmitry Baryshkov [this message]
2023-04-04 13:05 ` [PATCH v4 13/42] drm/msm/dpu: split QCM2290 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 14/42] drm/msm/dpu: split SC7180 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 15/42] drm/msm/dpu: split SM8250 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 16/42] drm/msm/dpu: split SC8180X " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 17/42] drm/msm/dpu: split SM8150 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 18/42] drm/msm/dpu: split MSM8998 " Dmitry Baryshkov
2023-04-04 13:05 ` [PATCH v4 19/42] drm/msm/dpu: split SDM845 " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 20/42] drm/msm/dpu: duplicate sdm845 catalog entries Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 21/42] drm/msm/dpu: duplicate sc7180 " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 22/42] drm/msm/dpu: duplicate sm8150 " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 23/42] drm/msm/dpu: duplicate sm8250 " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 24/42] drm/msm/dpu: duplicate sm8350 " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 25/42] drm/msm/dpu: expand sc8180x catalog Dmitry Baryshkov
2023-04-04 22:51   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 26/42] drm/msm/dpu: expand sc7180 catalog Dmitry Baryshkov
2023-04-04 23:06   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 27/42] drm/msm/dpu: expand sm6115 catalog Dmitry Baryshkov
2023-04-05  1:08   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 28/42] drm/msm/dpu: expand sm8550 catalog Dmitry Baryshkov
2023-04-05  1:12   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 29/42] drm/msm/dpu: use defined symbol for sc8280xp's maxwidth Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 30/42] drm/msm/dpu: catalog: add comments regarding DPU_CTL_SPLIT_DISPLAY Dmitry Baryshkov
2023-04-05  1:29   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 31/42] drm/msm/dpu: enable DPU_CTL_SPLIT_DISPLAY for sc8280xp Dmitry Baryshkov
2023-04-05  1:34   ` Abhinav Kumar
2023-04-04 13:06 ` [PATCH v4 32/42] drm/msm/dpu: enable DSPP_2/3 for LM_2/3 on sm8450 Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 33/42] drm/msm/dpu: drop duplicate vig_sblk instances Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 34/42] drm/msm/dpu: enable DSPP and DSC on sc8180x Dmitry Baryshkov
2023-04-07 23:43   ` Abhinav Kumar
2023-04-08  0:08     ` Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 35/42] drm/msm/dpu: inline IRQ_n_MASK defines Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 36/42] drm/msm/dpu: rename INTF_foo_MASK to contain major DPU version Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 37/42] drm/msm/dpu: rename CTL_foo_MASK " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 38/42] drm/msm/dpu: rename VIG and DMA_foo_MASK " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 39/42] drm/msm/dpu: rename MIXER_foo_MASK " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 40/42] drm/msm/dpu: rename MERGE_3D_foo_MASK " Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 41/42] drm/msm/dpu: fetch DPU configuration from match data Dmitry Baryshkov
2023-04-04 13:06 ` [PATCH v4 42/42] drm/msm/dpu: drop unused macros from hw catalog Dmitry Baryshkov
2023-04-08  0:19 ` [PATCH v4 00/42] drm/msm/dpu: rework HW catalog Dmitry Baryshkov

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=20230404130622.509628-13-dmitry.baryshkov@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.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).