diff mbox series

[11/14] drm/msm/dpu: rename hw_ctl to lm_ctl

Message ID 1535503203-22054-12-git-send-email-jsanka@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series clean up DPU for RM refactor | expand

Commit Message

Jeykumar Sankaran Aug. 29, 2018, 12:40 a.m. UTC
Rename hw_ctl to lm_ctl to mean the ctl associated
with the hw layer mixer block.

sed -i 's/\([*@.>]\)hw_ctl\([^s]\)/\1lm_ctl\2/g' dpu_crtc.c dpu_crtc.h

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 26 +++++++++++++-------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h |  4 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)

Comments

Sean Paul Aug. 31, 2018, 3:54 p.m. UTC | #1
On Tue, Aug 28, 2018 at 05:40:00PM -0700, Jeykumar Sankaran wrote:
> Rename hw_ctl to lm_ctl to mean the ctl associated
> with the hw layer mixer block.
> 
> sed -i 's/\([*@.>]\)hw_ctl\([^s]\)/\1lm_ctl\2/g' dpu_crtc.c dpu_crtc.h
> 
> Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 26 +++++++++++++-------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h |  4 ++--
>  2 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 7ab320d..aeb0f1a 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -202,7 +202,7 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
>  		return;
>  	}
>  
> -	ctl = mixer->hw_ctl;
> +	ctl = mixer->lm_ctl;
>  	lm = mixer->hw_lm;
>  	stage_cfg = &dpu_crtc->stage_cfg;
>  	cstate = to_dpu_crtc_state(crtc->state);
> @@ -292,15 +292,15 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
>  	}
>  
>  	for (i = 0; i < cstate->num_mixers; i++) {
> -		if (!mixer[i].hw_lm || !mixer[i].hw_ctl) {
> +		if (!mixer[i].hw_lm || !mixer[i].lm_ctl) {
>  			DPU_ERROR("invalid lm or ctl assigned to mixer\n");
>  			return;
>  		}
>  		mixer[i].mixer_op_mode = 0;
>  		mixer[i].flush_mask = 0;
> -		if (mixer[i].hw_ctl->ops.clear_all_blendstages)
> -			mixer[i].hw_ctl->ops.clear_all_blendstages(
> -					mixer[i].hw_ctl);
> +		if (mixer[i].lm_ctl->ops.clear_all_blendstages)
> +			mixer[i].lm_ctl->ops.clear_all_blendstages(
> +					mixer[i].lm_ctl);
>  	}
>  
>  	/* initialize stage cfg */
> @@ -309,7 +309,7 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
>  	_dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer);
>  
>  	for (i = 0; i < cstate->num_mixers; i++) {
> -		ctl = mixer[i].hw_ctl;
> +		ctl = mixer[i].lm_ctl;
>  		lm = mixer[i].hw_lm;
>  
>  		lm->ops.setup_alpha_out(lm, mixer[i].mixer_op_mode);
> @@ -553,14 +553,14 @@ static void _dpu_crtc_setup_mixer_for_encoder(
>  		if (!dpu_rm_get_hw(rm, &ctl_iter)) {
>  			DPU_DEBUG("no ctl assigned to lm %d, using previous\n",
>  					mixer->hw_lm->idx - LM_0);
> -			mixer->hw_ctl = last_valid_ctl;
> +			mixer->lm_ctl = last_valid_ctl;
>  		} else {
> -			mixer->hw_ctl = (struct dpu_hw_ctl *)ctl_iter.hw;
> -			last_valid_ctl = mixer->hw_ctl;
> +			mixer->lm_ctl = (struct dpu_hw_ctl *)ctl_iter.hw;
> +			last_valid_ctl = mixer->lm_ctl;
>  		}
>  
>  		/* Shouldn't happen, mixers are always >= ctls */
> -		if (!mixer->hw_ctl) {
> +		if (!mixer->lm_ctl) {
>  			DPU_ERROR("no valid ctls found for lm %d\n",
>  					mixer->hw_lm->idx - LM_0);
>  			return;
> @@ -572,7 +572,7 @@ static void _dpu_crtc_setup_mixer_for_encoder(
>  		DPU_DEBUG("setup mixer %d: lm %d\n",
>  				i, mixer->hw_lm->idx - LM_0);
>  		DPU_DEBUG("setup mixer %d: ctl %d\n",
> -				i, mixer->hw_ctl->idx - CTL_0);
> +				i, mixer->lm_ctl->idx - CTL_0);
>  	}
>  }
>  
> @@ -1567,11 +1567,11 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
>  		m = &cstate->mixers[i];
>  		if (!m->hw_lm)
>  			seq_printf(s, "\tmixer[%d] has no lm\n", i);
> -		else if (!m->hw_ctl)
> +		else if (!m->lm_ctl)
>  			seq_printf(s, "\tmixer[%d] has no ctl\n", i);
>  		else
>  			seq_printf(s, "\tmixer:%d ctl:%d width:%d height:%d\n",
> -				m->hw_lm->idx - LM_0, m->hw_ctl->idx - CTL_0,
> +				m->hw_lm->idx - LM_0, m->lm_ctl->idx - CTL_0,
>  				out_width, mode->vdisplay);
>  	}
>  
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> index 7aa772f..9b1056c 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
> @@ -83,14 +83,14 @@ struct dpu_crtc_smmu_state_data {
>  /**
>   * struct dpu_crtc_mixer: stores the map for each virtual pipeline in the CRTC
>   * @hw_lm:	LM HW Driver context
> - * @hw_ctl:	CTL Path HW driver context
> + * @lm_ctl:	CTL Path HW driver context
>   * @encoder:	Encoder attached to this lm & ctl
>   * @mixer_op_mode:	mixer blending operation mode
>   * @flush_mask:	mixer flush mask for ctl, mixer and pipe
>   */
>  struct dpu_crtc_mixer {
>  	struct dpu_hw_mixer *hw_lm;
> -	struct dpu_hw_ctl *hw_ctl;
> +	struct dpu_hw_ctl *lm_ctl;
>  	struct drm_encoder *encoder;
>  	u32 mixer_op_mode;
>  	u32 flush_mask;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 7ab320d..aeb0f1a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -202,7 +202,7 @@  static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
 		return;
 	}
 
-	ctl = mixer->hw_ctl;
+	ctl = mixer->lm_ctl;
 	lm = mixer->hw_lm;
 	stage_cfg = &dpu_crtc->stage_cfg;
 	cstate = to_dpu_crtc_state(crtc->state);
@@ -292,15 +292,15 @@  static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
 	}
 
 	for (i = 0; i < cstate->num_mixers; i++) {
-		if (!mixer[i].hw_lm || !mixer[i].hw_ctl) {
+		if (!mixer[i].hw_lm || !mixer[i].lm_ctl) {
 			DPU_ERROR("invalid lm or ctl assigned to mixer\n");
 			return;
 		}
 		mixer[i].mixer_op_mode = 0;
 		mixer[i].flush_mask = 0;
-		if (mixer[i].hw_ctl->ops.clear_all_blendstages)
-			mixer[i].hw_ctl->ops.clear_all_blendstages(
-					mixer[i].hw_ctl);
+		if (mixer[i].lm_ctl->ops.clear_all_blendstages)
+			mixer[i].lm_ctl->ops.clear_all_blendstages(
+					mixer[i].lm_ctl);
 	}
 
 	/* initialize stage cfg */
@@ -309,7 +309,7 @@  static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
 	_dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer);
 
 	for (i = 0; i < cstate->num_mixers; i++) {
-		ctl = mixer[i].hw_ctl;
+		ctl = mixer[i].lm_ctl;
 		lm = mixer[i].hw_lm;
 
 		lm->ops.setup_alpha_out(lm, mixer[i].mixer_op_mode);
@@ -553,14 +553,14 @@  static void _dpu_crtc_setup_mixer_for_encoder(
 		if (!dpu_rm_get_hw(rm, &ctl_iter)) {
 			DPU_DEBUG("no ctl assigned to lm %d, using previous\n",
 					mixer->hw_lm->idx - LM_0);
-			mixer->hw_ctl = last_valid_ctl;
+			mixer->lm_ctl = last_valid_ctl;
 		} else {
-			mixer->hw_ctl = (struct dpu_hw_ctl *)ctl_iter.hw;
-			last_valid_ctl = mixer->hw_ctl;
+			mixer->lm_ctl = (struct dpu_hw_ctl *)ctl_iter.hw;
+			last_valid_ctl = mixer->lm_ctl;
 		}
 
 		/* Shouldn't happen, mixers are always >= ctls */
-		if (!mixer->hw_ctl) {
+		if (!mixer->lm_ctl) {
 			DPU_ERROR("no valid ctls found for lm %d\n",
 					mixer->hw_lm->idx - LM_0);
 			return;
@@ -572,7 +572,7 @@  static void _dpu_crtc_setup_mixer_for_encoder(
 		DPU_DEBUG("setup mixer %d: lm %d\n",
 				i, mixer->hw_lm->idx - LM_0);
 		DPU_DEBUG("setup mixer %d: ctl %d\n",
-				i, mixer->hw_ctl->idx - CTL_0);
+				i, mixer->lm_ctl->idx - CTL_0);
 	}
 }
 
@@ -1567,11 +1567,11 @@  static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
 		m = &cstate->mixers[i];
 		if (!m->hw_lm)
 			seq_printf(s, "\tmixer[%d] has no lm\n", i);
-		else if (!m->hw_ctl)
+		else if (!m->lm_ctl)
 			seq_printf(s, "\tmixer[%d] has no ctl\n", i);
 		else
 			seq_printf(s, "\tmixer:%d ctl:%d width:%d height:%d\n",
-				m->hw_lm->idx - LM_0, m->hw_ctl->idx - CTL_0,
+				m->hw_lm->idx - LM_0, m->lm_ctl->idx - CTL_0,
 				out_width, mode->vdisplay);
 	}
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index 7aa772f..9b1056c 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -83,14 +83,14 @@  struct dpu_crtc_smmu_state_data {
 /**
  * struct dpu_crtc_mixer: stores the map for each virtual pipeline in the CRTC
  * @hw_lm:	LM HW Driver context
- * @hw_ctl:	CTL Path HW driver context
+ * @lm_ctl:	CTL Path HW driver context
  * @encoder:	Encoder attached to this lm & ctl
  * @mixer_op_mode:	mixer blending operation mode
  * @flush_mask:	mixer flush mask for ctl, mixer and pipe
  */
 struct dpu_crtc_mixer {
 	struct dpu_hw_mixer *hw_lm;
-	struct dpu_hw_ctl *hw_ctl;
+	struct dpu_hw_ctl *lm_ctl;
 	struct drm_encoder *encoder;
 	u32 mixer_op_mode;
 	u32 flush_mask;