[PATCH 12/72] gpu: ipu-v3: Add ipu_dp_uninit_channel()

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

 



Adds the function ipu_dp_uninit_channel() which tears down
ipu_dp_setup_channel().

Signed-off-by: Steve Longerbeam <steve_longerbeam@xxxxxxxxxx>
Signed-off-by: Muzaffar Mahmood <muzaffar_mahmood@xxxxxxxxxx>
---
 drivers/gpu/ipu-v3/ipu-dp.c |   18 ++++++++++++++++++
 include/video/imx-ipu-v3.h  |    1 +
 2 files changed, 19 insertions(+)

diff --git a/drivers/gpu/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c
index 472acd6..626f738 100644
--- a/drivers/gpu/ipu-v3/ipu-dp.c
+++ b/drivers/gpu/ipu-v3/ipu-dp.c
@@ -302,6 +302,16 @@ static void ipu_dp_csc_init(struct ipu_flow *flow,
 	writel(reg, flow->base + DP_COM_CONF);
 }
 
+static void ipu_dp_csc_disable(struct ipu_flow *flow)
+{
+	writel(0, flow->base + DP_CSC_A_0);
+	writel(0, flow->base + DP_CSC_A_1);
+	writel(0, flow->base + DP_CSC_A_2);
+	writel(0, flow->base + DP_CSC_A_3);
+	writel(0, flow->base + DP_CSC_0);
+	writel(0, flow->base + DP_CSC_1);
+}
+
 int ipu_dp_setup_channel(struct ipu_dp *dp,
 		enum ipu_color_space in,
 		enum ipu_color_space out)
@@ -344,6 +354,14 @@ int ipu_dp_setup_channel(struct ipu_dp *dp,
 }
 EXPORT_SYMBOL_GPL(ipu_dp_setup_channel);
 
+void ipu_dp_uninit_channel(struct ipu_dp *dp)
+{
+	struct ipu_flow *flow = to_flow(dp);
+
+	ipu_dp_csc_disable(flow);
+}
+EXPORT_SYMBOL_GPL(ipu_dp_uninit_channel);
+
 int ipu_dp_enable(struct ipu_soc *ipu)
 {
 	struct ipu_dp_priv *priv = ipu->dp_priv;
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 36309b9..567ac41 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -292,6 +292,7 @@ void ipu_dp_disable_channel(struct ipu_dp *dp);
 void ipu_dp_disable(struct ipu_soc *ipu);
 int ipu_dp_setup_channel(struct ipu_dp *dp,
 		enum ipu_color_space in, enum ipu_color_space out);
+void ipu_dp_uninit_channel(struct ipu_dp *dp);
 int ipu_dp_set_window_pos(struct ipu_dp *, u16 x_pos, u16 y_pos);
 int ipu_dp_set_global_alpha(struct ipu_dp *dp, bool enable, u8 alpha,
 		bool bg_chan);
-- 
1.7.9.5

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[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