[PATCH] media: mtk-vcodec: fix builds when remoteproc is disabled
Randy Dunlap
rdunlap at infradead.org
Sat Oct 3 12:50:14 EDT 2020
On 10/3/20 6:09 AM, Alexandre Courbot wrote:
> The addition of MT8183 support added a dependency on the SCP remoteproc
> module. However the initial patch used the "select" Kconfig directive,
> which may result in the SCP module to not be compiled if remoteproc was
> disabled. In such a case, mtk-vcodec would try to link against
> non-existent SCP symbols. "select" was clearly misused here as explained
> in kconfig-language.txt.
>
> Replace this by a "depends" directive on at least one of the VPU and
> SCP modules, to allow the driver to be compiled as long as one of these
> is enabled, and adapt the code to support this new scenario.
>
> Also adapt the Kconfig text to explain the extra requirements for MT8173
> and MT8183.
>
> Reported-by: Sakari Ailus <sakari.ailus at linux.intel.com>
> Signed-off-by: Alexandre Courbot <acourbot at chromium.org>
I was seeing this also, so I checked this patch. WFM.
Acked-by: Randy Dunlap <rdunlap at infradead.org> # build-tested
See below.
> ---
> drivers/media/platform/Kconfig | 11 +--
> .../media/platform/mtk-vcodec/mtk_vcodec_fw.c | 72 ++++++++++++-------
> 2 files changed, 55 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index a3cb104956d5..e559d9c529b6 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -253,14 +253,17 @@ config VIDEO_MEDIATEK_VCODEC
> depends on MTK_IOMMU || COMPILE_TEST
> depends on VIDEO_DEV && VIDEO_V4L2
> depends on ARCH_MEDIATEK || COMPILE_TEST
> + depends on VIDEO_MEDIATEK_VPU || MTK_SCP
> select VIDEOBUF2_DMA_CONTIG
> select V4L2_MEM2MEM_DEV
> - select VIDEO_MEDIATEK_VPU
> - select MTK_SCP
> help
> Mediatek video codec driver provides HW capability to
> - encode and decode in a range of video formats
> - This driver rely on VPU driver to communicate with VPU.
> + encode and decode in a range of video formats on MT8173
> + and MT8183.
> +
> + Note that support for support for MT8173 requires
Drop one of "support for" above. (or "for support" ;)
> + VIDEO_MEDIATEK_VPU to also be selected. Support for
> + MT8183 depends on MTK_SCP.
>
> To compile this driver as modules, choose M here: the
> modules will be called mtk-vcodec-dec and mtk-vcodec-enc.
thanks.
--
~Randy
More information about the Linux-mediatek
mailing list