From patchwork Fri Jun 13 12:02:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4348731 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E7534BEEAA for ; Fri, 13 Jun 2014 12:02:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 067A520268 for ; Fri, 13 Jun 2014 12:02:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 98ED320254 for ; Fri, 13 Jun 2014 12:02:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751140AbaFMMCc (ORCPT ); Fri, 13 Jun 2014 08:02:32 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:62142 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbaFMMCc (ORCPT ); Fri, 13 Jun 2014 08:02:32 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0MGyyA-1WzFv61mEM-00Dkk6; Fri, 13 Jun 2014 14:02:02 +0200 From: Arnd Bergmann To: linux-media@vger.kernel.org Cc: Laurent Pinchart , linux-arm-kernel@lists.infradead.org Subject: [PATCH] [RFC] [media] omap3isp: try to fix dependencies Date: Fri, 13 Jun 2014 14:02:01 +0200 Message-ID: <46586956.hxqoJOmDbk@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:SwrWjAX4FD5vKZPW1SavK5Vzn2N9qGAhmOEro+NUf9b Dn1660UsLhbXBLyrjvtyUkpOZpo/aOLr+jH7d8Iu42UCFuXLpU U39qmXc9Ye/ViurYdCWRqX4fs2O0h4oIotiGMf68hZbCVApdNg f6kWlv/imDSjVKVR2GVpesG9yGlXcm2D90PhL9LwFVgtpeC5+R JKWc/9+uw97hkYz8pKRBoFXE9T/sZJtffWXBtePalKpFCa6xp7 udghK3zEUxmAd2gotNwdIMAQbM7TViRi3ca2Zb/G45WtIhP7CR KzM8BUX5ZYS1FTvGib7IfVvUQnwhgviycdLx93TDbo1f/yU/xZ gWhRwbWajqpW4+FoG6ms= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit 2a0a5472af5c ("omap3isp: Use the ARM DMA IOMMU-aware operations") brought the omap3isp driver closer to using standard APIs, but also introduced two problems: a) it selects a particular IOMMU driver for no good reason. This just causes hard to track dependency chains, in my case breaking an experimental patch set that tries to reenable !MMU support on ARM multiplatform kernels. Since the driver doesn't have a dependency on the actual IOMMU implementation (other than sitting on the same SoC), this changes the 'select OMAP_IOMMU' to a generic 'depends on IOMMU_API' that reflects the actual usage. b) The driver incorrectly calls into low-level helpers designed to be used by the IOMMU implementation: arm_iommu_{create,attach,release}_mapping. I'm not fixing this here, but adding a FIXME and a dependency on ARM_DMA_USE_IOMMU. I believe the correct solution is to move the calls into the omap iommu driver that currently doesn't have them, and change the isp driver to call generic functions. In addition, this also adds the missing 'select VIDEOBUF2_DMA_CONTIG' that is needed since fbac1400bd1 ("[media] omap3isp: Move to videobuf2") Signed-off-by: Arnd Bergmann ---- Hi Laurent, Could you have a look at this? It's possible I'm missing something important here, but this is what I currently need to get randconfig builds to use the omap3isp driver. --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 8108c69..15bf61b 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -94,8 +94,9 @@ config VIDEO_M32R_AR_M64278 config VIDEO_OMAP3 tristate "OMAP 3 Camera support" depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3 - select ARM_DMA_USE_IOMMU - select OMAP_IOMMU + depends on ARM_DMA_USE_IOMMU # FIXME: use iommu API instead of low-level ARM calls + depends on IOMMU_API + select VIDEOBUF2_DMA_CONTIG ---help--- Driver for an OMAP 3 camera controller.