public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Subject: Re: [PATCH v2 02/19] media: omap3isp: allow it to build with COMPILE_TEST
Date: Sat, 07 Apr 2018 16:31:35 +0300	[thread overview]
Message-ID: <18135667.qKsSxlhKAa@avalon> (raw)
In-Reply-To: <f618981fec34acc5eee211b34a0018752634af9c.1522959716.git.mchehab@s-opensource.com>

Hi Mauro,

Thank you for the patch.

On Thursday, 5 April 2018 23:29:29 EEST Mauro Carvalho Chehab wrote:
> There aren't much things required for it to build with COMPILE_TEST.
> It just needs to provide stub for an arm-dependent include.
> 
> Let's replicate the same solution used by ipmmu-vmsa, in order
> to allow building omap3 with COMPILE_TEST.
> 
> The actual logic here came from this driver:
> 
>    drivers/iommu/ipmmu-vmsa.c
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  drivers/media/platform/Kconfig        | 8 ++++----
>  drivers/media/platform/omap3isp/isp.c | 7 +++++++
>  2 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index c7a1cf8a1b01..03c9dfeb7781 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -62,12 +62,12 @@ config VIDEO_MUX
> 
>  config VIDEO_OMAP3
>  	tristate "OMAP 3 Camera support"
> -	depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3
> +	depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API
>  	depends on HAS_DMA && OF
> -	depends on OMAP_IOMMU
> -	select ARM_DMA_USE_IOMMU
> +	depends on ((ARCH_OMAP3 && OMAP_IOMMU) || COMPILE_TEST)
> +	select ARM_DMA_USE_IOMMU if OMAP_IOMMU
>  	select VIDEOBUF2_DMA_CONTIG
> -	select MFD_SYSCON
> +	select MFD_SYSCON if ARCH_OMAP3

Is this needed ? Can't MFD_SYSCON be selected on non-ARM platforms ?

>  	select V4L2_FWNODE
>  	---help---
>  	  Driver for an OMAP 3 camera controller.
> diff --git a/drivers/media/platform/omap3isp/isp.c
> b/drivers/media/platform/omap3isp/isp.c index 8eb000e3d8fd..2a11a709aa4f
> 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -61,7 +61,14 @@
>  #include <linux/sched.h>
>  #include <linux/vmalloc.h>
> 
> +#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)
>  #include <asm/dma-iommu.h>
> +#else
> +#define arm_iommu_create_mapping(...)	NULL
> +#define arm_iommu_attach_device(...)	-ENODEV
> +#define arm_iommu_release_mapping(...)	do {} while (0)
> +#define arm_iommu_detach_device(...)	do {} while (0)
> +#endif
> 
>  #include <media/v4l2-common.h>
>  #include <media/v4l2-fwnode.h>

As just commented on in a reply to v1 I still don't think this is a proper 
solution. I'm all for extending compile-test coverage, but I don't believe we 
need to make all drivers compile on every platform. ARM is certainly a 
mainstream-enough platform nowadays to be worth having the media tree compiled 
for.

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2018-04-07 13:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 20:29 [PATCH v2 00/19] Make all media drivers build with COMPILE_TEST Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 01/19] omap: omap-iommu.h: allow building drivers " Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 02/19] media: omap3isp: allow it to build " Mauro Carvalho Chehab
2018-04-06 12:56   ` kbuild test robot
2018-04-07 13:31   ` Laurent Pinchart [this message]
2018-04-05 20:29 ` [PATCH v2 03/19] media: omap3isp/isp: remove an unused static var Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 04/19] media: fsl-viu: mark static functions as such Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 05/19] media: fsl-viu: allow building it with COMPILE_TEST Mauro Carvalho Chehab
2018-04-06 10:43   ` kbuild test robot
2018-04-06 14:03   ` kbuild test robot
2018-04-05 20:29 ` [PATCH v2 06/19] media: cec_gpio: allow building CEC_GPIO " Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 07/19] media: exymos4-is: allow compile test for EXYNOS FIMC-LITE Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 08/19] media: mmp-camera.h: add missing platform data Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 09/19] media: marvel-ccic: re-enable mmp-driver build Mauro Carvalho Chehab
2018-04-06 14:52   ` kbuild test robot
2018-04-05 20:29 ` [PATCH v2 10/19] media: mmp-driver: make two functions static Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 11/19] media: davinci: allow building isif code Mauro Carvalho Chehab
2018-04-06 16:17   ` kbuild test robot
2018-04-05 20:29 ` [PATCH v2 12/19] media: davinci: allow build vpbe_display with COMPILE_TEST Mauro Carvalho Chehab
2018-04-06 18:08   ` kbuild test robot
2018-04-05 20:29 ` [PATCH v2 13/19] media: vpbe_venc: don't store return codes if they won't be used Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 14/19] media: davinci: get rid of lots of kernel-doc warnings Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 15/19] omap2: omapfb: allow building it with COMPILE_TEST Mauro Carvalho Chehab
2018-04-06  8:41   ` Tomi Valkeinen
2018-04-06 11:46   ` kbuild test robot
2018-04-06 19:29   ` kbuild test robot
2018-04-20 15:13   ` Bartlomiej Zolnierkiewicz
2018-04-05 20:29 ` [PATCH v2 16/19] media: omap: " Mauro Carvalho Chehab
2018-04-06 12:11   ` kbuild test robot
2018-04-05 20:29 ` [PATCH v2 17/19] media: omap4iss: make it build " Mauro Carvalho Chehab
2018-04-05 20:59   ` Laurent Pinchart
2018-04-05 20:29 ` [PATCH v2 18/19] media: si470x: allow build both USB and I2C at the same time Mauro Carvalho Chehab
2018-04-06 16:21   ` kbuild test robot
2018-04-06 16:46     ` Mauro Carvalho Chehab
2018-04-18 17:07       ` Daniel Scheller
2018-04-18 18:53         ` Mauro Carvalho Chehab
2018-04-18 19:06           ` Daniel Scheller
2018-04-18 19:17             ` Mauro Carvalho Chehab
2018-04-05 20:29 ` [PATCH v2 19/19] media: staging: davinci_vpfe: allow building with COMPILE_TEST Mauro Carvalho Chehab
2018-04-06 22:25   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18135667.qKsSxlhKAa@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.gaignard@linaro.org \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@s-opensource.com \
    --cc=p.zabel@pengutronix.de \
    --cc=ramesh.shanmugasundaram@bp.renesas.com \
    --cc=stanimir.varbanov@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox