lkml.org 
[lkml]   [2016]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 01/16] gpu: ipu-v3: Add Video Deinterlacer unit
On Thu, Jul 7, 2016 at 7:03 PM, Steve Longerbeam <slongerbeam@gmail.com> wrote:
> Adds the Video Deinterlacer (VDIC) unit.
>
> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> ---
> drivers/gpu/ipu-v3/Makefile | 2 +-
> drivers/gpu/ipu-v3/ipu-common.c | 11 ++
> drivers/gpu/ipu-v3/ipu-prv.h | 6 +
> drivers/gpu/ipu-v3/ipu-vdi.c | 266 ++++++++++++++++++++++++++++++++++++++++
> include/video/imx-ipu-v3.h | 27 ++++
> 5 files changed, 311 insertions(+), 1 deletion(-)
> create mode 100644 drivers/gpu/ipu-v3/ipu-vdi.c
>
> diff --git a/drivers/gpu/ipu-v3/Makefile b/drivers/gpu/ipu-v3/Makefile
> index 107ec23..aeba9dc 100644
> --- a/drivers/gpu/ipu-v3/Makefile
> +++ b/drivers/gpu/ipu-v3/Makefile
> @@ -1,4 +1,4 @@
> obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
>
> imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
> - ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o
> + ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o ipu-vdi.o
> diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
> index 99dcacf..30dc115 100644
> --- a/drivers/gpu/ipu-v3/ipu-common.c
> +++ b/drivers/gpu/ipu-v3/ipu-common.c
> @@ -833,6 +833,14 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
> goto err_ic;
> }
>
> + ret = ipu_vdi_init(ipu, dev, ipu_base + devtype->vdi_ofs,
> + IPU_CONF_VDI_EN | IPU_CONF_ISP_EN |
> + IPU_CONF_IC_INPUT);
> + if (ret) {
> + unit = "vdi";
> + goto err_vdi;
> + }
> +
> ret = ipu_di_init(ipu, dev, 0, ipu_base + devtype->disp0_ofs,
> IPU_CONF_DI0_EN, ipu_clk);
> if (ret) {
> @@ -887,6 +895,8 @@ err_dc:
> err_di_1:
> ipu_di_exit(ipu, 0);
> err_di_0:
> + ipu_vdi_exit(ipu);
> +err_vdi:
> ipu_ic_exit(ipu);
> err_ic:
> ipu_csi_exit(ipu, 1);
> @@ -971,6 +981,7 @@ static void ipu_submodules_exit(struct ipu_soc *ipu)
> ipu_dc_exit(ipu);
> ipu_di_exit(ipu, 1);
> ipu_di_exit(ipu, 0);
> + ipu_vdi_exit(ipu);
> ipu_ic_exit(ipu);
> ipu_csi_exit(ipu, 1);
> ipu_csi_exit(ipu, 0);
> diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h
> index bfb1e8a..845f64c 100644
> --- a/drivers/gpu/ipu-v3/ipu-prv.h
> +++ b/drivers/gpu/ipu-v3/ipu-prv.h
> @@ -138,6 +138,7 @@ struct ipu_dc_priv;
> struct ipu_dmfc_priv;
> struct ipu_di;
> struct ipu_ic_priv;
> +struct ipu_vdi;
> struct ipu_smfc_priv;
>
> struct ipu_devtype;
> @@ -169,6 +170,7 @@ struct ipu_soc {
> struct ipu_di *di_priv[2];
> struct ipu_csi *csi_priv[2];
> struct ipu_ic_priv *ic_priv;
> + struct ipu_vdi *vdi_priv;
> struct ipu_smfc_priv *smfc_priv;
> };
>
> @@ -199,6 +201,10 @@ int ipu_ic_init(struct ipu_soc *ipu, struct device *dev,
> unsigned long base, unsigned long tpmem_base);
> void ipu_ic_exit(struct ipu_soc *ipu);
>
> +int ipu_vdi_init(struct ipu_soc *ipu, struct device *dev,
> + unsigned long base, u32 module);
> +void ipu_vdi_exit(struct ipu_soc *ipu);
> +
> int ipu_di_init(struct ipu_soc *ipu, struct device *dev, int id,
> unsigned long base, u32 module, struct clk *ipu_clk);
> void ipu_di_exit(struct ipu_soc *ipu, int id);
> diff --git a/drivers/gpu/ipu-v3/ipu-vdi.c b/drivers/gpu/ipu-v3/ipu-vdi.c
> new file mode 100644
> index 0000000..1303bcc
> --- /dev/null
> +++ b/drivers/gpu/ipu-v3/ipu-vdi.c
> @@ -0,0 +1,266 @@
> +/*
> + * Copyright (C) 2012 Mentor Graphics Inc.
> + * Copyright (C) 2005-2009 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
> + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
> + * for more details.
> + */
> +#include <linux/export.h>
> +#include <linux/module.h>

You have a u32 field in a struct called "modules" but aside from that, I do not
see anything in this code requiring module.h -- did I miss something?

You might want export.h for EXPORT_SYMBOL though.

Paul.
--

> +#include <linux/types.h>
> +#include <linux/errno.h>
> +#include <linux/delay.h>
> +#include <linux/io.h>
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +#include <linux/clk.h>
> +#include <linux/clk-provider.h>
> +#include <linux/clkdev.h>
> +#include <uapi/linux/v4l2-mediabus.h>
> +
> +#include "ipu-prv.h"
> +

[...]

\
 
 \ /
  Last update: 2016-07-11 02:41    [W:0.215 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site