Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wlroots for openSUSE:Factory checked in at 2021-07-10 00:00:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wlroots (Old) and /work/SRC/openSUSE:Factory/.wlroots.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wlroots" Sat Jul 10 00:00:29 2021 rev:16 rq:905285 version:0.14.1 Changes: -------- --- /work/SRC/openSUSE:Factory/wlroots/wlroots.changes 2021-06-25 15:02:09.564211698 +0200 +++ /work/SRC/openSUSE:Factory/.wlroots.new.2625/wlroots.changes 2021-07-10 00:03:18.974668943 +0200 @@ -1,0 +2,14 @@ +Fri Jul 9 12:23:30 UTC 2021 - Michael Vetter <mvet...@suse.com> + +- Update to 0.14.1: + * surface: accept commits with buffer size not divisible by scale + * buffer: make enum wlr_buffer_cap public + * surface: allow locking pending state in commit handler + * Revert "backend/drm: populate cursor plane's current_fb" + * backend/drm: don't clear pending cursor FB on failed commit + * output: detach buffer from renderer before commit + * output-damage: fix output swapchain handling + * tablet-v2: fix pad and tool object versions + * backend/drm: force linear layout for multi-GPU buffers + +------------------------------------------------------------------- Old: ---- wlroots-0.14.0.tar.gz New: ---- wlroots-0.14.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wlroots.spec ++++++ --- /var/tmp/diff_new_pack.cEmYSN/_old 2021-07-10 00:03:19.394665677 +0200 +++ /var/tmp/diff_new_pack.cEmYSN/_new 2021-07-10 00:03:19.398665646 +0200 @@ -23,7 +23,7 @@ %bcond_without xcb_errors %bcond_without seatd Name: wlroots -Version: 0.14.0 +Version: 0.14.1 Release: 0 Summary: Modular Wayland compositor library License: MIT ++++++ wlroots-0.14.0.tar.gz -> wlroots-0.14.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/drm/backend.c new/wlroots-0.14.1/backend/drm/backend.c --- old/wlroots-0.14.0/backend/drm/backend.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/drm/backend.c 2021-07-08 17:18:01.000000000 +0200 @@ -13,7 +13,6 @@ #include <wlr/util/log.h> #include <xf86drm.h> #include "backend/drm/drm.h" -#include "types/wlr_buffer.h" #include "util/signal.h" struct wlr_drm_backend *get_drm_backend_from_backend( @@ -250,21 +249,15 @@ goto error_event; } + // Force a linear layout. In case explicit modifiers aren't supported, + // the meaning of implicit modifiers changes from one GPU to the other. + // In case explicit modifiers are supported, we still have no guarantee + // that the buffer producer will support these, so they might fallback + // to implicit modifiers. for (size_t i = 0; i < texture_formats->len; i++) { const struct wlr_drm_format *fmt = texture_formats->formats[i]; - if (fmt->len == 0) { - // Modifiers aren't supported. The implicit modifier changes - // from a GPU to the other, so we can only accept linear - // buffers - wlr_drm_format_set_add(&drm->mgpu_formats, fmt->format, - DRM_FORMAT_MOD_LINEAR); - continue; - } - - for (size_t j = 0; j < fmt->len; j++) { - wlr_drm_format_set_add(&drm->mgpu_formats, fmt->format, - fmt->modifiers[j]); - } + wlr_drm_format_set_add(&drm->mgpu_formats, fmt->format, + DRM_FORMAT_MOD_LINEAR); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/drm/drm.c new/wlroots-0.14.1/backend/drm/drm.c --- old/wlroots-0.14.0/backend/drm/drm.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/drm/drm.c 2021-07-08 17:18:01.000000000 +0200 @@ -28,7 +28,6 @@ #include "render/drm_format_set.h" #include "render/swapchain.h" #include "render/wlr_renderer.h" -#include "types/wlr_buffer.h" #include "util/signal.h" static const uint32_t SUPPORTED_OUTPUT_STATE = @@ -356,9 +355,12 @@ } } else { drm_fb_clear(&crtc->primary->pending_fb); - if (crtc->cursor != NULL) { - drm_fb_clear(&crtc->cursor->pending_fb); - } + // The set_cursor() hook is a bit special: it's not really synchronized + // to commit() or test(). Once set_cursor() returns true, the new + // cursor is effectively committed. So don't roll it back here, or we + // risk ending up in a state where we don't have a cursor FB but + // wlr_drm_connector.cursor_enabled is true. + // TODO: fix our output interface to avoid this issue. } return ok; } @@ -934,7 +936,7 @@ local_buf = wlr_buffer_lock(buffer); } - bool ok = drm_fb_import(&plane->current_fb, drm, local_buf, + bool ok = drm_fb_import(&plane->pending_fb, drm, local_buf, &plane->formats); wlr_buffer_unlock(local_buf); if (!ok) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/headless/backend.c new/wlroots-0.14.1/backend/headless/backend.c --- old/wlroots-0.14.0/backend/headless/backend.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/headless/backend.c 2021-07-08 17:18:01.000000000 +0200 @@ -14,7 +14,6 @@ #include "render/drm_format_set.h" #include "render/gbm_allocator.h" #include "render/wlr_renderer.h" -#include "types/wlr_buffer.h" #include "util/signal.h" struct wlr_headless_backend *headless_backend_from_backend( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/wayland/backend.c new/wlroots-0.14.1/backend/wayland/backend.c --- old/wlroots-0.14.0/backend/wayland/backend.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/wayland/backend.c 2021-07-08 17:18:01.000000000 +0200 @@ -21,7 +21,6 @@ #include "render/drm_format_set.h" #include "render/pixel_format.h" #include "render/wlr_renderer.h" -#include "types/wlr_buffer.h" #include "util/signal.h" #include "drm-client-protocol.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/wayland/output.c new/wlroots-0.14.1/backend/wayland/output.c --- old/wlroots-0.14.0/backend/wayland/output.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/wayland/output.c 2021-07-08 17:18:01.000000000 +0200 @@ -19,7 +19,6 @@ #include "render/pixel_format.h" #include "render/swapchain.h" #include "render/wlr_renderer.h" -#include "types/wlr_buffer.h" #include "util/signal.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/x11/backend.c new/wlroots-0.14.1/backend/x11/backend.c --- old/wlroots-0.14.0/backend/x11/backend.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/x11/backend.c 2021-07-08 17:18:01.000000000 +0200 @@ -33,7 +33,6 @@ #include "backend/x11.h" #include "render/allocator.h" #include "render/drm_format_set.h" -#include "types/wlr_buffer.h" #include "util/signal.h" // See dri2_format_for_depth in mesa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/backend/x11/output.c new/wlroots-0.14.1/backend/x11/output.c --- old/wlroots-0.14.0/backend/x11/output.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/backend/x11/output.c 2021-07-08 17:18:01.000000000 +0200 @@ -21,7 +21,6 @@ #include <wlr/util/log.h> #include "backend/x11.h" -#include "types/wlr_buffer.h" #include "util/signal.h" #include "util/time.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/include/types/wlr_buffer.h new/wlroots-0.14.1/include/types/wlr_buffer.h --- old/wlroots-0.14.0/include/types/wlr_buffer.h 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/include/types/wlr_buffer.h 2021-07-08 17:18:01.000000000 +0200 @@ -26,18 +26,6 @@ struct wl_resource *resource); /** - * Buffer capabilities. - * - * These bits indicate the features supported by a wlr_buffer. There is one bit - * per function in wlr_buffer_impl. - */ -enum wlr_buffer_cap { - WLR_BUFFER_CAP_DATA_PTR = 1 << 0, - WLR_BUFFER_CAP_DMABUF = 1 << 1, - WLR_BUFFER_CAP_SHM = 1 << 2, -}; - -/** * Get a pointer to a region of memory referring to the buffer's underlying * storage. The format and stride can be used to interpret the memory region * contents. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/include/wlr/types/wlr_buffer.h new/wlroots-0.14.1/include/wlr/types/wlr_buffer.h --- old/wlroots-0.14.0/include/wlr/types/wlr_buffer.h 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/include/wlr/types/wlr_buffer.h 2021-07-08 17:18:01.000000000 +0200 @@ -34,6 +34,18 @@ }; /** + * Buffer capabilities. + * + * These bits indicate the features supported by a wlr_buffer. There is one bit + * per function in wlr_buffer_impl. + */ +enum wlr_buffer_cap { + WLR_BUFFER_CAP_DATA_PTR = 1 << 0, + WLR_BUFFER_CAP_DMABUF = 1 << 1, + WLR_BUFFER_CAP_SHM = 1 << 2, +}; + +/** * A buffer containing pixel data. * * A buffer has a single producer (the party who created the buffer) and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/meson.build new/wlroots-0.14.1/meson.build --- old/wlroots-0.14.0/meson.build 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/meson.build 2021-07-08 17:18:01.000000000 +0200 @@ -1,7 +1,7 @@ project( 'wlroots', 'c', - version: '0.14.0', + version: '0.14.1', license: 'MIT', meson_version: '>=0.56.0', default_options: [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/render/allocator.c new/wlroots-0.14.1/render/allocator.c --- old/wlroots-0.14.0/render/allocator.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/render/allocator.c 2021-07-08 17:18:01.000000000 +0200 @@ -8,7 +8,6 @@ #include "render/shm_allocator.h" #include "render/drm_dumb_allocator.h" #include "render/wlr_renderer.h" -#include "types/wlr_buffer.h" void wlr_allocator_init(struct wlr_allocator *alloc, const struct wlr_allocator_interface *impl, uint32_t buffer_caps) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/render/drm_dumb_allocator.c new/wlroots-0.14.1/render/drm_dumb_allocator.c --- old/wlroots-0.14.0/render/drm_dumb_allocator.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/render/drm_dumb_allocator.c 2021-07-08 17:18:01.000000000 +0200 @@ -15,7 +15,6 @@ #include "render/drm_dumb_allocator.h" #include "render/pixel_format.h" -#include "types/wlr_buffer.h" static const struct wlr_buffer_impl buffer_impl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/render/gbm_allocator.c new/wlroots-0.14.1/render/gbm_allocator.c --- old/wlroots-0.14.0/render/gbm_allocator.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/render/gbm_allocator.c 2021-07-08 17:18:01.000000000 +0200 @@ -7,7 +7,6 @@ #include <wlr/util/log.h> #include <xf86drm.h> #include "render/gbm_allocator.h" -#include "types/wlr_buffer.h" static const struct wlr_buffer_impl buffer_impl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/render/gles2/renderer.c new/wlroots-0.14.1/render/gles2/renderer.c --- old/wlroots-0.14.0/render/gles2/renderer.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/render/gles2/renderer.c 2021-07-08 17:18:01.000000000 +0200 @@ -17,7 +17,6 @@ #include <wlr/util/log.h> #include "render/gles2.h" #include "render/pixel_format.h" -#include "types/wlr_buffer.h" static const GLfloat verts[] = { 1, 0, // top right diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/render/shm_allocator.c new/wlroots-0.14.1/render/shm_allocator.c --- old/wlroots-0.14.0/render/shm_allocator.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/render/shm_allocator.c 2021-07-08 17:18:01.000000000 +0200 @@ -7,7 +7,6 @@ #include "render/pixel_format.h" #include "render/shm_allocator.h" #include "util/shm.h" -#include "types/wlr_buffer.h" static const struct wlr_buffer_impl buffer_impl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/types/tablet_v2/wlr_tablet_v2_pad.c new/wlroots-0.14.1/types/tablet_v2/wlr_tablet_v2_pad.c --- old/wlroots-0.14.0/types/tablet_v2/wlr_tablet_v2_pad.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/types/tablet_v2/wlr_tablet_v2_pad.c 2021-07-08 17:18:01.000000000 +0200 @@ -306,8 +306,9 @@ return; } - client->resource = - wl_resource_create(seat->wl_client, &zwp_tablet_pad_v2_interface, 1, 0); + uint32_t version = wl_resource_get_version(seat->resource); + client->resource = wl_resource_create(seat->wl_client, + &zwp_tablet_pad_v2_interface, version, 0); if (!client->resource) { wl_client_post_no_memory(seat->wl_client); free(client->groups); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/types/tablet_v2/wlr_tablet_v2_tool.c new/wlroots-0.14.1/types/tablet_v2/wlr_tablet_v2_tool.c --- old/wlroots-0.14.0/types/tablet_v2/wlr_tablet_v2_tool.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/types/tablet_v2/wlr_tablet_v2_tool.c 2021-07-08 17:18:01.000000000 +0200 @@ -115,8 +115,9 @@ client->tool = tool; client->seat = seat; - client->resource = - wl_resource_create(seat->wl_client, &zwp_tablet_tool_v2_interface, 1, 0); + uint32_t version = wl_resource_get_version(seat->resource); + client->resource = wl_resource_create(seat->wl_client, + &zwp_tablet_tool_v2_interface, version, 0); if (!client->resource) { free(client); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/types/wlr_output.c new/wlroots-0.14.1/types/wlr_output.c --- old/wlroots-0.14.0/types/wlr_output.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/types/wlr_output.c 2021-07-08 17:18:01.000000000 +0200 @@ -736,8 +736,19 @@ }; wlr_signal_emit_safe(&output->events.precommit, &pre_event); - if (!output->impl->commit(output)) { + // output_clear_back_buffer detaches the buffer from the renderer. This is + // important to do before calling impl->commit(), because this marks an + // implicit rendering synchronization point. The backend needs it to avoid + // displaying a buffer when asynchronous GPU work isn't finished. + struct wlr_buffer *back_buffer = NULL; + if ((output->pending.committed & WLR_OUTPUT_STATE_BUFFER) && + output->back_buffer != NULL) { + back_buffer = wlr_buffer_lock(output->back_buffer); output_clear_back_buffer(output); + } + + if (!output->impl->commit(output)) { + wlr_buffer_unlock(back_buffer); output_state_clear(&output->pending); return false; } @@ -782,12 +793,11 @@ if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { output->frame_pending = true; output->needs_frame = false; + } - if (output->back_buffer != NULL) { - wlr_swapchain_set_buffer_submitted(output->swapchain, - output->back_buffer); - output_clear_back_buffer(output); - } + if (back_buffer != NULL) { + wlr_swapchain_set_buffer_submitted(output->swapchain, back_buffer); + wlr_buffer_unlock(back_buffer); } uint32_t committed = output->pending.committed; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/types/wlr_output_damage.c new/wlroots-0.14.1/types/wlr_output_damage.c --- old/wlroots-0.14.0/types/wlr_output_damage.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/types/wlr_output_damage.c 2021-07-08 17:18:01.000000000 +0200 @@ -52,7 +52,11 @@ if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { // TODO: find a better way to access this info without a precommit // handler - output_damage->pending_buffer_type = output->pending.buffer_type; + if (output->back_buffer != NULL) { + output_damage->pending_buffer_type = WLR_OUTPUT_STATE_BUFFER_RENDER; + } else { + output_damage->pending_buffer_type = output->pending.buffer_type; + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wlroots-0.14.0/types/wlr_surface.c new/wlroots-0.14.1/types/wlr_surface.c --- old/wlroots-0.14.0/types/wlr_surface.c 2021-06-22 21:20:20.000000000 +0200 +++ new/wlroots-0.14.1/types/wlr_surface.c 2021-07-08 17:18:01.000000000 +0200 @@ -169,7 +169,7 @@ } } -static bool surface_state_finalize(struct wlr_surface *surface, +static void surface_state_finalize(struct wlr_surface *surface, struct wlr_surface_state *state) { if ((state->committed & WLR_SURFACE_STATE_BUFFER)) { if (state->buffer_resource != NULL) { @@ -189,7 +189,6 @@ wlr_log(WLR_DEBUG, "Client bug: submitted a buffer whose size (%dx%d) " "is not divisible by scale (%d)", state->buffer_width, state->buffer_height, state->scale); - return false; } if (state->viewport.has_dst) { @@ -209,8 +208,6 @@ pixman_region32_intersect_rect(&state->buffer_damage, &state->buffer_damage, 0, 0, state->buffer_width, state->buffer_height); - - return true; } static void surface_update_damage(pixman_region32_t *buffer_damage, @@ -420,6 +417,8 @@ surface_state_move(cached, &surface->pending); wl_list_insert(surface->cached.prev, &cached->cached_state_link); + + surface->pending.seq++; } static void surface_commit_state(struct wlr_surface *surface, @@ -464,6 +463,12 @@ } } + // If we're committing the pending state, bump the pending sequence number + // here, to allow commit listeners to lock the new pending state. + if (next == &surface->pending) { + surface->pending.seq++; + } + if (surface->role && surface->role->commit) { surface->role->commit(surface); } @@ -472,21 +477,17 @@ } static void surface_commit_pending(struct wlr_surface *surface) { - if (!surface_state_finalize(surface, &surface->pending)) { - return; - } + surface_state_finalize(surface, &surface->pending); if (surface->role && surface->role->precommit) { surface->role->precommit(surface); } - uint32_t next_seq = surface->pending.seq + 1; if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) { surface_cache_pending(surface); } else { surface_commit_state(surface, &surface->pending); } - surface->pending.seq = next_seq; } static bool subsurface_is_synchronized(struct wlr_subsurface *subsurface) {