media: mtk-mdp: convert mtk_mdp_dev.comp array to list
authorEizan Miyamoto <eizan@chromium.org>
Thu, 7 May 2020 10:23:48 +0000 (12:23 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 4 Jul 2020 10:00:49 +0000 (12:00 +0200)
commit86698b9505bbc97b1cd6d8e9a2e7b8604a079469
treec08082f46583bdd46cd70127afb634e55f3a771c
parentee18fc7b0b9517ac62711da1b95095f122aead94
media: mtk-mdp: convert mtk_mdp_dev.comp array to list

The functions mtk_mdp_register/unregister_component have been created to
add / remove items from the list of components.

This will eventually enable us to specify a list of components in the
device tree instead of hardcoding them into this driver.

The list is modified by a single thread at driver probe time, and will
not be traversed by another thread until the call to pm_runtime_enable
at the end of probing.

Signed-off-by: Eizan Miyamoto <eizan@chromium.org>
Reviewed-by: Enric Balletbo I Serra <enric.balletbo@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mtk-mdp/mtk_mdp_comp.c
drivers/media/platform/mtk-mdp/mtk_mdp_comp.h
drivers/media/platform/mtk-mdp/mtk_mdp_core.c
drivers/media/platform/mtk-mdp/mtk_mdp_core.h