[PATCH 26/72] gpu: ipu-v3: Enumerate the DC channel names

Steve Longerbeam slongerbeam at gmail.com
Fri Oct 31 15:54:09 PDT 2014


Define the names of the DC channels, and reference them in ipu-dc.

Signed-off-by: Steve Longerbeam <steve_longerbeam at mentor.com>
---
 drivers/gpu/ipu-v3/ipu-dc.c |    6 ++----
 include/video/imx-ipu-v3.h  |    7 +++++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c
index 6a3e429..23b6e2c 100644
--- a/drivers/gpu/ipu-v3/ipu-dc.c
+++ b/drivers/gpu/ipu-v3/ipu-dc.c
@@ -83,8 +83,6 @@
 #define DC_WR_CH_CONF_PROG_DI_ID		(1 << 2)
 #define DC_WR_CH_CONF_PROG_DISP_ID(i)		(((i) & 0x1) << 3)
 
-#define IPU_DC_NUM_CHANNELS	10
-
 struct ipu_dc_priv;
 
 /* some pre-defined maps */
@@ -394,9 +392,9 @@ void ipu_dc_disable_channel(struct ipu_dc *dc)
 	u32 val;
 
 	/* TODO: Handle MEM_FG_SYNC differently from MEM_BG_SYNC */
-	if (dc->chno == 1)
+	if (dc->chno == IPU_DC_CHANNEL_SYNC)
 		irq = priv->dc_irq;
-	else if (dc->chno == 5)
+	else if (dc->chno == IPU_DC_CHANNEL_DP_SYNC)
 		irq = priv->dp_irq;
 	else
 		return;
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 0eb7468..d2f621d 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -239,6 +239,13 @@ struct ipu_dc_if_map {
 	u32 v4l2_fmt;
 };
 
+#define IPU_DC_CHANNEL_DP_SYNC       5 /* sync main+aux planes */
+#define IPU_DC_CHANNEL_SYNC          1 /* sync single plane (no DP) */
+#define IPU_DC_CHANNEL_DP_ASYNC      6 /* async main+aux planes */
+#define IPU_DC_CHANNEL_ASYNC         2 /* async single plane (no DP) */
+#define IPU_DC_CHANNEL_READ          0 /* DC read channel */
+#define IPU_DC_NUM_CHANNELS         10
+
 struct ipu_dc;
 struct ipu_di;
 struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel);
-- 
1.7.9.5



More information about the dri-devel mailing list