Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: platform: mtk-mdp3: fix Kconfig dependencies

The new mdp3 driver uses 'select' to force-enable a couple of drivers
it depends on. This is error-prone and likely to cause dependency
loops as well as warnings like:

WARNING: unmet direct dependencies detected for VIDEO_MEDIATEK_VPU
Depends on [n]: MEDIA_SUPPORT [=m] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && V4L_MEM2MEM_DRIVERS [=n] && VIDEO_DEV [=m] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=y])
Selected by [m]:
- VIDEO_MEDIATEK_MDP3 [=m] && MEDIA_SUPPORT [=m] && MEDIA_PLATFORM_SUPPORT [=y] && MEDIA_PLATFORM_DRIVERS [=y] && (MTK_IOMMU [=m] || COMPILE_TEST [=y]) && VIDEO_DEV [=m] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=y]) && HAS_DMA [=y] && REMOTEPROC [=y]

This specific warning was already addressed in a previous patch,
but there are similar unnecessary 'select' statements, so turn those
into 'depends on'. This also means the dependency on ARCH_MEDIATEK
is redundant and can be dropped.

Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Fixes: 9195a860ef0a ("media: platform: mtk-mdp3: remove unused VIDEO_MEDIATEK_VPU config")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
e3f7feb6 05fb9ace

+3 -4
+3 -4
drivers/media/platform/mediatek/mdp3/Kconfig
··· 3 3 tristate "MediaTek MDP v3 driver" 4 4 depends on MTK_IOMMU || COMPILE_TEST 5 5 depends on VIDEO_DEV 6 - depends on ARCH_MEDIATEK || COMPILE_TEST 7 6 depends on HAS_DMA 8 7 depends on REMOTEPROC 8 + depends on MTK_MMSYS 9 + depends on MTK_CMDQ 10 + depends on MTK_SCP 9 11 select VIDEOBUF2_DMA_CONTIG 10 12 select V4L2_MEM2MEM_DEV 11 - select MTK_MMSYS 12 - select MTK_CMDQ 13 - select MTK_SCP 14 13 default n 15 14 help 16 15 It is a v4l2 driver and present in MediaTek MT8183 SoC.