162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ciconfig VIDEO_MEDIATEK_VCODEC_SCP
362306a36Sopenharmony_ci	bool
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciconfig VIDEO_MEDIATEK_VCODEC_VPU
662306a36Sopenharmony_ci	bool
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciconfig VIDEO_MEDIATEK_VCODEC
962306a36Sopenharmony_ci	tristate "Mediatek Video Codec driver"
1062306a36Sopenharmony_ci	depends on V4L_MEM2MEM_DRIVERS
1162306a36Sopenharmony_ci	depends on MTK_IOMMU || COMPILE_TEST
1262306a36Sopenharmony_ci	depends on VIDEO_DEV
1362306a36Sopenharmony_ci	depends on ARCH_MEDIATEK || COMPILE_TEST
1462306a36Sopenharmony_ci	depends on VIDEO_MEDIATEK_VPU || MTK_SCP
1562306a36Sopenharmony_ci	# The two following lines ensure we have the same state ("m" or "y") as
1662306a36Sopenharmony_ci	# our dependencies, to avoid missing symbols during link.
1762306a36Sopenharmony_ci	depends on VIDEO_MEDIATEK_VPU || !VIDEO_MEDIATEK_VPU
1862306a36Sopenharmony_ci	depends on MTK_SCP || !MTK_SCP
1962306a36Sopenharmony_ci	depends on MTK_SMI || (COMPILE_TEST && MTK_SMI=n)
2062306a36Sopenharmony_ci	select VIDEOBUF2_DMA_CONTIG
2162306a36Sopenharmony_ci	select V4L2_MEM2MEM_DEV
2262306a36Sopenharmony_ci	select VIDEO_MEDIATEK_VCODEC_VPU if VIDEO_MEDIATEK_VPU
2362306a36Sopenharmony_ci	select VIDEO_MEDIATEK_VCODEC_SCP if MTK_SCP
2462306a36Sopenharmony_ci	select V4L2_H264
2562306a36Sopenharmony_ci	select V4L2_VP9
2662306a36Sopenharmony_ci	select MEDIA_CONTROLLER
2762306a36Sopenharmony_ci	select MEDIA_CONTROLLER_REQUEST_API
2862306a36Sopenharmony_ci	help
2962306a36Sopenharmony_ci	  Mediatek video codec driver provides HW capability to
3062306a36Sopenharmony_ci	  encode and decode in a range of video formats on MT8173
3162306a36Sopenharmony_ci	  and MT8183.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci	  Note that support for MT8173 requires VIDEO_MEDIATEK_VPU to
3462306a36Sopenharmony_ci	  also be selected. Support for MT8183 depends on MTK_SCP.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci	  To compile this driver as modules, choose M here: the
3762306a36Sopenharmony_ci	  modules will be called mtk-vcodec-dec and mtk-vcodec-enc.
38