weston/libweston
Pekka Paalanen d69e816b54 compositor: fix finish_frame presentation feedback crash
This was brought up in issue 1063. The assertion in
weston_presentation_feedback_present_list() will trigger randomly during
repeated suspend/resume testing, presumably while a client is animating
and asking for presentation feedback.

drm_output_start_repaint_loop() has a path where drmWaitVBlank() is able
to pull a good timestamp for the last vblank. This results in a call to
weston_output_finish_frame() with a good timestamp and
WP_PRESENTATION_FEEDBACK_INVALID in the flags.

Previously it was assumed that in such case the presentation feedback
list cannot have any entries. This assumption is false. It is possible
that while the output is in idle state, a client will post an update to
a surface and ask for presentation feedback on it. This should trigger
drm_output_start_repaint_loop() with a non-empty feedback list.

It is unclear why this problem was not seen in the wild much more often.

Start-repaint-loop does not present anything by definition, it only acts
to synchronize the output repaint loop with the (hardware) scanout
cycle. Therefore no feedback must be sent there. As
WP_PRESENTATION_FEEDBACK_INVALID flag indicates no feedback must be
sent, use it to avoid calling
weston_presentation_feedback_present_list().

References: https://gitlab.freedesktop.org/wayland/weston/-/issues/1063
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-11-13 11:38:34 +02:00
..
backend-drm backend-drm: Deprecate DRM VA-API recorder 2025-10-28 07:55:43 +00:00
backend-headless vulkan-renderer: rename output options to surface/surfaceless 2025-09-12 18:04:57 +01:00
backend-pipewire output-capture: Support writeback connector formats 2025-09-25 12:39:23 +02:00
backend-rdp backend-rdp: Add keyboard mapping for alternate Dvorak layouts 2025-10-21 23:21:55 +01:00
backend-vnc vulkan-renderer: rename output options to surface/surfaceless 2025-09-12 18:04:57 +01:00
backend-wayland vulkan-renderer: rename output options to surface/surfaceless 2025-09-12 18:04:57 +01:00
backend-x11 vulkan-renderer: rename output options to surface/surfaceless 2025-09-12 18:04:57 +01:00
color-lcms color-lcms: optimize build_3d_lut() 2025-10-21 14:23:37 +03:00
desktop libweston/desktop/xwayland: Add MINIMZE state change 2025-10-02 08:43:46 +03:00
perfetto libweston: Add support for perfetto profiling 2025-01-24 12:22:13 +00:00
renderer-gl gl-renderer: Fix up solid buffer attachments 2025-10-21 13:56:30 -05:00
renderer-vulkan vulkan-renderer: fix VkMemoryDedicatedRequirements usage 2025-11-07 14:30:29 +01:00
shell-utils libweston: Add shell_private data 2025-03-04 12:30:51 +00:00
animation.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
auth.c libweston: Add user authentication support via PAM 2022-11-23 16:58:48 +01:00
backend.h core: Remove flush_damage_for_plane return 2025-10-17 13:49:21 -05:00
bindings.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
clipboard.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
color-management.c shared: rename a few weston assert 2025-09-15 19:13:04 -03:00
color-management.h color: update color-management protocol to wp-v1 2025-02-26 10:09:43 -03:00
color-noop.c libweston: make use of some of the new weston assert 2025-09-15 19:16:17 -03:00
color-operations.c color: run vec3 through weston_color_curve_sample() 2025-10-21 14:23:37 +03:00
color-operations.h color: run vec3 through weston_color_curve_sample() 2025-10-21 14:23:37 +03:00
color-profile-param-builder.c color: add weston_color_profile_param_builder_set_target_primaries_named() 2025-10-09 16:17:57 +00:00
color-properties.c color: shorten the named of primaries 2025-06-17 10:40:03 +03:00
color-properties.h color: fix count_parameters type 2025-06-17 10:40:03 +03:00
color.c color-lcms: constify build_3d_lut() 2025-10-21 14:23:37 +03:00
color.h color-lcms: constify build_3d_lut() 2025-10-21 14:23:37 +03:00
compositor.c compositor: fix finish_frame presentation feedback crash 2025-11-13 11:38:34 +02:00
content-protection.c cp: Correctly format debug scope for content protection 2025-06-04 17:38:16 +03:00
data-device.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
drm-formats.c drm-formats: add weston_drm_format_array_count_pairs() 2021-11-25 10:47:45 -03:00
git-version.h.meson Add Meson build system 2018-12-09 14:50:54 +02:00
id-number-allocator.c shared: rename a few weston assert 2025-09-15 19:13:04 -03:00
id-number-allocator.h libweston: add unique id generator 2024-02-13 14:08:38 -03:00
input.c compositor: Move region_init_infinite to a header 2025-09-05 10:01:42 -05:00
launcher-impl.h launcher: Remove launcher-logind 2023-09-29 09:55:32 -05:00
launcher-libseat.c launcher-libseat: Don't hard-stop on libseat-debug 2025-06-04 17:38:16 +03:00
launcher-util.c launcher: Remove launcher-logind 2023-09-29 09:55:32 -05:00
launcher-util.h launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
libinput-device.c libweston: Rename LED_* to WESTON_LED* 2025-03-07 14:30:20 +00:00
libinput-device.h libinput: hook up tablet events 2023-03-31 12:10:26 +00:00
libinput-seat.c libinput: support ignoring all libinput-based input devices by configuration 2025-10-21 12:54:42 +03:00
libinput-seat.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libweston-internal.h backend-drm: Allow plane-less DRM background for opaque black solid buffers 2025-10-23 12:40:37 +02:00
linux-dmabuf.c libweston: rename get_supported_formats to get_supported_dmabuf_formats 2025-09-02 13:34:00 +00:00
linux-dmabuf.h linux-dmabuf: Add support for protocol version 5 2024-01-19 18:59:22 +01:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
linux-sync-file-uapi.h libweston: Introduce an internal linux sync file API 2019-02-06 12:21:56 +00:00
linux-sync-file.c libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
linux-sync-file.h libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
log.c libweston: Add weston_log_paced() 2022-11-08 08:32:26 -06:00
meson.build compositor: Move a bunch of surface state handling stuff to another file 2025-09-05 10:01:42 -05:00
noop-renderer.c libweston: Use explicit renderbuffer destruction 2025-01-21 14:21:40 +01:00
output-capture.c output-capture: Fix assertions in pull_capture_task() 2025-09-25 17:51:22 +02:00
output-capture.h output-capture: Support writeback connector formats 2025-09-25 12:39:23 +02:00
pixel-formats.c pixel-formats: Update Vulkan formats 2025-09-08 12:02:11 +01:00
pixel-formats.h pixel-formats: Move FOURCC defines to weston-drm-fourcc.h 2025-06-23 15:03:06 +02:00
pixman-renderer.c output-capture: Support writeback connector formats 2025-09-25 12:39:23 +02:00
pixman-renderer.h pixman-renderer: Remove renderbuffer_get_image() function 2025-01-21 14:34:31 +01:00
plugin-registry.c Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
renderer-borders.c libweston: move gl-borders up to weston_renderer 2025-05-18 18:00:08 +02:00
renderer-borders.h libweston: move gl-borders up to weston_renderer 2025-05-18 18:00:08 +02:00
screenshooter.c screenshooter: Emit warning for output recording 2025-10-28 07:55:43 +00:00
spring-tool.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
surface-state.c compositor: Add a WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY 2025-10-23 16:22:00 +01:00
timeline-perfetto.c timeline-perfetto: Store disambiguator globally 2025-03-06 15:14:12 +02:00
timeline.c timeline: Check for timelog scope being enabled 2025-06-04 17:38:16 +03:00
timeline.h timeline: Add the TL_POINTs into perfetto data 2025-01-24 12:22:13 +00:00
touch-calibration.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
vertex-clipping.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
vertex-clipping.h gl-renderer: Do not expose clipper_clip() in header 2024-05-30 09:09:45 +00:00
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-log-file.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
weston-log-flight-rec.c Revert "shared/helpers.h: Migrate helpers.h to libweston" 2025-01-17 10:18:26 +02:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c weston-log: Add a advertised list of debug scopes 2025-06-04 17:43:33 +03:00
weston-log.c weston-log: Fix warning on 32-bit architectures 2025-10-09 13:29:01 +01:00
weston-trace.h libweston: Add support for perfetto profiling 2025-01-24 12:22:13 +00:00