media: rp1: csi2: Use get_frame_desc to get CSI-2 VC and DT
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Thu, 21 Sep 2023 12:28:20 +0000 (15:28 +0300)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:21 +0000 (11:35 +0000)
commitd09672de77fa18588f38f19abe54bc0c1df45c28
treefd6acc7546bf5ba93000583c5778885d572f980b
parent1402330619bf0615f7dd411bcd3d79ffdc65dcb2
media: rp1: csi2: Use get_frame_desc to get CSI-2 VC and DT

Use get_frame_desc pad op for asking the CSI-2 VC and DT from the source
device driver, instead of hardcoding to VC 0, and getting the DT from a
formats table. To keep backward compatibility with sources that do not
implement get_frame_desc, implement a fallback mechanism that always
uses VC 0, and gets the DT from the formats table, based on the CSI2's
sink pad's format.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
drivers/media/platform/raspberrypi/rp1_cfe/csi2.c
drivers/media/platform/raspberrypi/rp1_cfe/csi2.h