From patchwork Fri Jun 30 16:12:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 106754 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp6117652obb; Fri, 30 Jun 2017 09:13:38 -0700 (PDT) X-Received: by 10.98.68.156 with SMTP id m28mr3595543pfi.159.1498839218058; Fri, 30 Jun 2017 09:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498839218; cv=none; d=google.com; s=arc-20160816; b=HMOkiEe/PrhumAYW5pthEOoeEESZH80/OV9Wy12A60ERqZUCbLvS3KG+nxmk1UIc8M QbxBs/pV387a8dHZPzJjlc0gEIEjTt8McWHRC7R8LVnxjPg2xO26sRauExARGrOmS6Vw Dr3LN/oH+kcg+p9UzFqZ3FiqXod52HXFJLoPPSlGFp6XGbyCVdFKpXzP+mE3tJDDRbCn HnS7wa6PPIb+FJXYNP1lHFmbZXMUS6ahMhXPY4MkoHwJEW8kj/o51iUoWsMWQDgdRkwf cqIJF1Cd3J1RfvHQUtMbIaZB+SqDa7dqmfCCwZKBDuBXP/4M4c3XHUitxH3NsIzn6bLa Izlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=JUKN11FiMwiXo7U4tJF4vnZioH+ItfLRmZ6BwJvKYbA=; b=Vh8fhTeQMZoys2lKNVijx0BIGFiq3m+km3bgOIR0xHKvlXKbV+h+zdA9G8LQUm8uJw hdLlIHhVv4jQtJNbuJv/B7jSd6XU0yP79WL62fFPOAK7kYLjywvTSMMADjTluFk81KqD YTl2xKXiNpnB6xn72+Nu3u4EsmWhdc0CZYGYkYrcw0xx4Q9ZxtEL7mmQzqe7gIl6WbMy jpYMHT3I4/gsCuXi+bWVKrW0yMLyaeO2vJK+9SuEJbV8HNoFrBZLeykUPcje8j3bbrJv 7U/SmVaTMF6/9K1MkfhzvbxxvwNa5PZYJJkOw9VxM+AU/aBjaXr7HoyRpwdTzwDZ2O7X 9T7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z128si5802019pgb.505.2017.06.30.09.13.37; Fri, 30 Jun 2017 09:13:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdF3QNg (ORCPT + 10 others); Fri, 30 Jun 2017 12:13:36 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:50356 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbdF3QNf (ORCPT ); Fri, 30 Jun 2017 12:13:35 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MYa6I-1dD6mr08cU-00VPWm; Fri, 30 Jun 2017 18:13:27 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab , Stanimir Varbanov Cc: Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2] [media] venus: fix compile-test build on non-qcom ARM platform Date: Fri, 30 Jun 2017 18:12:41 +0200 Message-Id: <20170630161325.82128-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:gjDPbWsNS1AdgFflISyk18dphQ8E+MXn6MWIu4D6NmK3wkQaYUq 9RM60Ta/jLL5LhHm+syfzwoK2b4HyKtFwhtrG7tgwRmqkFKPRlkmiQTL6skcuF+ABNFhLks 9CDKlk4ADPSw3ChjZBgydFXOInL/f2Ae7G8swfefD2noD07vcsxXvPndxum8P7LfkCs80H4 4gtV4/mg+D1hoYm3xStaw== X-UI-Out-Filterresults: notjunk:1; V01:K0:uUhwGKGgIOk=:87TEPF/GhUvhExjuh8rlH0 lDUAPfI3/xGiLreXVO5zd2FqZCaJMCl3Ketcah7ZDt7DhzU42WNwIeRvYJhK/W72rqfTkZrwh 9pVRsyVZEO210NuMRpmVHNrRFhBXPg+OzGmH3XgZokRa/4DVzM/oMCVusvhDlGFWCQxUkdOMI Lz/z8XCfZerG8BvuRYLqpItRrAFNriMYcyeiFRs8EakfiW7daF1dKZ6RqofmbA+UTWdFaPRRw D3Sf7Fqajb0fc0zMil4EjVCthvr3cCHwGE13rVoRxU7Ajttd4wDtLbwmXHU0k+GpLH7pkFzD3 7rQyT9Wk4LrrCbOl/RIukky8JKgSMF++gHk6nOaKfHHwoDD692Ru+/WXQPng0QzF1KWL5olPW 9Ymx8scnHC5LcRedr29eyRg5P2lFrgOmGFa/8xNQ1sWN3lGVjYFAsEHUc8hF9XqA5irjrwuWl sLDO8WBMBIofCMt2o/bEdJyOSVOI9yWPZFcr0v+3CNFH/JS00xHHKv/9olgMQDigaOomclsuB jFN1K5feo5NbRaF8WYPSfF2/1dVWm/kmJcgbtRkFUEEqGuaAxDRZLDUdfoNG7TVsYxx2c5KL8 ZxxVw835TFD7h9cYqOJNLeo0bUegUsi/AItTFXpXNSwsvrx7cVOirwUPI1ozoSYB2z0nyWyCP 3PM4GxXHhbSCDVNjDsHiIC1D3xNi88nl/v0yNHbg56e1Vee8ZzjEDIg0jUDoKahrsMXY= Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org If QCOM_MDT_LOADER is enabled, but ARCH_QCOM is not, we run into a build error: ERROR: "qcom_mdt_load" [drivers/media/platform/qcom/venus/venus-core.ko] undefined! ERROR: "qcom_mdt_get_size" [drivers/media/platform/qcom/venus/venus-core.ko] undefined! This changes the 'select' statement again, so we only try to enable those symbols when the drivers will actually get built, and explicitly test for QCOM_MDT_LOADER to be enabled before calling into it. Fixes: 76724b30f222 ("[media] media: venus: enable building with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- v2: add required IS_ENABLED() check --- drivers/media/platform/Kconfig | 4 ++-- drivers/media/platform/qcom/venus/firmware.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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 1313cd533436..fb1fa0b82077 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -475,8 +475,8 @@ config VIDEO_QCOM_VENUS tristate "Qualcomm Venus V4L2 encoder/decoder driver" depends on VIDEO_DEV && VIDEO_V4L2 && HAS_DMA depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST - select QCOM_MDT_LOADER if (ARM || ARM64) - select QCOM_SCM if (ARM || ARM64) + select QCOM_MDT_LOADER if ARCH_QCOM + select QCOM_SCM if ARCH_QCOM select VIDEOBUF2_DMA_SG select V4L2_MEM2MEM_DEV ---help--- diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c index 76edb9f60311..3794b9e3250b 100644 --- a/drivers/media/platform/qcom/venus/firmware.c +++ b/drivers/media/platform/qcom/venus/firmware.c @@ -40,7 +40,7 @@ int venus_boot(struct device *parent, struct device *fw_dev, const char *fwname) void *mem_va; int ret; - if (!qcom_scm_is_available()) + if (!IS_ENABLED(CONFIG_QCOM_MDT_LOADER) || !qcom_scm_is_available()) return -EPROBE_DEFER; fw_dev->parent = parent;