]> git.baikalelectronics.ru Git - kernel.git/commit
media: rkisp1: isp: Disallow multiple active sources
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 14 Jun 2022 19:11:11 +0000 (20:11 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 17 Jul 2022 11:29:53 +0000 (12:29 +0100)
commit795eefd65046b0433a3125a3785b9a804345cf95
tree4e7659aa0d5cf9935f268ca5ffab0a2554bd0104
parentaa38366620d275e35a8e539a455b9cc407232253
media: rkisp1: isp: Disallow multiple active sources

The ISP supports multiple source subdevs, but can only capture from a
single one at a time. The source is selected through link setup. The
driver finds the active source in its .s_stream() handler using the
media_entity_remote_pad() function. This fails to reject invalid
configurations with multiple active sources. Fix it by using the
media_pad_remote_pad_unique() helper instead, and inline
rkisp1_isp_get_source() in rkisp1_isp_s_stream() as the function is
small and has a single caller.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c