media: venus: fix compile-test build on non-qcom ARM platform
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Jul 2017 08:56:49 +0000 (04:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 20 Jul 2017 19:52:23 +0000 (15:52 -0400)
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 <arnd@arndb.de>
Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/Kconfig
drivers/media/platform/qcom/venus/firmware.c

index 17cffff864540c67c5dc2ba6b71c6f6005d8d9c2..0c741d12dbc906d4350d4ae435b116056c0346ce 100644 (file)
@@ -476,8 +476,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---
index 1b1a4f3559188ce208603c6c0ff88af938258f23..1ede92300dd6e9951cb610c1be24d8f03f04720d 100644 (file)
@@ -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;