diff --git a/drivers/video/video_stm32_dcmipp.c b/drivers/video/video_stm32_dcmipp.c index ff0ec996aa089..762d6cb4994c9 100644 --- a/drivers/video/video_stm32_dcmipp.c +++ b/drivers/video/video_stm32_dcmipp.c @@ -1340,18 +1340,6 @@ static int stm32_dcmipp_dequeue(const struct device *dev, struct video_buffer ** #define DCMIPP_CEIL_DIV(val, div) \ (((val) + (div) - 1) / (div)) -#define DCMIPP_VIDEO_FORMAT_CAP(format, pixmul) { \ - .pixelformat = VIDEO_PIX_FMT_##format, \ - .width_min = DCMIPP_CEIL_DIV_ROUND_UP_MUL(CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH, \ - STM32_DCMIPP_MAX_PIPE_SCALE_FACTOR, \ - pixmul), \ - .width_max = CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH / (pixmul) * (pixmul), \ - .height_min = DCMIPP_CEIL_DIV(CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT, \ - STM32_DCMIPP_MAX_PIPE_SCALE_FACTOR), \ - .height_max = CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT, \ - .width_step = pixmul, .height_step = 1, \ -} - static const struct video_format_cap stm32_dcmipp_dump_fmt[] = { { .pixelformat = VIDEO_FOURCC_FROM_STR(CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT), @@ -1364,6 +1352,19 @@ static const struct video_format_cap stm32_dcmipp_dump_fmt[] = { {0}, }; +#if defined(STM32_DCMIPP_HAS_PIXEL_PIPES) +#define DCMIPP_VIDEO_FORMAT_CAP(format, pixmul) { \ + .pixelformat = VIDEO_PIX_FMT_##format, \ + .width_min = DCMIPP_CEIL_DIV_ROUND_UP_MUL(CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH, \ + STM32_DCMIPP_MAX_PIPE_SCALE_FACTOR, \ + pixmul), \ + .width_max = CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH / (pixmul) * (pixmul), \ + .height_min = DCMIPP_CEIL_DIV(CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT, \ + STM32_DCMIPP_MAX_PIPE_SCALE_FACTOR), \ + .height_max = CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT, \ + .width_step = pixmul, .height_step = 1, \ +} + static const struct video_format_cap stm32_dcmipp_main_fmts[] = { DCMIPP_VIDEO_FORMAT_CAP(RGB565, 8), DCMIPP_VIDEO_FORMAT_CAP(YUYV, 8), @@ -1397,6 +1398,7 @@ static const struct video_format_cap stm32_dcmipp_aux_fmts[] = { DCMIPP_VIDEO_FORMAT_CAP(BGRA32, 4), {0}, }; +#endif static int stm32_dcmipp_get_caps(const struct device *dev, struct video_caps *caps) { @@ -1406,12 +1408,14 @@ static int stm32_dcmipp_get_caps(const struct device *dev, struct video_caps *ca case DCMIPP_PIPE0: caps->format_caps = stm32_dcmipp_dump_fmt; break; +#if defined(STM32_DCMIPP_HAS_PIXEL_PIPES) case DCMIPP_PIPE1: caps->format_caps = stm32_dcmipp_main_fmts; break; case DCMIPP_PIPE2: caps->format_caps = stm32_dcmipp_aux_fmts; break; +#endif default: CODE_UNREACHABLE; } diff --git a/tests/drivers/build_all/video/testcase.yaml b/tests/drivers/build_all/video/testcase.yaml index cb3e09527d351..d4ff481d36088 100644 --- a/tests/drivers/build_all/video/testcase.yaml +++ b/tests/drivers/build_all/video/testcase.yaml @@ -34,8 +34,10 @@ tests: drivers.video.stm32_dcmipp.build: platform_allow: - stm32n6570_dk/stm32n657xx/sb + - stm32mp135f_dk/stm32mp135fxx extra_args: - platform:stm32n6570_dk/stm32n657xx/sb:SHIELD=st_b_cams_imx_mb1854 + - platform:stm32mp135f_dk/stm32mp135fxx:SHIELD=st_mb1897_cam drivers.video.renesas_ra_ceu.build: platform_allow: - ek_ra8d1/r7fa8d1bhecbd