Skip to content

Conversation

@Finomnis
Copy link
Contributor

@Finomnis Finomnis commented Nov 11, 2024

Rework of #79936.
Fixes #79798.

Adds the new flag frame_incomplete to struct display_buffer_descriptor that indicates that more writes will follow in the current frame.

This allows GUIs to communicate where, at multi-write frames, the frame ends.
This in turn allows display to understand the frame border, which can be useful for page flipping or "tearing enable" signal handling.

For more discussion, see #79936.

The effect of this change is that displays can now present multi-writes at once, to prevent the 'rolling shutter' effect of multiple separate partial writes, like so:

Before:
without_view

After:
with_view

@zephyrbot zephyrbot added area: Video Video subsystem area: Samples Samples Release Notes To be mentioned in the release notes area: LVGL Light and Versatile Graphics Library Support area: Display labels Nov 11, 2024
@Finomnis Finomnis force-pushed the display_frame_incomplete branch from f79e666 to 02c43f0 Compare November 11, 2024 23:41
@Finomnis Finomnis force-pushed the display_frame_incomplete branch from 02c43f0 to 578dd22 Compare November 11, 2024 23:46
@dkalowsk dkalowsk added this to the v4.1.0 milestone Nov 12, 2024
@mstumpf-vected mstumpf-vected force-pushed the display_frame_incomplete branch from 578dd22 to a21870e Compare November 13, 2024 13:09
Introduces support for double-buffered/latched displays.
Currently, every write has to be presented to the user immediately,
which negates the advantage of latched displays to prevent frame tearing.

Now, GUI managers can indicate whether the current `display_write` call
is the last call of the frame or not, allowing displays to group writes
to a single present.

Signed-off-by: Martin Stumpf <[email protected]>
In frames with multiple writes (officially supported through
`CONFIG_LV_Z_VDB_SIZE`) the display needs to be signalled that the
current frame is over and the content should be displayed.
This allows displays to present the UI without tearing artifacts.

Signed-off-by: Martin Stumpf <[email protected]>
The newly introduced `frame_incomplete` flag of
`display_buffer_descriptor` needed to be added at several places to
avoid uninitialized memory.

Signed-off-by: Martin Stumpf <[email protected]>
Adds frame synchronization to every frame.
This prevents frame tearing.

Signed-off-by: Martin Stumpf <[email protected]>
@Finomnis Finomnis force-pushed the display_frame_incomplete branch from a21870e to df130b8 Compare November 13, 2024 20:16
@nashif nashif merged commit abc296f into zephyrproject-rtos:main Nov 16, 2024
24 checks passed
@Finomnis Finomnis deleted the display_frame_incomplete branch November 16, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Display area: LVGL Light and Versatile Graphics Library Support area: Samples Samples area: Video Video subsystem Release Notes To be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

display: Support page flipping

7 participants