Skip to contentSkip to conversation

drm/msm/dpu: simplify DPU sub-blocks info

PATCH Superseded Dmitry Baryshkov 2 participants 22 messages Oct 6, 2023 – Nov 1, 2023

Subsystems (3)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v6 cover drm/msm/dpu: simplify DPU sub-blocks info

The handling code also usually knows, which sub-block it is now looking at. Drop unused 'id' field and arguments and merge some of sub-block declarations.

While we are at it, also fix all VIG subblocks to contain correct scaler block version and drop the becoming unused QSEED-related feature bits.

Changes since v5:
- Fixed the rogue vig_qseed3_noscale sblk. There is no qseed3 in the noscale VIG blocks.

Changes since v4:
- Renamed dpu_vig_sblk_x_y to dpu_vig_sblk_qseed3_1_2 (Abhinav)
Note: I've choosen _qseed3_ instead of the suggested _scaler_, as there are other scaler types which might have their own versioning scheme
- Dropped the DPU_SSPP_SCALER and DPU_SSPP_CSC_ANY defines (Abhinav)

Changes since v3:
- Proprely describe dpu_scaler_blk::version field as the register value (Marijn)
- Picked up Marijn's prior art patches (sorry, missed them while preparing v3) (Marijn)

Changes since v2:
- Reworked the VIG SBLK definitions to set the scaler version (Marijn, Abhinav)
- Rebased the reset of the patches on top of this (intrusive) change.
- Folded QSEED3LITE and QSEED4 feature bits into QSEED3

Dmitry Baryshkov (8):
drm/msm/dpu: populate SSPP scaler block version drm/msm/dpu: drop the id' field from DPU_HW_SUBBLK_INFO drm/msm/dpu: drop the smart_dma_priority' field from struct
dpu_sspp_sub_blks
drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro drm/msm/dpu: rewrite scaler and CSC presense checks drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4 drm/msm/gpu: drop duplicating VIG feature masks

Marijn Suijten (2):
drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps

 .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h   |  17 +-
 .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h    |  17 +-
 .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    |  17 +-
 .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   |  17 +-
 .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |   8 +-
 .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    |  25 ++-
 .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  11 +-
 .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |   7 +-
 .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  11 +-
 .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h   |   4 +-
 .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |   7 +-
 .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    |  25 ++-
 .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h    |   9 +-
 .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  |  25 ++-
 .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    |  25 ++-
 .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    |  29 ++--
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 145 +++++++-----------
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h    |  55 +++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c   |  20 +--
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h   |  21 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c   |   6 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h   |   3 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c     |   7 +-
 23 files changed, 201 insertions(+), 310 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH v6 1/10 drm/msm/dpu: populate SSPP scaler block version

The function _dpu_hw_sspp_setup_scaler3() passes and dpu_hw_setup_scaler3() uses scaler_blk.version to determine in which way the scaler (QSEED3) block should be programmed. However up to now we were not setting this field. Set it now, splitting the vig_sblk data which has different version fields.

Fixes 9b6f4fedaac2 ("drm/msm/dpu: Add SM6125 support")
Fixes 27f0df03f3ff ("drm/msm/dpu: Add SM6375 support")
Fixes 3186acba5cdc ("drm/msm/dpu: Add SM6350 support")
Fixes efcd0107727c ("drm/msm/dpu: add support for SM8550")
Fixes 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP")
Fixes 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog")
Fixes 100d7ef6995d ("drm/msm/dpu: add support for SM8450")
Fixes 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115")
Fixes dabfdd89eaa9 ("drm/msm/disp/dpu1: add inline rotation support for sc7280")
Fixes f3af2d6ee9ab ("drm/msm/dpu: Add SC8180x to hw catalog")
Fixes 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog")
Fixes af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog")
Fixes 386fced3f76f ("drm/msm/dpu: add SM8150 to hw catalog")
Fixes b75ab05a3479 ("msm:disp:dpu1: add scaler support on SC7180 display")
Fixes 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
---
 .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    |  8 +-
 .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   |  8 +-
 .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    |  8 +-
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 95 ++++++++++++++-----
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h    |  3 +-
 5 files changed, 87 insertions(+), 35 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +4 -4
index 99acaf917e43..f0c3804f4258 100644
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_0,
+		.sblk = &sm8150_vig_sblk_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -85,7 +85,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_1,
+		.sblk = &sm8150_vig_sblk_1,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -93,7 +93,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_2,
+		.sblk = &sm8150_vig_sblk_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -101,7 +101,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_3,
+		.sblk = &sm8150_vig_sblk_3,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +4 -4
index f3de21025ca7..3ec954722a8e 100644
@@ -76,7 +76,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_0,
+		.sblk = &sm8150_vig_sblk_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -84,7 +84,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_1,
+		.sblk = &sm8150_vig_sblk_1,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -92,7 +92,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_2,
+		.sblk = &sm8150_vig_sblk_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -100,7 +100,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sdm845_vig_sblk_3,
+		.sblk = &sm8150_vig_sblk_3,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +4 -4
index 1b12178dfbca..3aed290a4111 100644
@@ -76,7 +76,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_0,
+		.sblk = &sm8450_vig_sblk_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -84,7 +84,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_1,
+		.sblk = &sm8450_vig_sblk_1,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -92,7 +92,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_2,
+		.sblk = &sm8450_vig_sblk_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -100,7 +100,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_3,
+		.sblk = &sm8450_vig_sblk_3,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +73 -22

160 lines not on this page · raw message

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +2 -1
index 6c9634209e9f..3f82d84bd1c9 100644
@@ -269,7 +269,8 @@ enum {
 /**
  * struct dpu_scaler_blk: Scaler information
  * @info:   HW register and features supported by this sub-blk
- * @version: qseed block revision
+ * @version: qseed block revision, on QSEED3+ platforms this is the value of
+ *           scaler_blk.base + QSEED3_HW_VERSION registers.
  */
 struct dpu_scaler_blk {
 	DPU_HW_SUBBLK_INFO;
Signature · 1 line
2.39.2
#2 lore raw

PATCH v6 2/10 drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP

In reply to Dmitry Baryshkov

From: Marijn Suijten <[email protected]>

This pointer callback is never used and should be removed.

[DB: dropped the helpers completely, which are unused now]
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 13 +------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h |  6 ------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c |  6 ------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h |  3 ---
 4 files changed, 1 insertion(+), 27 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -12
index f2192de93713..7e9c87088e17 100644
@@ -394,15 +394,6 @@ static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_sspp *ctx,
 			format);
 }
 
-static u32 _dpu_hw_sspp_get_scaler3_ver(struct dpu_hw_sspp *ctx)
-{
-	if (!ctx)
-		return 0;
-
-	return dpu_hw_get_scaler3_ver(&ctx->hw,
-				      ctx->cap->sblk->scaler_blk.base);
-}
-
 /*
  * dpu_hw_sspp_setup_rects()
  */
@@ -605,10 +596,8 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
 
 	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
 			test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-			test_bit(DPU_SSPP_SCALER_QSEED4, &features)) {
+			test_bit(DPU_SSPP_SCALER_QSEED4, &features))
 		c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;
-		c->ops.get_scaler_ver = _dpu_hw_sspp_get_scaler3_ver;
-	}
 
 	if (test_bit(DPU_SSPP_CDP, &features))
 		c->ops.setup_cdp = dpu_hw_sspp_setup_cdp;
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +0 -6
index cbf4f95ff0fd..ca02f86c94ed 100644
@@ -288,12 +288,6 @@ struct dpu_hw_sspp_ops {
 		struct dpu_hw_scaler3_cfg *scaler3_cfg,
 		const struct dpu_format *format);
 
-	/**
-	 * get_scaler_ver - get scaler h/w version
-	 * @ctx: Pointer to pipe context
-	 */
-	u32 (*get_scaler_ver)(struct dpu_hw_sspp *ctx);
-
 	/**
 	 * setup_cdp - setup client driven prefetch
 	 * @pipe: Pointer to software pipe context
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c +0 -6
index 9d2273fd2fed..af4fb54f3c5d 100644
@@ -381,12 +381,6 @@ void dpu_hw_setup_scaler3(struct dpu_hw_blk_reg_map *c,
 	DPU_REG_WRITE(c, QSEED3_OP_MODE + scaler_offset, op_mode);
 }
 
-u32 dpu_hw_get_scaler3_ver(struct dpu_hw_blk_reg_map *c,
-			u32 scaler_offset)
-{
-	return DPU_REG_READ(c, QSEED3_HW_VERSION + scaler_offset);
-}
-
 void dpu_hw_csc_setup(struct dpu_hw_blk_reg_map *c,
 		u32 csc_reg_off,
 		const struct dpu_csc_cfg *data, bool csc10)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h +0 -3
index 1f6079f47071..689d06c7d740 100644
@@ -340,9 +340,6 @@ void dpu_hw_setup_scaler3(struct dpu_hw_blk_reg_map *c,
 		u32 scaler_offset, u32 scaler_version,
 		const struct dpu_format *format);
 
-u32 dpu_hw_get_scaler3_ver(struct dpu_hw_blk_reg_map *c,
-		u32 scaler_offset);
-
 void dpu_hw_csc_setup(struct dpu_hw_blk_reg_map  *c,
 		u32 csc_reg_off,
 		const struct dpu_csc_cfg *data, bool csc10);
Signature · 1 line
2.39.2
#3 lore raw

PATCH v6 3/10 drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps

In reply to Dmitry Baryshkov

From: Marijn Suijten <[email protected]>

The SSPP scaler subblk is responsible for reporting its version (via the .id field, feature bits on the parent SSPP block, and since recently also from reading a register to supersede a read-but-unset version field in the catalog), leaving this global qseed_type field logically unused. Remove this dead code to lighten the catalog and bringup-overhead.

---
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h  | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h  | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h   | 1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h           | 2 --
 15 files changed, 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +0 -1
index 43c47a19cd94..ff83bf694fee 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps msm8998_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0x7,
-	.qseed_type = DPU_SSPP_SCALER_QSEED3,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +0 -1
index 88a5177dfdb7..05f71f04b8ac 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sdm845_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED3,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +0 -1
index f0c3804f4258..cbe4d0ce230b 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sm8150_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED3,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +0 -1
index 3ec954722a8e..71207d7222de 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sc8180x_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED3,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +0 -1
index 5f9b437b82a6..8982ec228f3d 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sm8250_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +0 -1
index d030c08636b4..18e2e48e2b7c 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sc7180_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0x9,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
 	.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +0 -1
index 7e6000167ef0..cde131a922fe 100644
@@ -10,7 +10,6 @@
 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,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +0 -1
index cf5db6f296bd..3aba274faeec 100644
@@ -11,7 +11,6 @@
 static const struct dpu_caps sm6350_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0x7,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +0 -1
index a327e21c90fb..8afb8a8072b0 100644
@@ -11,7 +11,6 @@
 static const struct dpu_caps sm6375_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,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +0 -1
index f8d16f9bf528..5435e5fdab52 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sm8350_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +0 -1
index 3b5061c4402a..da8b7e46237c 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sc7280_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0x7,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
 	.max_linewidth = 2400,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +0 -1
index 58f5e25679b1..29cb4dd90980 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sc8280xp_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 11,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +0 -1
index 3aed290a4111..dbb77144364a 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sm8450_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +0 -1
index 7bed819dfc39..e60427f54b27 100644
@@ -10,7 +10,6 @@
 static const struct dpu_caps sm8550_dpu_caps = {
 	.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
 	.max_mixer_blendstages = 0xb,
-	.qseed_type = DPU_SSPP_SCALER_QSEED4,
 	.has_src_split = true,
 	.has_dim_layer = true,
 	.has_idle_pc = true,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +0 -2
index 3f82d84bd1c9..9e7750c47cd0 100644
@@ -346,7 +346,6 @@ struct dpu_rotation_cfg {
  * @max_mixer_width    max layer mixer line width support.
  * @max_mixer_blendstages max layer mixer blend stages or
  *                       supported z order
- * @qseed_type         qseed2 or qseed3 support.
  * @has_src_split      source split feature status
  * @has_dim_layer      dim layer feature status
  * @has_idle_pc        indicate if idle power collapse feature is supported
@@ -359,7 +358,6 @@ struct dpu_rotation_cfg {
 struct dpu_caps {
 	u32 max_mixer_width;
 	u32 max_mixer_blendstages;
-	u32 qseed_type;
 	bool has_src_split;
 	bool has_dim_layer;
 	bool has_idle_pc;
Signature · 1 line
2.39.2
#4 lore raw

PATCH v6 4/10 drm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO

In reply to Dmitry Baryshkov

The field `id' is not used for subblocks. The handling code usually knows, which sub-block it is now looking at. Drop the field completely.

---
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 76 +++++++++----------
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h    |  2 -
 2 files changed, 36 insertions(+), 42 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +36 -40
index 77d09f961d86..ed7458991509 100644
@@ -253,17 +253,15 @@ static const uint32_t wb2_formats[] = {
 #define SSPP_SCALER_VER(maj, min) (((maj) << 16) | (min))
 
 /* SSPP common configuration */
-#define _VIG_SBLK(sdma_pri, qseed_ver, scaler_ver) \
+#define _VIG_SBLK(sdma_pri, scaler_ver) \
 	{ \
 	.maxdwnscale = MAX_DOWNSCALE_RATIO, \
 	.maxupscale = MAX_UPSCALE_RATIO, \
 	.smart_dma_priority = sdma_pri, \
 	.scaler_blk = {.name = "scaler", \
-		.id = qseed_ver, \
 		.version = scaler_ver, \
 		.base = 0xa00, .len = 0xa0,}, \
 	.csc_blk = {.name = "csc", \
-		.id = DPU_SSPP_CSC_10BIT, \
 		.base = 0x1a00, .len = 0x100,}, \
 	.format_list = plane_formats_yuv, \
 	.num_formats = ARRAY_SIZE(plane_formats_yuv), \
@@ -272,17 +270,15 @@ static const uint32_t wb2_formats[] = {
 	.rotation_cfg = NULL, \
 	}
 
-#define _VIG_SBLK_ROT(sdma_pri, qseed_ver, scaler_ver, rot_cfg) \
+#define _VIG_SBLK_ROT(sdma_pri, scaler_ver, rot_cfg) \
 	{ \
 	.maxdwnscale = MAX_DOWNSCALE_RATIO, \
 	.maxupscale = MAX_UPSCALE_RATIO, \
 	.smart_dma_priority = sdma_pri, \
 	.scaler_blk = {.name = "scaler", \
-		.id = qseed_ver, \
 		.version = scaler_ver, \
 		.base = 0xa00, .len = 0xa0,}, \
 	.csc_blk = {.name = "csc", \
-		.id = DPU_SSPP_CSC_10BIT, \
 		.base = 0x1a00, .len = 0x100,}, \
 	.format_list = plane_formats_yuv, \
 	.num_formats = ARRAY_SIZE(plane_formats_yuv), \
@@ -303,16 +299,16 @@ static const uint32_t wb2_formats[] = {
 	}
 
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 =
-				_VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(0,
 					  SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 =
-				_VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(0,
 					  SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_2 =
-				_VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(0,
 					  SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 =
-				_VIG_SBLK(0, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(0,
 					  SSPP_SCALER_VER(1, 2));
 
 static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
@@ -322,29 +318,29 @@ static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
 };
 
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_0 =
-				_VIG_SBLK(5, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(5,
 					  SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_1 =
-				_VIG_SBLK(6, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(6,
 					  SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_2 =
-				_VIG_SBLK(7, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(7,
 					  SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_3 =
-				_VIG_SBLK(8, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(8,
 					  SSPP_SCALER_VER(1, 3));
 
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_0 =
-				_VIG_SBLK(5, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(5,
 					  SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_1 =
-				_VIG_SBLK(6, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(6,
 					  SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_2 =
-				_VIG_SBLK(7, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(7,
 					  SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_3 =
-				_VIG_SBLK(8, DPU_SSPP_SCALER_QSEED3,
+				_VIG_SBLK(8,
 					  SSPP_SCALER_VER(1, 4));
 
 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_0 = _DMA_SBLK(1);
@@ -353,59 +349,59 @@ static const struct dpu_sspp_sub_blks sdm845_dma_sblk_2 = _DMA_SBLK(3);
 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_3 = _DMA_SBLK(4);
 
 static const struct dpu_sspp_sub_blks sc7180_vig_sblk_0 =
-				_VIG_SBLK(4, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(4,
 					  SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sc7280_vig_sblk_0 =
-			_VIG_SBLK_ROT(4, DPU_SSPP_SCALER_QSEED4,
+			_VIG_SBLK_ROT(4,
 				      SSPP_SCALER_VER(3, 0),
 				      &dpu_rot_sc7280_cfg_v2);
 
 static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 =
-				_VIG_SBLK(2, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(2,
 					  SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sm6125_vig_sblk_0 =
-				_VIG_SBLK(3, DPU_SSPP_SCALER_QSEED3LITE,
+				_VIG_SBLK(3,
 					  SSPP_SCALER_VER(2, 4));
 
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 =
-				_VIG_SBLK(5, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(5,
 					  SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 =
-				_VIG_SBLK(6, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(6,
 					  SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_2 =
-				_VIG_SBLK(7, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(7,
 					  SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_3 =
-				_VIG_SBLK(8, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(8,
 					  SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_0 =
-				_VIG_SBLK(5, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(5,
 					  SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_1 =
-				_VIG_SBLK(6, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(6,
 					  SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_2 =
-				_VIG_SBLK(7, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(7,
 					  SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_3 =
-				_VIG_SBLK(8, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(8,
 					  SSPP_SCALER_VER(3, 1));
 
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_0 =
-				_VIG_SBLK(7, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(7,
 					  SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_1 =
-				_VIG_SBLK(8, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(8,
 					  SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_2 =
-				_VIG_SBLK(9, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(9,
 					  SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_3 =
-				_VIG_SBLK(10, DPU_SSPP_SCALER_QSEED4,
+				_VIG_SBLK(10,
 					  SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK(5);
 static const struct dpu_sspp_sub_blks sm8550_dma_sblk_5 = _DMA_SBLK(6);
@@ -474,12 +470,12 @@ static const struct dpu_lm_sub_blks qcm2290_lm_sblk = {
  * DSPP sub blocks config
  *************************************************************/
 static const struct dpu_dspp_sub_blks msm8998_dspp_sblk = {
-	.pcc = {.name = "pcc", .id = DPU_DSPP_PCC, .base = 0x1700,
+	.pcc = {.name = "pcc", .base = 0x1700,
 		.len = 0x90, .version = 0x10007},
 };
 
 static const struct dpu_dspp_sub_blks sdm845_dspp_sblk = {
-	.pcc = {.name = "pcc", .id = DPU_DSPP_PCC, .base = 0x1700,
+	.pcc = {.name = "pcc", .base = 0x1700,
 		.len = 0x90, .version = 0x40000},
 };
 
@@ -487,19 +483,19 @@ static const struct dpu_dspp_sub_blks sdm845_dspp_sblk = {
  * PINGPONG sub blocks config
  *************************************************************/
 static const struct dpu_pingpong_sub_blks sdm845_pp_sblk_te = {
-	.te2 = {.name = "te2", .id = DPU_PINGPONG_TE2, .base = 0x2000, .len = 0x0,
+	.te2 = {.name = "te2", .base = 0x2000, .len = 0x0,
 		.version = 0x1},
-	.dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0x30e0,
+	.dither = {.name = "dither", .base = 0x30e0,
 		.len = 0x20, .version = 0x10000},
 };
 
 static const struct dpu_pingpong_sub_blks sdm845_pp_sblk = {
-	.dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0x30e0,
+	.dither = {.name = "dither", .base = 0x30e0,
 		.len = 0x20, .version = 0x10000},
 };
 
 static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {
-	.dither = {.name = "dither", .id = DPU_PINGPONG_DITHER, .base = 0xe0,
+	.dither = {.name = "dither", .base = 0xe0,
 	.len = 0x20, .version = 0x20000},
 };
 
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +0 -2
index 9e7750c47cd0..c47969ba7ed5 100644
@@ -255,14 +255,12 @@ enum {
 /**
  * MACRO DPU_HW_SUBBLK_INFO - information of HW sub-block inside DPU
  * @name:              string name for debug purposes
- * @id:                enum identifying this sub-block
  * @base:              offset of this sub-block relative to the block
  *                     offset
  * @len                register block length of this sub-block
  */
 #define DPU_HW_SUBBLK_INFO \
 	char name[DPU_HW_BLK_NAME_LEN]; \
-	u32 id; \
 	u32 base; \
 	u32 len
 
Signature · 1 line
2.39.2
#5 lore raw

PATCH v6 5/10 drm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks

In reply to Dmitry Baryshkov

In preparation to deduplicating SSPP subblocks, drop the (unused) `smart_dma_priority' field from struct dpu_sspp_sub_blks. If it is needed later (e.g. for SmartDMA v1), it should be added to the SSPP declarations themselves.

---
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 112 +++++++-----------
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h    |   2 -
 2 files changed, 40 insertions(+), 74 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +40 -72
index ed7458991509..e9773274bdd6 100644
@@ -253,11 +253,10 @@ static const uint32_t wb2_formats[] = {
 #define SSPP_SCALER_VER(maj, min) (((maj) << 16) | (min))
 
 /* SSPP common configuration */
-#define _VIG_SBLK(sdma_pri, scaler_ver) \
+#define _VIG_SBLK(scaler_ver) \
 	{ \
 	.maxdwnscale = MAX_DOWNSCALE_RATIO, \
 	.maxupscale = MAX_UPSCALE_RATIO, \
-	.smart_dma_priority = sdma_pri, \
 	.scaler_blk = {.name = "scaler", \
 		.version = scaler_ver, \
 		.base = 0xa00, .len = 0xa0,}, \
@@ -270,11 +269,10 @@ static const uint32_t wb2_formats[] = {
 	.rotation_cfg = NULL, \
 	}
 
-#define _VIG_SBLK_ROT(sdma_pri, scaler_ver, rot_cfg) \
+#define _VIG_SBLK_ROT(scaler_ver, rot_cfg) \
 	{ \
 	.maxdwnscale = MAX_DOWNSCALE_RATIO, \
 	.maxupscale = MAX_UPSCALE_RATIO, \
-	.smart_dma_priority = sdma_pri, \
 	.scaler_blk = {.name = "scaler", \
 		.version = scaler_ver, \
 		.base = 0xa00, .len = 0xa0,}, \
@@ -287,11 +285,10 @@ static const uint32_t wb2_formats[] = {
 	.rotation_cfg = rot_cfg, \
 	}
 
-#define _DMA_SBLK(sdma_pri) \
+#define _DMA_SBLK() \
 	{ \
 	.maxdwnscale = SSPP_UNITY_SCALE, \
 	.maxupscale = SSPP_UNITY_SCALE, \
-	.smart_dma_priority = sdma_pri, \
 	.format_list = plane_formats, \
 	.num_formats = ARRAY_SIZE(plane_formats), \
 	.virt_format_list = plane_formats, \
@@ -299,17 +296,13 @@ static const uint32_t wb2_formats[] = {
 	}
 
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 =
-				_VIG_SBLK(0,
-					  SSPP_SCALER_VER(1, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 =
-				_VIG_SBLK(0,
-					  SSPP_SCALER_VER(1, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_2 =
-				_VIG_SBLK(0,
-					  SSPP_SCALER_VER(1, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 2));
 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 =
-				_VIG_SBLK(0,
-					  SSPP_SCALER_VER(1, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 2));
 
 static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
 	.rot_maxheight = 1088,
@@ -318,107 +311,82 @@ static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
 };
 
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_0 =
-				_VIG_SBLK(5,
-					  SSPP_SCALER_VER(1, 3));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_1 =
-				_VIG_SBLK(6,
-					  SSPP_SCALER_VER(1, 3));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_2 =
-				_VIG_SBLK(7,
-					  SSPP_SCALER_VER(1, 3));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 3));
 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_3 =
-				_VIG_SBLK(8,
-					  SSPP_SCALER_VER(1, 3));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 3));
 
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_0 =
-				_VIG_SBLK(5,
-					  SSPP_SCALER_VER(1, 4));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_1 =
-				_VIG_SBLK(6,
-					  SSPP_SCALER_VER(1, 4));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_2 =
-				_VIG_SBLK(7,
-					  SSPP_SCALER_VER(1, 4));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 4));
 static const struct dpu_sspp_sub_blks sm8150_vig_sblk_3 =
-				_VIG_SBLK(8,
-					  SSPP_SCALER_VER(1, 4));
+				_VIG_SBLK(SSPP_SCALER_VER(1, 4));
 
-static const struct dpu_sspp_sub_blks sdm845_dma_sblk_0 = _DMA_SBLK(1);
-static const struct dpu_sspp_sub_blks sdm845_dma_sblk_1 = _DMA_SBLK(2);
-static const struct dpu_sspp_sub_blks sdm845_dma_sblk_2 = _DMA_SBLK(3);
-static const struct dpu_sspp_sub_blks sdm845_dma_sblk_3 = _DMA_SBLK(4);
+static const struct dpu_sspp_sub_blks sdm845_dma_sblk_0 = _DMA_SBLK();
+static const struct dpu_sspp_sub_blks sdm845_dma_sblk_1 = _DMA_SBLK();
+static const struct dpu_sspp_sub_blks sdm845_dma_sblk_2 = _DMA_SBLK();
+static const struct dpu_sspp_sub_blks sdm845_dma_sblk_3 = _DMA_SBLK();
 
 static const struct dpu_sspp_sub_blks sc7180_vig_sblk_0 =
-				_VIG_SBLK(4,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sc7280_vig_sblk_0 =
-			_VIG_SBLK_ROT(4,
-				      SSPP_SCALER_VER(3, 0),
+			_VIG_SBLK_ROT(SSPP_SCALER_VER(3, 0),
 				      &dpu_rot_sc7280_cfg_v2);
 
 static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 =
-				_VIG_SBLK(2,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sm6125_vig_sblk_0 =
-				_VIG_SBLK(3,
-					  SSPP_SCALER_VER(2, 4));
+				_VIG_SBLK(SSPP_SCALER_VER(2, 4));
 
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 =
-				_VIG_SBLK(5,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 =
-				_VIG_SBLK(6,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_2 =
-				_VIG_SBLK(7,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_3 =
-				_VIG_SBLK(8,
-					  SSPP_SCALER_VER(3, 0));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 0));
 
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_0 =
-				_VIG_SBLK(5,
-					  SSPP_SCALER_VER(3, 1));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_1 =
-				_VIG_SBLK(6,
-					  SSPP_SCALER_VER(3, 1));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_2 =
-				_VIG_SBLK(7,
-					  SSPP_SCALER_VER(3, 1));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 1));
 static const struct dpu_sspp_sub_blks sm8450_vig_sblk_3 =
-				_VIG_SBLK(8,
-					  SSPP_SCALER_VER(3, 1));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 1));
 
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_0 =
-				_VIG_SBLK(7,
-					  SSPP_SCALER_VER(3, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_1 =
-				_VIG_SBLK(8,
-					  SSPP_SCALER_VER(3, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_2 =
-				_VIG_SBLK(9,
-					  SSPP_SCALER_VER(3, 2));
+				_VIG_SBLK(SSPP_SCALER_VER(3, 2));
 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_3 =
-				_VIG_SBLK(10,
-					  SSPP_SCALER_VER(3, 2));
-static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK(5);
-static const struct dpu_sspp_sub_blks sm8550_dma_sblk_5 = _DMA_SBLK(6);
+				_VIG_SBLK(SSPP_SCALER_VER(3, 2));
+static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK();
+static const struct dpu_sspp_sub_blks sm8550_dma_sblk_5 = _DMA_SBLK();
 
-#define _VIG_SBLK_NOSCALE(sdma_pri) \
+#define _VIG_SBLK_NOSCALE() \
 	{ \
 	.maxdwnscale = SSPP_UNITY_SCALE, \
 	.maxupscale = SSPP_UNITY_SCALE, \
-	.smart_dma_priority = sdma_pri, \
 	.format_list = plane_formats_yuv, \
 	.num_formats = ARRAY_SIZE(plane_formats_yuv), \
 	.virt_format_list = plane_formats, \
 	.virt_num_formats = ARRAY_SIZE(plane_formats), \
 	}
 
-static const struct dpu_sspp_sub_blks qcm2290_vig_sblk_0 = _VIG_SBLK_NOSCALE(2);
-static const struct dpu_sspp_sub_blks qcm2290_dma_sblk_0 = _DMA_SBLK(1);
+static const struct dpu_sspp_sub_blks qcm2290_vig_sblk_0 = _VIG_SBLK_NOSCALE();
+static const struct dpu_sspp_sub_blks qcm2290_dma_sblk_0 = _DMA_SBLK();
 
 /*************************************************************
  * MIXER sub blocks config
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +0 -2
index c47969ba7ed5..19ab36ae6765 100644
@@ -372,7 +372,6 @@ struct dpu_caps {
  * common: Pointer to common configurations shared by sub blocks
  * @maxdwnscale: max downscale ratio supported(without DECIMATION)
  * @maxupscale:  maxupscale ratio supported
- * @smart_dma_priority: hw priority of rect1 of multirect pipe
  * @max_per_pipe_bw: maximum allowable bandwidth of this pipe in kBps
  * @qseed_ver: qseed version
  * @scaler_blk:
@@ -386,7 +385,6 @@ struct dpu_caps {
 struct dpu_sspp_sub_blks {
 	u32 maxdwnscale;
 	u32 maxupscale;
-	u32 smart_dma_priority;
 	u32 max_per_pipe_bw;
 	u32 qseed_ver;
 	struct dpu_scaler_blk scaler_blk;
Signature · 1 line
2.39.2
#6 lore raw

PATCH v6 6/10 drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

In reply to Dmitry Baryshkov

As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft.

---
 .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h   | 16 +--
 .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h    | 16 +--
 .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    | 16 +--
 .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   | 16 +--
 .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |  6 +-
 .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    | 16 +--
 .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  8 +-
 .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |  4 +-
 .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  8 +-
 .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h   |  4 +-
 .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |  4 +-
 .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    | 16 +--
 .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h    |  8 +-
 .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  | 16 +--
 .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    | 16 +--
 .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    | 20 ++--
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 97 +++++--------------
 17 files changed, 120 insertions(+), 167 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +8 -8
index ff83bf694fee..93302f7000fb 100644
@@ -69,7 +69,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1ac,
 		.features = VIG_MSM8998_MASK,
-		.sblk = &msm8998_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_1_2,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1ac,
 		.features = VIG_MSM8998_MASK,
-		.sblk = &msm8998_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_1_2,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -85,7 +85,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1ac,
 		.features = VIG_MSM8998_MASK,
-		.sblk = &msm8998_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_1_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -93,7 +93,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1ac,
 		.features = VIG_MSM8998_MASK,
-		.sblk = &msm8998_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_1_2,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -101,7 +101,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1ac,
 		.features = DMA_MSM8998_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -109,7 +109,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1ac,
 		.features = DMA_MSM8998_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -117,7 +117,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1ac,
 		.features = DMA_CURSOR_MSM8998_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -125,7 +125,7 @@ static const struct dpu_sspp_cfg msm8998_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1ac,
 		.features = DMA_CURSOR_MSM8998_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +8 -8
index 05f71f04b8ac..80eaffa16b94 100644
@@ -67,7 +67,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1c8,
 		.features = VIG_SDM845_MASK_SDMA,
-		.sblk = &sdm845_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_1_3,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1c8,
 		.features = VIG_SDM845_MASK_SDMA,
-		.sblk = &sdm845_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_1_3,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1c8,
 		.features = VIG_SDM845_MASK_SDMA,
-		.sblk = &sdm845_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_1_3,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -91,7 +91,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1c8,
 		.features = VIG_SDM845_MASK_SDMA,
-		.sblk = &sdm845_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_1_3,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -99,7 +99,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1c8,
 		.features = DMA_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -107,7 +107,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1c8,
 		.features = DMA_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -115,7 +115,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1c8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -123,7 +123,7 @@ static const struct dpu_sspp_cfg sdm845_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1c8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +8 -8
index cbe4d0ce230b..12a28d121813 100644
@@ -76,7 +76,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -84,7 +84,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -92,7 +92,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -100,7 +100,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -108,7 +108,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -116,7 +116,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -124,7 +124,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f0,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -132,7 +132,7 @@ static const struct dpu_sspp_cfg sm8150_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1f0,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +8 -8
index 71207d7222de..9a3a592dcd23 100644
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -91,7 +91,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -99,7 +99,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f0,
 		.features = VIG_SDM845_MASK,
-		.sblk = &sm8150_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_1_4,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -107,7 +107,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -115,7 +115,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -123,7 +123,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f0,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1f0,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +3 -3
index 2491eed10039..047dd6d4f5c0 100644
@@ -69,7 +69,7 @@ static const struct dpu_sspp_cfg sm6125_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
 		.features = VIG_SM6125_MASK,
-		.sblk = &sm6125_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_2_4,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm6125_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -85,7 +85,7 @@ static const struct dpu_sspp_cfg sm6125_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f0,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +8 -8
index 8982ec228f3d..2aa4c792b306 100644
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK_SDMA,
-		.sblk = &sm8250_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK_SDMA,
-		.sblk = &sm8250_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -91,7 +91,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK_SDMA,
-		.sblk = &sm8250_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -99,7 +99,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK_SDMA,
-		.sblk = &sm8250_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -107,7 +107,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -115,7 +115,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -123,7 +123,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +4 -4
index 18e2e48e2b7c..c5687571ea6b 100644
@@ -52,7 +52,7 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sc7180_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -60,7 +60,7 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -68,7 +68,7 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -76,7 +76,7 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +2 -2
index cde131a922fe..f9e4ce9d9f2a 100644
@@ -39,7 +39,7 @@ static const struct dpu_sspp_cfg sm6115_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm6115_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -47,7 +47,7 @@ static const struct dpu_sspp_cfg sm6115_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +4 -4
index 3aba274faeec..46d6eca81eed 100644
@@ -59,7 +59,7 @@ static const struct dpu_sspp_cfg sm6350_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sc7180_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -67,7 +67,7 @@ static const struct dpu_sspp_cfg sm6350_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sm6350_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sm6350_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h +2 -2
index 87a03aa16554..e0b493f75fc3 100644
@@ -39,7 +39,7 @@ static const struct dpu_sspp_cfg qcm2290_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_QCM2290_MASK,
-		.sblk = &qcm2290_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_noscale,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -47,7 +47,7 @@ static const struct dpu_sspp_cfg qcm2290_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &qcm2290_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +2 -2
index 8afb8a8072b0..a8a4fab22c6a 100644
@@ -40,7 +40,7 @@ static const struct dpu_sspp_cfg sm6375_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm6115_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -48,7 +48,7 @@ static const struct dpu_sspp_cfg sm6375_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +8 -8
index 5435e5fdab52..be05b7ed2013 100644
@@ -74,7 +74,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -82,7 +82,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -90,7 +90,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -98,7 +98,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f8,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -106,7 +106,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -114,7 +114,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -122,7 +122,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -130,7 +130,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +4 -4
index da8b7e46237c..351db9610ac7 100644
@@ -57,7 +57,7 @@ static const struct dpu_sspp_cfg sc7280_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
 		.features = VIG_SC7280_MASK_SDMA,
-		.sblk = &sc7280_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0_rot_v2,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -65,7 +65,7 @@ static const struct dpu_sspp_cfg sc7280_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x1f8,
 		.features = DMA_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -73,7 +73,7 @@ static const struct dpu_sspp_cfg sc7280_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -81,7 +81,7 @@ static const struct dpu_sspp_cfg sc7280_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x1f8,
 		.features = DMA_CURSOR_SDM845_MASK_SDMA,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +8 -8
index 29cb4dd90980..ff6cfd612f7b 100644
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x2ac,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x2ac,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -91,7 +91,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x2ac,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -99,7 +99,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x2ac,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8250_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -107,7 +107,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x2ac,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -115,7 +115,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x2ac,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -123,7 +123,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x2ac,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x2ac,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +8 -8
index dbb77144364a..04d69182ec64 100644
@@ -75,7 +75,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8450_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -83,7 +83,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8450_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -91,7 +91,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8450_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -99,7 +99,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x32c,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8450_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -107,7 +107,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x32c,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -115,7 +115,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x32c,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -123,7 +123,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x32c,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x32c,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +10 -10
index e60427f54b27..860feb9c54e6 100644
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x344,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8550_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG0,
@@ -85,7 +85,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x344,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8550_vig_sblk_1,
+		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG1,
@@ -93,7 +93,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x344,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8550_vig_sblk_2,
+		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG2,
@@ -101,7 +101,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x344,
 		.features = VIG_SC7180_MASK,
-		.sblk = &sm8550_vig_sblk_3,
+		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
 		.clk_ctrl = DPU_CLK_CTRL_VIG3,
@@ -109,7 +109,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_8", .id = SSPP_DMA0,
 		.base = 0x24000, .len = 0x344,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_0,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 1,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA0,
@@ -117,7 +117,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_9", .id = SSPP_DMA1,
 		.base = 0x26000, .len = 0x344,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_1,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 5,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA1,
@@ -125,7 +125,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_10", .id = SSPP_DMA2,
 		.base = 0x28000, .len = 0x344,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_2,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 9,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA2,
@@ -133,7 +133,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_11", .id = SSPP_DMA3,
 		.base = 0x2a000, .len = 0x344,
 		.features = DMA_SDM845_MASK,
-		.sblk = &sdm845_dma_sblk_3,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 13,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA3,
@@ -141,7 +141,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_12", .id = SSPP_DMA4,
 		.base = 0x2c000, .len = 0x344,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sm8550_dma_sblk_4,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 14,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA4,
@@ -149,7 +149,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 		.name = "sspp_13", .id = SSPP_DMA5,
 		.base = 0x2e000, .len = 0x344,
 		.features = DMA_CURSOR_SDM845_MASK,
-		.sblk = &sm8550_dma_sblk_5,
+		.sblk = &dpu_dma_sblk,
 		.xin_id = 15,
 		.type = SSPP_TYPE_DMA,
 		.clk_ctrl = DPU_CLK_CTRL_DMA5,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +25 -72

129 lines not on this page · raw message

Signature · 1 line
2.39.2
#7 lore raw

Re: [PATCH v6 06/10] drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

Quoted 24 lines · Dmitry Baryshkov

As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft.

---
  .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h   | 16 +--
  .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |  6 +-
  .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |  4 +-
  .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h   |  4 +-
  .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |  4 +-
  .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  | 16 +--
  .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    | 20 ++--
  .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 97 +++++--------------
  17 files changed, 120 insertions(+), 167 deletions(-)

<snip>

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h static const struct dpu_sspp_cfg sm8550_sspp[] = { · line 80

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +1 -1
index e60427f54b27..860feb9c54e6 100644
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
  		.name = "sspp_0", .id = SSPP_VIG0,
  		.base = 0x4000, .len = 0x344,
  		.features = VIG_SC7180_MASK,
-		.sblk = &sm8550_vig_sblk_0,
+		.sblk = &dpu_vig_sblk_qseed3_3_2,

Some of this naming doesnt sound right to me. What I had suggested was just dpu_vig_sblk_scaler_x_y but what is used is dpu_vig_sblk_qseedx_x_y

This is not correct because technically sm8550 was qseed4 as its scaler version is > 0x3000

So this adds some discrepancy in the naming.

#8 lore raw

Re: [PATCH v6 06/10] drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

Quoted 45 lines · Abhinav Kumar
Quoted 24 lines · Dmitry Baryshkov

As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft.

---
  .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h   | 16 +--
  .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   | 16 +--
  .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |  6 +-
  .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |  4 +-
  .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h   |  4 +-
  .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |  4 +-
  .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h    |  8 +-
  .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  | 16 +--
  .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    | 16 +--
  .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    | 20 ++--
  .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 97 +++++--------------
  17 files changed, 120 insertions(+), 167 deletions(-)

<snip>

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h static const struct dpu_sspp_cfg sm8550_sspp[] = { · line 80

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +1 -1
index e60427f54b27..860feb9c54e6 100644
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
              .name = "sspp_0", .id = SSPP_VIG0,
              .base = 0x4000, .len = 0x344,
              .features = VIG_SC7180_MASK,
-             .sblk = &sm8550_vig_sblk_0,
+             .sblk = &dpu_vig_sblk_qseed3_3_2,

Some of this naming doesnt sound right to me. What I had suggested was just dpu_vig_sblk_scaler_x_y but what is used is dpu_vig_sblk_qseedx_x_y

Quoted 4 lines

This is not correct because technically sm8550 was qseed4 as its scaler version is > 0x3000

So this adds some discrepancy in the naming.

And as I wrote, scaler is also not correct. We know qseed2 and rgb scalers, which use different versioning (if they have versions at all). I used qseed3, as it is the base version of the qseed3 / 3lite / 4 scalers. Of course we can switch back to 3/3lite/4, but I thought that it was not that related to the hardware.

Signature · 2 lines
With best wishes
Dmitry
Reviewed-by
#9 lore raw

Re: [PATCH v6 06/10] drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

Quoted 49 lines · Dmitry Baryshkov
Quoted 48 lines · Abhinav Kumar
Quoted 24 lines · Dmitry Baryshkov

As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft.

---
   .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h   | 16 +--
   .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h    | 16 +--
   .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h    | 16 +--
   .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h   | 16 +--
   .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |  6 +-
   .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    | 16 +--
   .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  8 +-
   .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |  4 +-
   .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  8 +-
   .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h   |  4 +-
   .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |  4 +-
   .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    | 16 +--
   .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h    |  8 +-
   .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  | 16 +--
   .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    | 16 +--
   .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    | 20 ++--
   .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c    | 97 +++++--------------
   17 files changed, 120 insertions(+), 167 deletions(-)

<snip>

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h static const struct dpu_sspp_cfg sm8550_sspp[] = { · line 80

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +1 -1
index e60427f54b27..860feb9c54e6 100644
@@ -77,7 +77,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
               .name = "sspp_0", .id = SSPP_VIG0,
               .base = 0x4000, .len = 0x344,
               .features = VIG_SC7180_MASK,
-             .sblk = &sm8550_vig_sblk_0,
+             .sblk = &dpu_vig_sblk_qseed3_3_2,

Some of this naming doesnt sound right to me. What I had suggested was just dpu_vig_sblk_scaler_x_y but what is used is dpu_vig_sblk_qseedx_x_y

This is not correct because technically sm8550 was qseed4 as its scaler version is > 0x3000

Quoted 8 lines
Quoted 1 line

So this adds some discrepancy in the naming.

And as I wrote, scaler is also not correct. We know qseed2 and rgb scalers, which use different versioning (if they have versions at all). I used qseed3, as it is the base version of the qseed3 / 3lite / 4 scalers. Of course we can switch back to 3/3lite/4, but I thought that it was not that related to the hardware.

Ok got it. So qseed3_major_minor will implicitly tell is its qseed4 or not. From the chipsets till where I have visibility into, this naming scheme will work. We can re-visit this if this assumption changes at some point. Hence,

#10 lore raw

PATCH v6 7/10 drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro

In reply to Dmitry Baryshkov

As the subblock info is now mostly gone, inline and drop the macro DPU_HW_SUBBLK_INFO.

---
 .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h    | 40 ++++++++++---------
 1 file changed, 21 insertions(+), 19 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +21 -19
index 19ab36ae6765..fc5027b0123a 100644
@@ -252,49 +252,51 @@ enum {
 	u32 len; \
 	unsigned long features
 
-/**
- * MACRO DPU_HW_SUBBLK_INFO - information of HW sub-block inside DPU
- * @name:              string name for debug purposes
- * @base:              offset of this sub-block relative to the block
- *                     offset
- * @len                register block length of this sub-block
- */
-#define DPU_HW_SUBBLK_INFO \
-	char name[DPU_HW_BLK_NAME_LEN]; \
-	u32 base; \
-	u32 len
-
 /**
  * struct dpu_scaler_blk: Scaler information
- * @info:   HW register and features supported by this sub-blk
+ * @name: string name for debug purposes
+ * @base: offset of this sub-block relative to the block offset
+ * @len: register block length of this sub-block
  * @version: qseed block revision, on QSEED3+ platforms this is the value of
  *           scaler_blk.base + QSEED3_HW_VERSION registers.
  */
 struct dpu_scaler_blk {
-	DPU_HW_SUBBLK_INFO;
+	char name[DPU_HW_BLK_NAME_LEN];
+	u32 base;
+	u32 len;
 	u32 version;
 };
 
 struct dpu_csc_blk {
-	DPU_HW_SUBBLK_INFO;
+	char name[DPU_HW_BLK_NAME_LEN];
+	u32 base;
+	u32 len;
 };
 
 /**
  * struct dpu_pp_blk : Pixel processing sub-blk information
- * @info:   HW register and features supported by this sub-blk
+ * @name: string name for debug purposes
+ * @base: offset of this sub-block relative to the block offset
+ * @len: register block length of this sub-block
  * @version: HW Algorithm version
  */
 struct dpu_pp_blk {
-	DPU_HW_SUBBLK_INFO;
+	char name[DPU_HW_BLK_NAME_LEN];
+	u32 base;
+	u32 len;
 	u32 version;
 };
 
 /**
  * struct dpu_dsc_blk - DSC Encoder sub-blk information
- * @info:   HW register and features supported by this sub-blk
+ * @name: string name for debug purposes
+ * @base: offset of this sub-block relative to the block offset
+ * @len: register block length of this sub-block
  */
 struct dpu_dsc_blk {
-	DPU_HW_SUBBLK_INFO;
+	char name[DPU_HW_BLK_NAME_LEN];
+	u32 base;
+	u32 len;
 };
 
 /**
Signature · 1 line
2.39.2
#11 lore raw

PATCH v6 8/10 drm/msm/dpu: rewrite scaler and CSC presense checks

In reply to Dmitry Baryshkov

In order to check whether the SSPP block has scaler and CSC subblocks the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate all possible scaler and CSC features. Replace those checks with the scaler and CSC subblock length checks in order to be able to drop those two macros.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 15 ---------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c   |  4 ++--
 2 files changed, 2 insertions(+), 17 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +0 -15
index ca02f86c94ed..d1480ff2574a 100644
@@ -21,21 +21,6 @@ struct dpu_hw_sspp;
 #define DPU_SSPP_ROT_90			BIT(3)
 #define DPU_SSPP_SOLID_FILL		BIT(4)
 
-/**
- * Define all scaler feature bits in catalog
- */
-#define DPU_SSPP_SCALER (BIT(DPU_SSPP_SCALER_RGB) | \
-			 BIT(DPU_SSPP_SCALER_QSEED2) | \
-			 BIT(DPU_SSPP_SCALER_QSEED3) | \
-			 BIT(DPU_SSPP_SCALER_QSEED3LITE) | \
-			 BIT(DPU_SSPP_SCALER_QSEED4))
-
-/*
- * Define all CSC feature bits in catalog
- */
-#define DPU_SSPP_CSC_ANY (BIT(DPU_SSPP_CSC) | \
-			  BIT(DPU_SSPP_CSC_10BIT))
-
 /**
  * Component indices
  */
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +2 -2
index c2aaaded07ed..43135894263c 100644
@@ -740,8 +740,8 @@ static int dpu_plane_atomic_check_pipe(struct dpu_plane *pdpu,
 	min_src_size = DPU_FORMAT_IS_YUV(fmt) ? 2 : 1;
 
 	if (DPU_FORMAT_IS_YUV(fmt) &&
-	    (!(pipe->sspp->cap->features & DPU_SSPP_SCALER) ||
-	     !(pipe->sspp->cap->features & DPU_SSPP_CSC_ANY))) {
+	    (!pipe->sspp->cap->sblk->scaler_blk.len ||
+	     !pipe->sspp->cap->sblk->csc_blk.len)) {
 		DPU_DEBUG_PLANE(pdpu,
 				"plane doesn't have scaler/csc for yuv\n");
 		return -EINVAL;
Signature · 1 line
2.39.2
Reviewed-by on v6 8/10
#12 lore raw

Re: [PATCH v6 08/10] drm/msm/dpu: rewrite scaler and CSC presense checks

Quoted 6 lines · Dmitry Baryshkov

In order to check whether the SSPP block has scaler and CSC subblocks the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate all possible scaler and CSC features. Replace those checks with the scaler and CSC subblock length checks in order to be able to drop those two macros.

funcion ---> function

Quoted 7 lines
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 15 ---------------
  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c   |  4 ++--
  2 files changed, 2 insertions(+), 17 deletions(-)

Rest LGTM,

#13 lore raw

PATCH v6 9/10 drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

In reply to Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
 4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
index 32c396abf877..eb867c8123d7 100644
@@ -31,10 +31,10 @@
 	(VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
 #define VIG_SC7180_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
 #define VIG_SM6125_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
 #define VIG_SC7180_MASK_SDMA \
 	(VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
 /**
  * SSPP sub-blocks/features
  * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
  * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
  * @DPU_SSPP_CSC,            Support of Color space converion
  * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
 enum {
 	DPU_SSPP_SCALER_QSEED2 = 0x1,
 	DPU_SSPP_SCALER_QSEED3,
-	DPU_SSPP_SCALER_QSEED3LITE,
-	DPU_SSPP_SCALER_QSEED4,
 	DPU_SSPP_SCALER_RGB,
 	DPU_SSPP_CSC,
 	DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +2 -7
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
 		test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
 		c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
-	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-			test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-			test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
 		c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;
 
 	if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
 			cfg->len,
 			kms);
 
-	if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+	if (sblk->scaler_blk.len)
 		dpu_debugfs_create_regset32("scaler_blk", 0400,
 				debugfs_root,
 				sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
index 43135894263c..ba3ee4ba25b3 100644
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
 			scale_cfg->src_height[i] /= chroma_subsmpl_v;
 		}
 
-		if (pipe_hw->cap->features &
-			BIT(DPU_SSPP_SCALER_QSEED4)) {
+		if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {
 			scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
 			scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
 		} else {
Signature · 1 line
2.39.2
#14 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
  4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
  	(VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
  #define VIG_SC7180_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
  #define VIG_SM6125_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 31 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
  #define VIG_SC7180_MASK_SDMA \
  	(VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
  /**
   * SSPP sub-blocks/features
   * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
   * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
   * @DPU_SSPP_CSC,            Support of Color space converion
   * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
  enum {
  	DPU_SSPP_SCALER_QSEED2 = 0x1,
  	DPU_SSPP_SCALER_QSEED3,
-	DPU_SSPP_SCALER_QSEED3LITE,
-	DPU_SSPP_SCALER_QSEED4,
  	DPU_SSPP_SCALER_RGB,
  	DPU_SSPP_CSC,
  	DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
  		test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
  		c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
-	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-			test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-			test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
  		c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 11 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
  	if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
  			cfg->len,
  			kms);
 
-	if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-			cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+	if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
  		dpu_debugfs_create_regset32("scaler_blk", 0400,
  				debugfs_root,
  				sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
  			scale_cfg->src_height[i] /= chroma_subsmpl_v;
  		}
 
-		if (pipe_hw->cap->features &
-			BIT(DPU_SSPP_SCALER_QSEED4)) {
+		if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
  			scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
  			scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
  		} else {
#15 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
  4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
      (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
  #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
  #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
  #define VIG_SC7180_MASK_SDMA \
      (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
  /**
   * SSPP sub-blocks/features
   * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
   * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
   * @DPU_SSPP_CSC,            Support of Color space converion
   * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
  enum {
      DPU_SSPP_SCALER_QSEED2 = 0x1,
      DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
      DPU_SSPP_SCALER_RGB,
      DPU_SSPP_CSC,
      DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
              test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
              c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
              c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
      if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                      cfg->len,
                      kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
              dpu_debugfs_create_regset32("scaler_blk", 0400,
                              debugfs_root,
                              sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                      scale_cfg->src_height[i] /= chroma_subsmpl_v;
              }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                      scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                      scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
              } else {
Signature · 2 lines
With best wishes
Dmitry
#16 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 82 lines · Dmitry Baryshkov
Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
   4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
       (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
   #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
   #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
   #define VIG_SC7180_MASK_SDMA \
       (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
   /**
    * SSPP sub-blocks/features
    * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
    * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
    * @DPU_SSPP_CSC,            Support of Color space converion
    * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
   enum {
       DPU_SSPP_SCALER_QSEED2 = 0x1,
       DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
       DPU_SSPP_SCALER_RGB,
       DPU_SSPP_CSC,
       DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
               test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
               c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
               c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

Quoted 3 lines

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Ah got it.

HW versioning is getting harder to generalize with the example you have given. In my opinion, in that case lets keep these enums intact because we dont have any other way of knowing the Qseed version otherwise and in terms of LOC, we are not really saving so much in this change.

In the prev change I agreed because along with the name and the version, we could still interpret the version but with compressing the enums into just QSEED3, this becomes very confusing. So now, in the future if we have QSEED5 HW, we will have to change this anyway as its LUT programming can change. So we need this distinction.

The below two changes seem fine and that way we are eliminating the usages of the enum and we will end up with only one place using this.

Quoted 36 lines
Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
       if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                       cfg->len,
                       kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
               dpu_debugfs_create_regset32("scaler_blk", 0400,
                               debugfs_root,
                               sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                       scale_cfg->src_height[i] /= chroma_subsmpl_v;
               }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                       scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                       scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
               } else {
#17 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 97 lines · Abhinav Kumar
Quoted 82 lines · Dmitry Baryshkov
Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
   4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
       (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
   #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
   #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
   #define VIG_SC7180_MASK_SDMA \
       (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
   /**
    * SSPP sub-blocks/features
    * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
    * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
    * @DPU_SSPP_CSC,            Support of Color space converion
    * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
   enum {
       DPU_SSPP_SCALER_QSEED2 = 0x1,
       DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
       DPU_SSPP_SCALER_RGB,
       DPU_SSPP_CSC,
       DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
               test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
               c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
               c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

Quoted 3 lines

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Ah got it.

HW versioning is getting harder to generalize with the example you have given. In my opinion, in that case lets keep these enums intact because we dont have any other way of knowing the Qseed version otherwise and in terms of LOC, we are not really saving so much in this change.

Quoted 5 lines

In the prev change I agreed because along with the name and the version, we could still interpret the version but with compressing the enums into just QSEED3, this becomes very confusing. So now, in the future if we have QSEED5 HW, we will have to change this anyway as its LUT programming can change. So we need this distinction.

I'm trying to eliminate them, because they cause more confusion than the bonuses.
Currently we have QSEED3 / 3LITE / 4, which are somewhat compatible.

We are aiming to support QSEED2 and RGB, which are incompatible with the QSEED3/3lite/4 family programming sequence. So they get their own feature bits (DPU_SSPP_SCALER_QSEED2 and DPU_SSPP_SCALER_RGB).

QSEED5-to-be will either be compatible with QSEED3 (and thus can fall into the same bucket) or it will be a different kind of scaler (and will get its own feature).

I'm not a fan of DPU_SSPP_SCALER_QSEED3LITE/QSEED4 and I'd like to remove those two bits for the following reasons:
- We already encode this info into the scaler version. How should driver behave it it has e.g. version 3.1, but DPU_SSPP_SCALER_QSEED3? Or vice versa: version 1.2 but QSEED4 feature bit? Having a single QSEED3 removes this issue.
- Adding QSEED5-compatible-with-QSEED3 requires changing several places which deal with the feature bits and the per-version setup sequence. This seems like an overkill. It is easy to miss one of the places and thus end up with the half-supported scaler

I admit, it might not be ideal to use QSEED3 for all scaler versions. I'm open to suggestions on the better name for this feature bit. But I have no doubts that there should be a single feature bit for all QSEED3/3LITE/4 scalers.

Quoted 41 lines

The below two changes seem fine and that way we are eliminating the usages of the enum and we will end up with only one place using this.

Quoted 36 lines
Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
       if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                       cfg->len,
                       kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
               dpu_debugfs_create_regset32("scaler_blk", 0400,
                               debugfs_root,
                               sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                       scale_cfg->src_height[i] /= chroma_subsmpl_v;
               }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                       scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                       scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
               } else {
Signature · 2 lines
With best wishes
Dmitry
#18 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 127 lines · Dmitry Baryshkov
Quoted 97 lines · Abhinav Kumar
Quoted 82 lines · Dmitry Baryshkov
Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
    drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
    4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
        (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
    #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
    #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
    #define VIG_SC7180_MASK_SDMA \
        (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
    /**
     * SSPP sub-blocks/features
     * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
     * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
     * @DPU_SSPP_CSC,            Support of Color space converion
     * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
    enum {
        DPU_SSPP_SCALER_QSEED2 = 0x1,
        DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
        DPU_SSPP_SCALER_RGB,
        DPU_SSPP_CSC,
        DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
                test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
                c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
                c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

Quoted 3 lines

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Ah got it.

HW versioning is getting harder to generalize with the example you have given. In my opinion, in that case lets keep these enums intact because we dont have any other way of knowing the Qseed version otherwise and in terms of LOC, we are not really saving so much in this change.

Quoted 5 lines

In the prev change I agreed because along with the name and the version, we could still interpret the version but with compressing the enums into just QSEED3, this becomes very confusing. So now, in the future if we have QSEED5 HW, we will have to change this anyway as its LUT programming can change. So we need this distinction.

I'm trying to eliminate them, because they cause more confusion than the bonuses.
Currently we have QSEED3 / 3LITE / 4, which are somewhat compatible.

We are aiming to support QSEED2 and RGB, which are incompatible with the QSEED3/3lite/4 family programming sequence. So they get their own feature bits (DPU_SSPP_SCALER_QSEED2 and DPU_SSPP_SCALER_RGB).

QSEED5-to-be will either be compatible with QSEED3 (and thus can fall into the same bucket) or it will be a different kind of scaler (and will get its own feature).

I'm not a fan of DPU_SSPP_SCALER_QSEED3LITE/QSEED4 and I'd like to remove those two bits for the following reasons:
- We already encode this info into the scaler version. How should driver behave it it has e.g. version 3.1, but DPU_SSPP_SCALER_QSEED3? Or vice versa: version 1.2 but QSEED4 feature bit? Having a single QSEED3 removes this issue.
- Adding QSEED5-compatible-with-QSEED3 requires changing several places which deal with the feature bits and the per-version setup sequence. This seems like an overkill. It is easy to miss one of the places and thus end up with the half-supported scaler

Quoted 5 lines

I admit, it might not be ideal to use QSEED3 for all scaler versions. I'm open to suggestions on the better name for this feature bit. But I have no doubts that there should be a single feature bit for all QSEED3/3LITE/4 scalers.

hmmm, the concern i had was that from the version the driver doesnt seem to know which qseed it is as you rightly pointed out in your earlier response with the examples of sdm845, msm8998 etc.

It needs this feature bit to know which qseed version it is to use the correct scaler function. If you remove the other two places below, this will be the only one left right?

I was thinking of solving this problem with something like QSEED3_3LITE_4 but then this is not scalable if QSEED5 is also a variant of QSEED3.

After we remove below 2 places, are there more places where we test these feature bits?

One thing we can perhaps do is move all this feature bit handling to one function like dpu_scaler_is_qseed3_compatible() and move these feature bits there. That way you will have only one place to change for all the code.

Quoted 44 lines
Quoted 41 lines

The below two changes seem fine and that way we are eliminating the usages of the enum and we will end up with only one place using this.

Quoted 36 lines
Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
        if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                        cfg->len,
                        kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
                dpu_debugfs_create_regset32("scaler_blk", 0400,
                                debugfs_root,
                                sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                        scale_cfg->src_height[i] /= chroma_subsmpl_v;
                }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                        scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                        scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
                } else {
#19 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 145 lines · Abhinav Kumar
Quoted 127 lines · Dmitry Baryshkov
Quoted 97 lines · Abhinav Kumar
Quoted 82 lines · Dmitry Baryshkov
Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
    drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
    drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
    4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
        (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
    #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
    #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
    #define VIG_SC7180_MASK_SDMA \
        (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
    /**
     * SSPP sub-blocks/features
     * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
     * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
     * @DPU_SSPP_CSC,            Support of Color space converion
     * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
    enum {
        DPU_SSPP_SCALER_QSEED2 = 0x1,
        DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
        DPU_SSPP_SCALER_RGB,
        DPU_SSPP_CSC,
        DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
                test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
                c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
                c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

Quoted 3 lines

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Ah got it.

HW versioning is getting harder to generalize with the example you have given. In my opinion, in that case lets keep these enums intact because we dont have any other way of knowing the Qseed version otherwise and in terms of LOC, we are not really saving so much in this change.

Quoted 5 lines

In the prev change I agreed because along with the name and the version, we could still interpret the version but with compressing the enums into just QSEED3, this becomes very confusing. So now, in the future if we have QSEED5 HW, we will have to change this anyway as its LUT programming can change. So we need this distinction.

I'm trying to eliminate them, because they cause more confusion than the bonuses.
Currently we have QSEED3 / 3LITE / 4, which are somewhat compatible.

We are aiming to support QSEED2 and RGB, which are incompatible with the QSEED3/3lite/4 family programming sequence. So they get their own feature bits (DPU_SSPP_SCALER_QSEED2 and DPU_SSPP_SCALER_RGB).

QSEED5-to-be will either be compatible with QSEED3 (and thus can fall into the same bucket) or it will be a different kind of scaler (and will get its own feature).

I'm not a fan of DPU_SSPP_SCALER_QSEED3LITE/QSEED4 and I'd like to remove those two bits for the following reasons:
- We already encode this info into the scaler version. How should driver behave it it has e.g. version 3.1, but DPU_SSPP_SCALER_QSEED3? Or vice versa: version 1.2 but QSEED4 feature bit? Having a single QSEED3 removes this issue.
- Adding QSEED5-compatible-with-QSEED3 requires changing several places which deal with the feature bits and the per-version setup sequence. This seems like an overkill. It is easy to miss one of the places and thus end up with the half-supported scaler

Quoted 5 lines

I admit, it might not be ideal to use QSEED3 for all scaler versions. I'm open to suggestions on the better name for this feature bit. But I have no doubts that there should be a single feature bit for all QSEED3/3LITE/4 scalers.

hmmm, the concern i had was that from the version the driver doesnt seem to know which qseed it is as you rightly pointed out in your earlier response with the examples of sdm845, msm8998 etc.

It needs this feature bit to know which qseed version it is to use the correct scaler function. If you remove the other two places below, this will be the only one left right?

Quoted 6 lines

I was thinking of solving this problem with something like QSEED3_3LITE_4 but then this is not scalable if QSEED5 is also a variant of QSEED3.

After we remove below 2 places, are there more places where we test these feature bits?

Hmm, true, this is the only place enumerating them.

Quoted 4 lines

One thing we can perhaps do is move all this feature bit handling to one function like dpu_scaler_is_qseed3_compatible() and move these feature bits there. That way you will have only one place to change for all the code.

What about renaming QSEED3 to QSEED3_COMPATIBLE then? This would leave us with RGB, QSEED2, QSEED3_COMPATIBLE. The QSEED5-to-be will either be added as a new entry (and a new scaler function) or it will fall into the QSEED3_COMPATIBLE bucket.

I'd really like to remove any chance of confusion between QSEEDn and the scaler_block.version. I think we already had that wrong in several catalog entries, so let's not walk twice into the same water.

Quoted 43 lines
Quoted 43 lines
Quoted 40 lines

The below two changes seem fine and that way we are eliminating the usages of the enum and we will end up with only one place using this.

Quoted 36 lines
Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
        if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                        cfg->len,
                        kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
                dpu_debugfs_create_regset32("scaler_blk", 0400,
                                debugfs_root,
                                sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                        scale_cfg->src_height[i] /= chroma_subsmpl_v;
                }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                        scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                        scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
                } else {
Signature · 2 lines
With best wishes
Dmitry
#20 lore raw

Re: [PATCH v6 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Quoted 160 lines · Dmitry Baryshkov
Quoted 145 lines · Abhinav Kumar
Quoted 127 lines · Dmitry Baryshkov
Quoted 97 lines · Abhinav Kumar
Quoted 82 lines · Dmitry Baryshkov
Quoted 72 lines · Abhinav Kumar
Quoted 19 lines · Dmitry Baryshkov

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits.

---
     drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
     drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 6 +-----
     drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c    | 9 ++-------
     drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 3 +--
     4 files changed, 6 insertions(+), 16 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
index 32c396abf877..eb867c8123d7 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c line 38

Quoted 10 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -31,10 +31,10 @@
         (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
     #define VIG_SC7180_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 
     #define VIG_SM6125_MASK \
-     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3LITE))
+     (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
 

This merging is coming at a cost of inaccuracy. We are marking sc7180 and sm6125 as scaler_qseed3. But they are not. Let me know what you think of below idea instead.

Quoted 34 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -0
     #define VIG_SC7180_MASK_SDMA \
         (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +1 -5
index fc5027b0123a..ba262b3f0bdc 100644
@@ -51,9 +51,7 @@ enum {
     /**
      * SSPP sub-blocks/features
      * @DPU_SSPP_SCALER_QSEED2,  QSEED2 algorithm support
- * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support
- * @DPU_SSPP_SCALER_QSEED3LITE,  QSEED3 Lite alogorithm support
- * @DPU_SSPP_SCALER_QSEED4,  QSEED4 algorithm support
+ * @DPU_SSPP_SCALER_QSEED3,  QSEED3 alogorithm support (also QSEED3LITE and QSEED4)
      * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
      * @DPU_SSPP_CSC,            Support of Color space converion
      * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
@@ -72,8 +70,6 @@ enum {
     enum {
         DPU_SSPP_SCALER_QSEED2 = 0x1,
         DPU_SSPP_SCALER_QSEED3,
-     DPU_SSPP_SCALER_QSEED3LITE,
-     DPU_SSPP_SCALER_QSEED4,
         DPU_SSPP_SCALER_RGB,
         DPU_SSPP_CSC,
         DPU_SSPP_CSC_10BIT,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
index 7e9c87088e17..d1b70cf72eef 100644
@@ -594,9 +594,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c,
                 test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
                 c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c static void _setup_layer_ops(struct dpu_hw_sspp *c, · line 598

Quoted 5 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -3
-     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED3LITE, &features) ||
-                     test_bit(DPU_SSPP_SCALER_QSEED4, &features))
+     if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
                 c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;

Can we just do sblk->scaler_blk.version >= 0x3000 instead of this merging? That way you can still drop those enums without inaccuracy.

Quoted 3 lines

No. QSEED3 from sdm845 has version 1.3, msm8998, sdm660 and sdm630 have version 1.2.

Ah got it.

HW versioning is getting harder to generalize with the example you have given. In my opinion, in that case lets keep these enums intact because we dont have any other way of knowing the Qseed version otherwise and in terms of LOC, we are not really saving so much in this change.

Quoted 5 lines

In the prev change I agreed because along with the name and the version, we could still interpret the version but with compressing the enums into just QSEED3, this becomes very confusing. So now, in the future if we have QSEED5 HW, we will have to change this anyway as its LUT programming can change. So we need this distinction.

I'm trying to eliminate them, because they cause more confusion than the bonuses.
Currently we have QSEED3 / 3LITE / 4, which are somewhat compatible.

We are aiming to support QSEED2 and RGB, which are incompatible with the QSEED3/3lite/4 family programming sequence. So they get their own feature bits (DPU_SSPP_SCALER_QSEED2 and DPU_SSPP_SCALER_RGB).

QSEED5-to-be will either be compatible with QSEED3 (and thus can fall into the same bucket) or it will be a different kind of scaler (and will get its own feature).

I'm not a fan of DPU_SSPP_SCALER_QSEED3LITE/QSEED4 and I'd like to remove those two bits for the following reasons:
- We already encode this info into the scaler version. How should driver behave it it has e.g. version 3.1, but DPU_SSPP_SCALER_QSEED3? Or vice versa: version 1.2 but QSEED4 feature bit? Having a single QSEED3 removes this issue.
- Adding QSEED5-compatible-with-QSEED3 requires changing several places which deal with the feature bits and the per-version setup sequence. This seems like an overkill. It is easy to miss one of the places and thus end up with the half-supported scaler

Quoted 5 lines

I admit, it might not be ideal to use QSEED3 for all scaler versions. I'm open to suggestions on the better name for this feature bit. But I have no doubts that there should be a single feature bit for all QSEED3/3LITE/4 scalers.

hmmm, the concern i had was that from the version the driver doesnt seem to know which qseed it is as you rightly pointed out in your earlier response with the examples of sdm845, msm8998 etc.

It needs this feature bit to know which qseed version it is to use the correct scaler function. If you remove the other two places below, this will be the only one left right?

Quoted 6 lines

I was thinking of solving this problem with something like QSEED3_3LITE_4 but then this is not scalable if QSEED5 is also a variant of QSEED3.

After we remove below 2 places, are there more places where we test these feature bits?

Hmm, true, this is the only place enumerating them.

Quoted 4 lines

One thing we can perhaps do is move all this feature bit handling to one function like dpu_scaler_is_qseed3_compatible() and move these feature bits there. That way you will have only one place to change for all the code.

Quoted 9 lines

What about renaming QSEED3 to QSEED3_COMPATIBLE then? This would leave us with RGB, QSEED2, QSEED3_COMPATIBLE. The QSEED5-to-be will either be added as a new entry (and a new scaler function) or it will fall into the QSEED3_COMPATIBLE bucket.

I'd really like to remove any chance of confusion between QSEEDn and the scaler_block.version. I think we already had that wrong in several catalog entries, so let's not walk twice into the same water.

Ok thats fine. Lets go ahead with QSEED3_COMPATIBLE as that aligns with the expectation that we will use the scaler3_lut for everything thats compatible with QSEED3.

Quoted 46 lines
Quoted 43 lines
Quoted 43 lines
Quoted 40 lines

The below two changes seem fine and that way we are eliminating the usages of the enum and we will end up with only one place using this.

Quoted 36 lines
Quoted 33 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, · line 630

Quoted 12 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +1 -4
         if (test_bit(DPU_SSPP_CDP, &features))
@@ -629,10 +627,7 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
                         cfg->len,
                         kms);
 
-     if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) ||
-                     cfg->features & BIT(DPU_SSPP_SCALER_QSEED4))
+     if (sblk->scaler_blk.len)

This part seems fine.

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +0 -0
                 dpu_debugfs_create_regset32("scaler_blk", 0400,
                                 debugfs_root,
                                 sblk->scaler_blk.base + cfg->base,
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
index 43135894263c..ba3ee4ba25b3 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw, · line 441

Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +1 -2
@@ -438,8 +438,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_hw_sspp *pipe_hw,
                         scale_cfg->src_height[i] /= chroma_subsmpl_v;
                 }
 
-             if (pipe_hw->cap->features &
-                     BIT(DPU_SSPP_SCALER_QSEED4)) {
+             if (pipe_hw->cap->sblk->scaler_blk.version >= 0x3000) {

This is fine too.

Quoted 3 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +0 -0
                         scale_cfg->preload_x[i] = DPU_QSEED4_DEFAULT_PRELOAD_H;
                         scale_cfg->preload_y[i] = DPU_QSEED4_DEFAULT_PRELOAD_V;
                 } else {
#21 lore raw

PATCH v6 10/10 drm/msm/gpu: drop duplicating VIG feature masks

In reply to Dmitry Baryshkov

After folding QSEED3LITE and QSEED4 feature bits into QSEED3 several VIG feature masks became equal. Drop these duplicates.

---
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h    |  2 +-
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h    |  8 ++++----
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h    |  2 +-
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h    |  2 +-
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h    |  2 +-
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h    |  2 +-
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h    |  8 ++++----
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h  |  8 ++++----
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h    |  8 ++++----
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h    |  8 ++++----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c        | 11 +----------
 11 files changed, 26 insertions(+), 35 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +1 -1
index 047dd6d4f5c0..7e43b1b86227 100644
@@ -68,7 +68,7 @@ static const struct dpu_sspp_cfg sm6125_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f0,
-		.features = VIG_SM6125_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_2_4,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +4 -4
index 2aa4c792b306..eb80cc127f53 100644
@@ -74,7 +74,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK_SDMA,
+		.features = VIG_SDM845_MASK_SDMA,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
@@ -82,7 +82,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 	}, {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK_SDMA,
+		.features = VIG_SDM845_MASK_SDMA,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
@@ -90,7 +90,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 	}, {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK_SDMA,
+		.features = VIG_SDM845_MASK_SDMA,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
@@ -98,7 +98,7 @@ static const struct dpu_sspp_cfg sm8250_sspp[] = {
 	}, {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK_SDMA,
+		.features = VIG_SDM845_MASK_SDMA,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +1 -1
index c5687571ea6b..07a0cda45766 100644
@@ -51,7 +51,7 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +1 -1
index f9e4ce9d9f2a..4f602a95ced2 100644
@@ -38,7 +38,7 @@ static const struct dpu_sspp_cfg sm6115_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +1 -1
index 46d6eca81eed..1d83db69ae97 100644
@@ -58,7 +58,7 @@ static const struct dpu_sspp_cfg sm6350_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +1 -1
index a8a4fab22c6a..d4d783288bdd 100644
@@ -39,7 +39,7 @@ static const struct dpu_sspp_cfg sm6375_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +4 -4
index be05b7ed2013..d18f753febdc 100644
@@ -73,7 +73,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
@@ -81,7 +81,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 	}, {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
@@ -89,7 +89,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 	}, {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
@@ -97,7 +97,7 @@ static const struct dpu_sspp_cfg sm8350_sspp[] = {
 	}, {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x1f8,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +4 -4
index ff6cfd612f7b..82aafc67125b 100644
@@ -74,7 +74,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x2ac,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
@@ -82,7 +82,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 	}, {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x2ac,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
@@ -90,7 +90,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 	}, {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x2ac,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
@@ -98,7 +98,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
 	}, {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x2ac,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_0,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +4 -4
index 04d69182ec64..43827df36494 100644
@@ -74,7 +74,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x32c,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
@@ -82,7 +82,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 	}, {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x32c,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
@@ -90,7 +90,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 	}, {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x32c,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
@@ -98,7 +98,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
 	}, {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x32c,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_1,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +4 -4
index 860feb9c54e6..fb85168be3e2 100644
@@ -76,7 +76,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 	{
 		.name = "sspp_0", .id = SSPP_VIG0,
 		.base = 0x4000, .len = 0x344,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 0,
 		.type = SSPP_TYPE_VIG,
@@ -84,7 +84,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 	}, {
 		.name = "sspp_1", .id = SSPP_VIG1,
 		.base = 0x6000, .len = 0x344,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 4,
 		.type = SSPP_TYPE_VIG,
@@ -92,7 +92,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 	}, {
 		.name = "sspp_2", .id = SSPP_VIG2,
 		.base = 0x8000, .len = 0x344,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 8,
 		.type = SSPP_TYPE_VIG,
@@ -100,7 +100,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
 	}, {
 		.name = "sspp_3", .id = SSPP_VIG3,
 		.base = 0xa000, .len = 0x344,
-		.features = VIG_SC7180_MASK,
+		.features = VIG_SDM845_MASK,
 		.sblk = &dpu_vig_sblk_qseed3_3_2,
 		.xin_id = 12,
 		.type = SSPP_TYPE_VIG,
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1 -10
index eb867c8123d7..be461586b108 100644
@@ -30,15 +30,6 @@
 #define VIG_SDM845_MASK_SDMA \
 	(VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
 
-#define VIG_SC7180_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
-
-#define VIG_SM6125_MASK \
-	(VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
-
-#define VIG_SC7180_MASK_SDMA \
-	(VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
-
 #define VIG_QCM2290_MASK (VIG_BASE_MASK | BIT(DPU_SSPP_QOS_8LVL))
 
 #define DMA_MSM8998_MASK \
@@ -47,7 +38,7 @@
 	BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_EXCL_RECT))
 
 #define VIG_SC7280_MASK \
-	(VIG_SC7180_MASK | BIT(DPU_SSPP_INLINE_ROTATION))
+	(VIG_SDM845_MASK | BIT(DPU_SSPP_INLINE_ROTATION))
 
 #define VIG_SC7280_MASK_SDMA \
 	(VIG_SC7280_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
Signature · 1 line
2.39.2