From patchwork Mon Jul 22 13:47:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11052455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D426B746 for ; Mon, 22 Jul 2019 13:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3934282EC for ; Mon, 22 Jul 2019 13:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7F7C285B7; Mon, 22 Jul 2019 13:48:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73506282EC for ; Mon, 22 Jul 2019 13:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729430AbfGVNsu (ORCPT ); Mon, 22 Jul 2019 09:48:50 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2735 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727805AbfGVNsu (ORCPT ); Mon, 22 Jul 2019 09:48:50 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B47831F73539573CC4C6; Mon, 22 Jul 2019 21:48:46 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Mon, 22 Jul 2019 21:48:39 +0800 From: YueHaibing To: , , , , , CC: , , , YueHaibing Subject: [PATCH] media: staging: ipu3: Enable IOVA API only when IOMMU support is enabled Date: Mon, 22 Jul 2019 21:47:49 +0800 Message-ID: <20190722134749.21580-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If IOMMU_SUPPORT is not set, ipu3 driver may select IOMMU_IOVA to m. But for many drivers, they use "select IOMMU_IOVA if IOMMU_SUPPORT" in the Kconfig, for example, CONFIG_TEGRA_VDE is set to y but IOMMU_IOVA is m, then the building fails like this: drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map': iommu.c:(.text+0x41): undefined reference to `alloc_iova' iommu.c:(.text+0x56): undefined reference to `__free_iova' Reported-by: Hulk Robot Fixes: 7fc7af649ca7 ("media: staging/intel-ipu3: Add imgu top level pci device driver") Signed-off-by: YueHaibing --- drivers/staging/media/ipu3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/ipu3/Kconfig b/drivers/staging/media/ipu3/Kconfig index 4b51c67..b7df18f 100644 --- a/drivers/staging/media/ipu3/Kconfig +++ b/drivers/staging/media/ipu3/Kconfig @@ -4,7 +4,7 @@ config VIDEO_IPU3_IMGU depends on PCI && VIDEO_V4L2 depends on MEDIA_CONTROLLER && VIDEO_V4L2_SUBDEV_API depends on X86 - select IOMMU_IOVA + select IOMMU_IOVA if IOMMU_SUPPORT select VIDEOBUF2_DMA_SG help This is the Video4Linux2 driver for Intel IPU3 image processing unit,