Message ID | 1494344161-28131-10-git-send-email-stanimir.varbanov@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Qualcomm video decoder/encoder driver | expand |
Em Tue, 9 May 2017 18:36:01 +0300 Stanimir Varbanov <stanimir.varbanov@linaro.org> escreveu: > This adds Venus driver Makefile and changes v4l2 platform > Makefile/Kconfig in order to enable building of the driver. > > Note that in this initial version the COMPILE_TEST-ing is not > supported because the drivers specific to ARM builds are still > in process of enabling the aforementioned compile testing. Not sure what you're meaning here. Almost all media drivers for ARM platforms build with COMPILE_TEST. The exceptions are some legacy drivers that were added before COMPILE_TEST and rely on some weird arch-specific functions (like arch-specific DMA functions like on OMAP3). It is really important to make it build with COMPILE_TEST, as the Coverity instance we use on Kernel works only for the code that builds on x86. Also, on my test environment, I only do per-patch builds for i386. So, if some patch breaks the build, I won't detect until too late. Btw, on a quick test, enabling compile-test on it built the driver (I didn't make a full build - just a partial modules-only build - so maybe it might depend on some qualcomm-specific symbols). Building it with W=1 and gcc7 produced the following warnings: drivers/media/platform/qcom/venus/hfi.c:171 hfi_core_ping() warn: inconsistent returns 'mutex:&core->lock'. Locked on: line 159 Unlocked on: line 171 drivers/media/platform/qcom/venus/hfi_cmds.c:415 pkt_session_set_property_1x() warn: variable dereferenced before check 'pkt' (see line 412) drivers/media/platform/qcom/venus/hfi_cmds.c:1177 pkt_session_set_property_3xx() warn: variable dereferenced before check 'pkt' (see line 1174) drivers/media/platform/qcom/venus/helpers.c:157 load_per_instance() warn: variable dereferenced before check 'inst' (see line 153) drivers/media/platform/qcom/venus/hfi_venus.c:998 venus_isr_thread() warn: variable dereferenced before check 'hdev' (see line 994) drivers/media/platform/qcom/venus/hfi_msgs.c: In function 'init_done_read_prop': drivers/media/platform/qcom/venus/hfi_msgs.c:465:40: warning: variable 'domain' set but not used [-Wunused-but-set-variable] u32 rem_bytes, num_props, codecs = 0, domain = 0; ^~~~~~ drivers/media/platform/qcom/venus/hfi_msgs.c:465:28: warning: variable 'codecs' set but not used [-Wunused-but-set-variable] u32 rem_bytes, num_props, codecs = 0, domain = 0; ^~~~~~ drivers/media/platform/qcom/venus/venc.c:1150 venc_close() error: dereferencing freed memory 'inst' drivers/media/platform/qcom/venus/vdec.c:1022 vdec_close() error: dereferencing freed memory 'inst' Please check. Thanks, Mauro [PATCH] venus: enable building with COMPILE_TEST We want all media drivers to build with COMPILE_TEST, as the Coverity instance we use on Kernel works only for x86. Also, our test workflow relies on it, in order to identify git bisect breakages. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> -- 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.htmldiff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 017e42ce0ff9..0898f63fa451 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -467,7 +467,7 @@ config VIDEO_TI_VPE_DEBUG 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 + depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST select QCOM_MDT_LOADER select VIDEOBUF2_DMA_SG select V4L2_MEM2MEM_DEV
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index ac026ee1ca07..fd33f3ec828d 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -448,6 +448,19 @@ config VIDEO_TI_VPE_DEBUG ---help--- Enable debug messages on VPE driver. +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 + select QCOM_MDT_LOADER + select VIDEOBUF2_DMA_SG + select V4L2_MEM2MEM_DEV + ---help--- + This is a V4L2 driver for Qualcomm Venus video accelerator + hardware. It accelerates encoding and decoding operations + on various Qualcomm SoCs. + To compile this driver as a module choose m here. + endif # V4L_MEM2MEM_DRIVERS # TI VIDEO PORT Helper Modules diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile index 63303d63c64c..c49de824af16 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -77,3 +77,5 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec/ obj-$(CONFIG_VIDEO_MEDIATEK_MDP) += mtk-mdp/ obj-$(CONFIG_VIDEO_MEDIATEK_JPEG) += mtk-jpeg/ + +obj-$(CONFIG_VIDEO_QCOM_VENUS) += qcom/venus/ diff --git a/drivers/media/platform/qcom/venus/Makefile b/drivers/media/platform/qcom/venus/Makefile new file mode 100644 index 000000000000..0fe9afb83697 --- /dev/null +++ b/drivers/media/platform/qcom/venus/Makefile @@ -0,0 +1,11 @@ +# Makefile for Qualcomm Venus driver + +venus-core-objs += core.o helpers.o firmware.o \ + hfi_venus.o hfi_msgs.o hfi_cmds.o hfi.o + +venus-dec-objs += vdec.o vdec_ctrls.o +venus-enc-objs += venc.o venc_ctrls.o + +obj-$(CONFIG_VIDEO_QCOM_VENUS) += venus-core.o +obj-$(CONFIG_VIDEO_QCOM_VENUS) += venus-dec.o +obj-$(CONFIG_VIDEO_QCOM_VENUS) += venus-enc.o
This adds Venus driver Makefile and changes v4l2 platform Makefile/Kconfig in order to enable building of the driver. Note that in this initial version the COMPILE_TEST-ing is not supported because the drivers specific to ARM builds are still in process of enabling the aforementioned compile testing. Once that disadvantage is fixed the Venus driver compile testing will be possible with follow-up changes. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- drivers/media/platform/Kconfig | 13 +++++++++++++ drivers/media/platform/Makefile | 2 ++ drivers/media/platform/qcom/venus/Makefile | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 drivers/media/platform/qcom/venus/Makefile -- 2.7.4 -- 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