From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757417AbcGKADa (ORCPT ); Sun, 10 Jul 2016 20:03:30 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33901 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757274AbcGKAD3 (ORCPT ); Sun, 10 Jul 2016 20:03:29 -0400 MIME-Version: 1.0 In-Reply-To: <1467932621-358-2-git-send-email-steve_longerbeam@mentor.com> References: <1467932621-358-1-git-send-email-steve_longerbeam@mentor.com> <1467932621-358-2-git-send-email-steve_longerbeam@mentor.com> From: Paul Gortmaker Date: Sun, 10 Jul 2016 20:02:57 -0400 X-Google-Sender-Auth: bx76R8RTQ-y1f7ikd1g-kgPrI78 Message-ID: Subject: Re: [PATCH 01/16] gpu: ipu-v3: Add Video Deinterlacer unit To: Steve Longerbeam Cc: p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org, LKML , Steve Longerbeam Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 7, 2016 at 7:03 PM, Steve Longerbeam wrote: > Adds the Video Deinterlacer (VDIC) unit. > > Signed-off-by: Steve Longerbeam > --- > 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 > +#include 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 > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "ipu-prv.h" > + [...]