Skip to content

drivers: video: switch from custom buffer queues to RTIO #89858

Open
@josuah

Description

@josuah

Introduction

Switch ad-hoc video buffers and submission/completion queues (fifo_in/fifo_out fields) + polling API to RTIO.

Problem description

The video enqueue()/dequeue()/set_signal() operations use a custom struct for video buffers and FIFO storage. Furthermore, the polling API is rarely implemented and not used in the capture example.

Proposed change

Replace the submission/completion mechanism of Video by RTIO, benefiting from reduced context switching, reduced maintenance, and provides a polling API implicitly without user requiring to implement it.

Detailed RFC

Proposed change (Detailed)

At a high-level, the modifications would be:

Dependencies

All features needed are already in Zephyr, and the switch to RTIO is a matter of progressively converting the drivers.

A "RTIO shim" strategy is frequenty used as a glue layer to cover drivers not converted yet.

Concerns and Unresolved Questions

If the migration happens, sould struct video_buffer and several other APIs be kept for compatibility or a more convenient/flexible API be exposed instead?

Alternatives

Make use of struct net_buf instead of RTIO.

Metadata

Metadata

Assignees

Labels

In progressFor PRs: is work in progress and should not be merged yet. For issues: Is being worked onRFCRequest For Comments: want input from the communityarea: APIChanges to public APIsarea: RTIOarea: VideoVideo subsystem

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions