Skip to content

Commit ccaaaab

Browse files
josuahfabiobaltieri
authored andcommitted
drivers: video: stm32_dcmi: add missing capability property
In the DCMI video driver, set the caps.min_vbuf_count field to indicate that two buffers are needed. Fix use of un-initialized memory breaking the samples in some situations. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent 852a577 commit ccaaaab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/video/video_stm32_dcmi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ static int video_stm32_dcmi_get_caps(const struct device *dev, struct video_caps
306306
{
307307
const struct video_stm32_dcmi_config *config = dev->config;
308308

309+
/* 2 buffers are needed for DCMI_MODE_CONTINUOUS */
310+
caps->min_vbuf_count = 2;
311+
309312
/* DCMI produces full frames */
310313
caps->min_line_count = caps->max_line_count = LINE_COUNT_HEIGHT;
311314

0 commit comments

Comments
 (0)