Re: [PATCH v1 2/4] drm/msm/dpu: drop length from struct dpu_hw_blk_reg_map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 6/1/2022 9:13 AM, Dmitry Baryshkov wrote:
We (nearly) do not use the length field from struct dpu_hw_blk_reg_map,
so we can drop it safely.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c      | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c      | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c     | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c     | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c       | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c  | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c     | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c      | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h     | 2 --
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c     | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c       | 1 -
  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c         | 2 +-
  13 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 7d416bf4ae91..1120ff408dae 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -60,7 +60,6 @@ static const struct dpu_ctl_cfg *_ctl_offset(enum dpu_ctl ctl,
  		if (ctl == m->ctl[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->ctl[i].base;
-			b->length = m->ctl[i].len;
  			b->log_mask = DPU_DBG_MASK_CTL;
  			return &m->ctl[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
index 184a1b27b13d..dfe6e4c11917 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
@@ -168,7 +168,6 @@ static struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc,
  		if (dsc == m->dsc[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->dsc[i].base;
-			b->length = m->dsc[i].len;
  			b->log_mask = DPU_DBG_MASK_DSC;
  			return &m->dsc[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
index 3e63bf4fa64e..8196ae47dea8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
@@ -82,7 +82,6 @@ static const struct dpu_dspp_cfg *_dspp_offset(enum dpu_dspp dspp,
  		if (dspp == m->dspp[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->dspp[i].base;
-			b->length = m->dspp[i].len;
  			b->log_mask = DPU_DBG_MASK_DSPP;
  			return &m->dspp[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
index b2ca8d19fdd7..c7eb314f1d7a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
@@ -79,7 +79,6 @@ static const struct dpu_intf_cfg *_intf_offset(enum dpu_intf intf,
  		(m->intf[i].type != INTF_NONE)) {
  			b->base_off = addr;
  			b->blk_off = m->intf[i].base;
-			b->length = m->intf[i].len;
  			b->log_mask = DPU_DBG_MASK_INTF;
  			return &m->intf[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
index b41993269d09..87a4a5869b9b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
@@ -45,7 +45,6 @@ static const struct dpu_lm_cfg *_lm_offset(enum dpu_lm mixer,
  		if (mixer == m->mixer[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->mixer[i].base;
-			b->length = m->mixer[i].len;
  			b->log_mask = DPU_DBG_MASK_LM;
  			return &m->mixer[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c
index b053d68d38da..538691f7bf66 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c
@@ -25,7 +25,6 @@ static const struct dpu_merge_3d_cfg *_merge_3d_offset(enum dpu_merge_3d idx,
  		if (idx == m->merge_3d[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->merge_3d[i].base;
-			b->length = m->merge_3d[i].len;
  			b->log_mask = DPU_DBG_MASK_PINGPONG;
  			return &m->merge_3d[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
index 6538e195cfe9..0aa63636bc9a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
@@ -53,7 +53,6 @@ static const struct dpu_pingpong_cfg *_pingpong_offset(enum dpu_pingpong pp,
  		if (pp == m->pingpong[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->pingpong[i].base;
-			b->length = m->pingpong[i].len;
  			b->log_mask = DPU_DBG_MASK_PINGPONG;
  			return &m->pingpong[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
index da4c7e4f304b..876ae8faa8e5 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
@@ -771,7 +771,6 @@ static const struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp,
  			if (sspp == catalog->sspp[i].id) {
  				b->base_off = addr;
  				b->blk_off = catalog->sspp[i].base;
-				b->length = catalog->sspp[i].len;
  				b->log_mask = DPU_DBG_MASK_SSPP;
  				return &catalog->sspp[i];
  			}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c
index 12d3b0067275..843cb607d411 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c
@@ -287,7 +287,6 @@ static const struct dpu_mdp_cfg *_top_offset(enum dpu_mdp mdp,
  		if (mdp == m->mdp[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->mdp[i].base;
-			b->length = m->mdp[i].len;
  			b->log_mask = DPU_DBG_MASK_TOP;
  			return &m->mdp[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
index e8adb118fa85..b745ef4ac16f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
@@ -19,12 +19,10 @@
   * absoulute IO address
   * @base_off:     mdp register mapped offset
   * @blk_off:      pipe offset relative to mdss offset
- * @length        length of register block offset
   */
  struct dpu_hw_blk_reg_map {
  	void __iomem *base_off;
  	u32 blk_off;
-	u32 length;
  	u32 log_mask;
  };
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
index 789ecc531b43..41ca4b179f1a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
@@ -222,7 +222,6 @@ static const struct dpu_vbif_cfg *_top_offset(enum dpu_vbif vbif,
  		if (vbif == m->vbif[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->vbif[i].base;
-			b->length = m->vbif[i].len;
  			b->log_mask = DPU_DBG_MASK_VBIF;
  			return &m->vbif[i];
  		}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
index 084439fdd3a0..12f32cd3075e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c
@@ -62,7 +62,6 @@ static const struct dpu_wb_cfg *_wb_offset(enum dpu_wb wb,
  		if (wb == m->wb[i].id) {
  			b->base_off = addr;
  			b->blk_off = m->wb[i].base;
-			b->length = m->wb[i].len;
  			return &m->wb[i];
  		}
  	}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 688dc4409af6..a3bfc0fe72a8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -950,7 +950,7 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
  		msm_disp_snapshot_add_block(disp_state, cat->wb[i].len,
  				dpu_kms->mmio + cat->wb[i].base, "wb_%d", i);
- msm_disp_snapshot_add_block(disp_state, top->hw.length,
+	msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len,
  			dpu_kms->mmio + top->hw.blk_off, "top");
pm_runtime_put_sync(&dpu_kms->pdev->dev);



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux