diff mbox

[09/16] gpu: ipu-v3: Add ipu_ic_set_src()

Message ID 1467932621-358-10-git-send-email-steve_longerbeam@mentor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Longerbeam July 7, 2016, 11:03 p.m. UTC
Adds ipu_ic_set_src() which is just aa wrapper around
ipu_set_ic_src_mux().

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 drivers/gpu/ipu-v3/ipu-ic.c | 10 ++++++++++
 include/video/imx-ipu-v3.h  |  1 +
 2 files changed, 11 insertions(+)

Comments

Philipp Zabel July 15, 2016, 12:45 p.m. UTC | #1
Am Donnerstag, den 07.07.2016, 16:03 -0700 schrieb Steve Longerbeam:
> Adds ipu_ic_set_src() which is just aa wrapper around
> ipu_set_ic_src_mux().
> 
> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> ---
>  drivers/gpu/ipu-v3/ipu-ic.c | 10 ++++++++++
>  include/video/imx-ipu-v3.h  |  1 +
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-ic.c
> index 1dcb96c..f306a9c 100644
> --- a/drivers/gpu/ipu-v3/ipu-ic.c
> +++ b/drivers/gpu/ipu-v3/ipu-ic.c
> @@ -629,6 +629,16 @@ unlock:
>  }
>  EXPORT_SYMBOL_GPL(ipu_ic_task_idma_init);
>  
> +int ipu_ic_set_src(struct ipu_ic *ic, int csi_id, bool vdi)
> +{
> +	struct ipu_ic_priv *priv = ic->priv;
> +
> +	ipu_set_ic_src_mux(priv->ipu, csi_id, vdi);

	ipu_set_ic_src_mux(ic->priv->ipu, csi_id, vdi);
would be shorter.

regards
Philipp
Steve Longerbeam July 15, 2016, 9:57 p.m. UTC | #2
On 07/15/2016 05:45 AM, Philipp Zabel wrote:
> Am Donnerstag, den 07.07.2016, 16:03 -0700 schrieb Steve Longerbeam:
>> +int ipu_ic_set_src(struct ipu_ic *ic, int csi_id, bool vdi)
>> +{
>> +	struct ipu_ic_priv *priv = ic->priv;
>> +
>> +	ipu_set_ic_src_mux(priv->ipu, csi_id, vdi);
> 	ipu_set_ic_src_mux(ic->priv->ipu, csi_id, vdi);
> would be shorter.

Again this function isn't needed any longer. I will remove this
patch in next version.

Steve
diff mbox

Patch

diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-ic.c
index 1dcb96c..f306a9c 100644
--- a/drivers/gpu/ipu-v3/ipu-ic.c
+++ b/drivers/gpu/ipu-v3/ipu-ic.c
@@ -629,6 +629,16 @@  unlock:
 }
 EXPORT_SYMBOL_GPL(ipu_ic_task_idma_init);
 
+int ipu_ic_set_src(struct ipu_ic *ic, int csi_id, bool vdi)
+{
+	struct ipu_ic_priv *priv = ic->priv;
+
+	ipu_set_ic_src_mux(priv->ipu, csi_id, vdi);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(ipu_ic_set_src);
+
 int ipu_ic_enable(struct ipu_ic *ic)
 {
 	struct ipu_ic_priv *priv = ic->priv;
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 57b487d..8f77ddb 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -334,6 +334,7 @@  void ipu_ic_task_disable(struct ipu_ic *ic);
 int ipu_ic_task_idma_init(struct ipu_ic *ic, struct ipuv3_channel *channel,
 			  u32 width, u32 height, int burst_size,
 			  enum ipu_rotate_mode rot);
+int ipu_ic_set_src(struct ipu_ic *ic, int csi_id, bool vdi);
 int ipu_ic_enable(struct ipu_ic *ic);
 int ipu_ic_disable(struct ipu_ic *ic);
 struct ipu_ic *ipu_ic_get(struct ipu_soc *ipu, enum ipu_ic_task task);