[PATCH v1 19/19] drm: sti: rename mixer registers to be main/aux independent

Benjamin Gaignard benjamin.gaignard at linaro.org
Tue Apr 8 05:19:26 PDT 2014


From: Vincent Abriou <vincent.abriou at st.com>

Signed-off-by: Benjamin Gaignard <benjamin.gaignard at linaro.org>
Signed-off-by: Vincent Abriou <vincent.abriou at st.com>
Signed-off-by: Fabien Dessenne <fabien.dessenne at st.com>
---
 drivers/gpu/drm/sti/sti_mixer.c | 70 ++++++++++++++++++++---------------------
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index fce72e4..73d5405 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -18,16 +18,16 @@ static const u32 MixerColorSpaceMatIdentity[] = {
 };
 
 /* regs offset */
-#define GAM_MIXER_MAIN_CTL	0x00
-#define GAM_MIXER_MAIN_BKC	0x04
-#define GAM_MIXER_MAIN_BCO	0x0C
-#define GAM_MIXER_MAIN_BCS	0x10
-#define GAM_MIXER_MAIN_AVO	0x28
-#define GAM_MIXER_MAIN_AVS	0x2C
-#define GAM_MIXER_MAIN_CRB	0x34
-#define GAM_MIXER_MAIN_ACT	0x38
-#define GAM_MIXER_MAIN_MBP	0x3C
-#define GAM_MIXER_MAIN_MX0	0x80
+#define GAM_MIXER_CTL	0x00
+#define GAM_MIXER_BKC	0x04
+#define GAM_MIXER_BCO	0x0C
+#define GAM_MIXER_BCS	0x10
+#define GAM_MIXER_AVO	0x28
+#define GAM_MIXER_AVS	0x2C
+#define GAM_MIXER_CRB	0x34
+#define GAM_MIXER_ACT	0x38
+#define GAM_MIXER_MBP	0x3C
+#define GAM_MIXER_MX0	0x80
 
 /* id for depth of CRB reg */
 #define GAM_DEPTH_VID0_ID	1
@@ -82,7 +82,7 @@ static inline void sti_mixer_reg_writemask(struct sti_mixer *mixer,
 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable)
 {
 	sti_mixer_reg_writemask(mixer,
-				GAM_MIXER_MAIN_CTL, enable, GAM_CTL_BACK_MASK);
+				GAM_MIXER_CTL, enable, GAM_CTL_BACK_MASK);
 }
 
 static void sti_mixer_set_background_color(struct sti_mixer *mixer,
@@ -90,7 +90,7 @@ static void sti_mixer_set_background_color(struct sti_mixer *mixer,
 {
 	u32 val = (red << 16) | (green << 8) | blue;
 
-	sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BKC, val);
+	sti_mixer_reg_write(mixer, GAM_MIXER_BKC, val);
 }
 
 static void sti_mixer_set_background_area(struct sti_mixer *mixer,
@@ -103,8 +103,8 @@ static void sti_mixer_set_background_area(struct sti_mixer *mixer,
 	xdo = sti_vtg_get_pixel_number(*mode, 0);
 	xds = sti_vtg_get_pixel_number(*mode, mode->hdisplay - 1);
 
-	sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BCO, ydo << 16 | xdo);
-	sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_BCS, yds << 16 | xds);
+	sti_mixer_reg_write(mixer, GAM_MIXER_BCO, ydo << 16 | xdo);
+	sti_mixer_reg_write(mixer, GAM_MIXER_BCS, yds << 16 | xds);
 }
 
 int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer)
@@ -143,12 +143,12 @@ int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer)
 
 	DRM_DEBUG_DRIVER("%s %s depth=%d\n", sti_mixer_to_str(mixer),
 			 sti_layer_to_str(layer), depth);
-	dev_dbg(mixer->dev, "GAM_MIXER_MAIN_CRB val 0x%x mask 0x%x\n",
+	dev_dbg(mixer->dev, "GAM_MIXER_CRB val 0x%x mask 0x%x\n",
 		layer_id, mask);
-	sti_mixer_reg_writemask(mixer, GAM_MIXER_MAIN_CRB, layer_id, mask);
+	sti_mixer_reg_writemask(mixer, GAM_MIXER_CRB, layer_id, mask);
 
-	dev_dbg(mixer->dev, "Read GAM_MIXER_MAIN_CRB 0x%x\n",
-		sti_mixer_reg_read(mixer, GAM_MIXER_MAIN_CRB));
+	dev_dbg(mixer->dev, "Read GAM_MIXER_CRB 0x%x\n",
+		sti_mixer_reg_read(mixer, GAM_MIXER_CRB));
 	return 0;
 }
 
@@ -164,8 +164,8 @@ int sti_mixer_active_video_area(struct sti_mixer *mixer,
 
 	DRM_DEBUG_DRIVER("%s active video area xdo:%d ydo:%d xds:%d yds:%d\n",
 			 sti_mixer_to_str(mixer), xdo, ydo, xds, yds);
-	sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_AVO, ydo << 16 | xdo);
-	sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_AVS, yds << 16 | xds);
+	sti_mixer_reg_write(mixer, GAM_MIXER_AVO, ydo << 16 | xdo);
+	sti_mixer_reg_write(mixer, GAM_MIXER_AVS, yds << 16 | xds);
 
 	sti_mixer_set_background_color(mixer, 0xFF, 0, 0);
 
@@ -210,7 +210,7 @@ int sti_mixer_set_layer_status(struct sti_mixer *mixer,
 		return -1;
 	}
 	val = status ? mask : 0;
-	sti_mixer_reg_writemask(mixer, GAM_MIXER_MAIN_CTL, val, mask);
+	sti_mixer_reg_writemask(mixer, GAM_MIXER_CTL, val, mask);
 	return 0;
 }
 
@@ -219,7 +219,7 @@ void sti_mixer_set_matrix(struct sti_mixer *mixer)
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(MixerColorSpaceMatIdentity); i++)
-		sti_mixer_reg_write(mixer, GAM_MIXER_MAIN_MX0 + (i * 4),
+		sti_mixer_reg_write(mixer, GAM_MIXER_MX0 + (i * 4),
 				    MixerColorSpaceMatIdentity[i]);
 }
 
@@ -359,23 +359,23 @@ int sti_mixer_dbg_show(struct seq_file *m, void *arg)
 		struct sti_mixer *mixer = compo->mixer[i];
 
 		seq_printf(m, "\n%s", sti_mixer_to_str(mixer));
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_CTL);
+		MIXER_DBG_DUMP(GAM_MIXER_CTL);
 		sti_mixer_dbg_ctl(m,
 				  sti_mixer_reg_read(mixer,
-						     GAM_MIXER_MAIN_CTL));
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_BKC);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_BCO);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_BCS);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_AVO);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_AVS);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_CRB);
+						     GAM_MIXER_CTL));
+		MIXER_DBG_DUMP(GAM_MIXER_BKC);
+		MIXER_DBG_DUMP(GAM_MIXER_BCO);
+		MIXER_DBG_DUMP(GAM_MIXER_BCS);
+		MIXER_DBG_DUMP(GAM_MIXER_AVO);
+		MIXER_DBG_DUMP(GAM_MIXER_AVS);
+		MIXER_DBG_DUMP(GAM_MIXER_CRB);
 		sti_mixer_dbg_crb(m,
 				  sti_mixer_reg_read(mixer,
-						     GAM_MIXER_MAIN_CRB));
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_ACT);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_MBP);
-		MIXER_DBG_DUMP(GAM_MIXER_MAIN_MX0);
-		sti_mixer_dbg_mxn(m, mixer->regs + GAM_MIXER_MAIN_MX0);
+						     GAM_MIXER_CRB));
+		MIXER_DBG_DUMP(GAM_MIXER_ACT);
+		MIXER_DBG_DUMP(GAM_MIXER_MBP);
+		MIXER_DBG_DUMP(GAM_MIXER_MX0);
+		sti_mixer_dbg_mxn(m, mixer->regs + GAM_MIXER_MX0);
 		seq_puts(m, "\n");
 
 		crtc = &mixer->drm_crtc;
-- 
1.9.0



More information about the dri-devel mailing list