-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: video: emul: simplify, avoid mission creep #83220
drivers: video: emul: simplify, avoid mission creep #83220
Conversation
@@ -157,7 +157,7 @@ ZTEST(video_common, test_video_vbuf) | |||
zexpect_ok(video_set_format(rx_dev, VIDEO_EP_OUT, &fmt)); | |||
|
|||
/* Allocate a buffer, assuming prj.conf gives enough memory for it */ | |||
vbuf = video_buffer_alloc(fmt.pitch * fmt.height, K_FOREVER); | |||
vbuf = video_buffer_alloc(fmt.pitch * fmt.height, K_NO_WAIT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not explained in the commit message. Also I suppose the below assertion is then not valid anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point thank you, I will revisit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now its own commit proposing not to wait CI timeout when running out of video memory.
da560ab
to
31d459b
Compare
1890b61
to
f26add3
Compare
Only store a single line of the full frame. This allows to support a large enough frame size to remove the Kconfig option, which simplifies the implementation (fewer checks needed). Signed-off-by: Josuah Demangeon <me@josuah.net>
Depending on the log mode selected, the device name will be visible for every log message, so not useful to add it again in the log payload. Various other log improvements also added. Signed-off-by: Josuah Demangeon <me@josuah.net>
Deduplicate the registers of "modes": only a single definition of each: pixelformats, resolutions, framerate. Signed-off-by: Josuah Demangeon <me@josuah.net>
Remove the test pattern generator implemented inline in video_emul_imager, as this feature is overlapping with VIDEO_SW_GENERATOR, and does not add value to the driver. Signed-off-by: Josuah Demangeon <me@josuah.net>
Fail immediately during tests rather than letting K_FOREVER trigger a CI timeout. Signed-off-by: Josuah Demangeon <me@josuah.net>
f26add3
to
cf9ae77
Compare
Use a video control ID in the private range rather than using an existing CID, as the emulated imager does not effectively applies these properties to the image feed and are just for API test purpose. Signed-off-by: Josuah Demangeon <me@josuah.net>
The general goal is making
video_emul_*
just enough complexity to test the APIs on CI.VIDEO_SW_GENERATOR
does it and no use in maintaining it twice.[EDIT: updated the PR goals mid-way]