[PATCH 07/11] media: stm32: dcmipp: isp: expose active sink format & compose

From: Alain Volmat

Date: Fri Dec 04 2026 - 06:12:27 EST


Expose the ISP subdev active sink format and compose size via the dcmipp
main structure in order to be used by ISP statistics video device.

Signed-off-by: Alain Volmat <alain.volmat@xxxxxxxxxxx>
---
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h | 3 +++
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c | 4 ++++
2 files changed, 7 insertions(+)

diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
index b40ed25dcf73..21ee903ae3a8 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
+++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.h
@@ -267,6 +267,9 @@ struct dcmipp_isp_device {

void __iomem *regs;

+ u32 sink_code;
+ struct v4l2_rect sink_compose;
+
u32 frame_sequence;

u32 vsync_mask;
diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c
index dfa3e27a02ee..4678b6fefafc 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-isp.c
@@ -380,6 +380,10 @@ static int dcmipp_isp_enable_streams(struct v4l2_subdev *sd,
/* Configure Demosaicing */
dcmipp_isp_config_demosaicing(isp, state);

+ /* Make the active frame information available to other entities */
+ isp->sink_code = v4l2_subdev_state_get_format(state, DCMIPP_ISP_PAD_SINK_VIDEO)->code;
+ isp->sink_compose = *v4l2_subdev_state_get_compose(state, DCMIPP_ISP_PAD_SINK_VIDEO);
+
/* First VSYNC will increment the counter, making first frame 0 */
isp->frame_sequence = U32_MAX;


--
2.34.1