drivers: video: update video drivers to handle min/max line count

Update existing video drivers to handle the min/max line count field
within the video_caps structure. All drivers work with full frames
currently, so use the special LINE_COUNT_HEIGHT value to indicate this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-10-04 11:57:37 -05:00 committed by Anas Nashif
parent f46e5342c4
commit ec6ffc8b33
4 changed files with 11 additions and 0 deletions

View file

@ -234,6 +234,9 @@ static int video_esp32_get_caps(const struct device *dev, enum video_endpoint_id
return -EINVAL;
}
/* ESP32 produces full frames */
caps->min_line_count = caps->max_line_count = LINE_COUNT_HEIGHT;
/* Forward the message to the source device */
return video_get_caps(config->source_dev, ep, caps);
}

View file

@ -393,6 +393,8 @@ static int video_mcux_csi_get_caps(const struct device *dev, enum video_endpoint
/* NXP MCUX CSI request at least 2 buffer before starting */
caps->min_vbuf_count = 2;
/* CSI only operates on buffers of full frame size */
caps->min_line_count = caps->max_line_count = LINE_COUNT_HEIGHT;
/* no source dev */
return err;

View file

@ -356,6 +356,9 @@ static int video_stm32_dcmi_get_caps(const struct device *dev,
return -EINVAL;
}
/* DCMI produces full frames */
caps->min_line_count = caps->max_line_count = LINE_COUNT_HEIGHT;
/* Forward the message to the sensor device */
ret = video_get_caps(config->sensor_dev, ep, caps);

View file

@ -237,6 +237,9 @@ static int video_sw_generator_get_caps(const struct device *dev, enum video_endp
caps->format_caps = fmts;
caps->min_vbuf_count = 0;
/* SW generator produces full frames */
caps->min_line_count = caps->max_line_count = LINE_COUNT_HEIGHT;
return 0;
}