Skip to content

Conversation

@josuah
Copy link
Contributor

@josuah josuah commented Sep 14, 2025

Small adjustments to make the ESP32 DVP driver work out of the box.

I will test it with the OV2640 present on the ESP32-S3 EYE board as soon as I get a chance (past Monday), and then un-draft the PR.

@josuah
Copy link
Contributor Author

josuah commented Sep 16, 2025

Currently, this still does not work because there was a correction for RGB vs BGR swap in displays in #79996

[00:00:01.590,000] <inf> main: - Capabilities:
[00:00:01.590,000] <inf> main:   x_resolution = 240, y_resolution = 240, supported_pixel_formats = 32  current_pixel_format = 32, current_orientation = 0
[00:00:01.590,000] <err> display_st7789v: Pixel format change not implemented
[00:00:01.590,000] <err> main: Unable to set display format
[00:00:01.590,000] <err> main: Unable to set up display

I applied this fix 099130a

And I get this image as a result:

screenshot_2025_0916_1400_23

This is a HFLIP and upside-down version of the classic MacBeth color chart: seems ok.

screenshot_2025_0916_1358_49

However, I only see the first frame, the display is not updated.
The firmware is still responsive (i.e. the shell responds).
There might be a regression.

@sylvioalves
Copy link
Contributor

@josuah, make CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=2 and you will get it working properly. Fix is good, thanks.

@josuah josuah force-pushed the pr_video_esp32_fix branch 3 times, most recently from 113e27e to 8ba7e39 Compare September 16, 2025 14:10
@josuah
Copy link
Contributor Author

josuah commented Sep 16, 2025

I confirm, this works smoothly now.
Thanks for the help!

Force-push:

  • Set number of buffers to 2 instead of 1
  • Fixed typo in commit message.
  • Added/removed other commits by mistake, all clear now.

sylvioalves
sylvioalves previously approved these changes Sep 16, 2025
ngphibang
ngphibang previously approved these changes Sep 16, 2025
Copy link
Contributor

@ngphibang ngphibang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except that the 1st commit is a bit unrelated and can be in a separate PR (I see it in another PR already) so that the scope of the PR is all about esp32

Increase the ESP32 S3 Eye board buffer size to fit the selected frame size
configured. This fixes a buffer allocation error preventing the sample
to run. Only use a single buffer which is enough to run it.

Signed-off-by: Josuah Demangeon <[email protected]>
In the ESP32 video driver, set the caps.min_vbuf_count field to
indicate that a two buffers are enough. Fix use of un-initialized
memory breaking the samples in some situations.

Signed-off-by: Josuah Demangeon <[email protected]>
Propagate zephyrproject-rtos#79996 where RGB_565 and BGR_565 interchange got fixed.
It is not necessary to enable the BGR_565 format for the ST7789V display
as RGB_565, the default, is correct.

Signed-off-by: Josuah Demangeon <[email protected]>
@josuah josuah dismissed stale reviews from ngphibang and sylvioalves via 71e5694 September 16, 2025 15:33
@josuah
Copy link
Contributor Author

josuah commented Sep 16, 2025

Good point, this is now only having the ESP32-specific commit...

Another review cycle then.

@sonarqubecloud
Copy link

@fabiobaltieri fabiobaltieri merged commit a3b73ac into zephyrproject-rtos:main Sep 18, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Samples Samples area: Video Video subsystem platform: ESP32 Espressif ESP32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants