Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wayland-utils for openSUSE:Factory 
checked in at 2022-12-07 17:34:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wayland-utils (Old)
 and      /work/SRC/openSUSE:Factory/.wayland-utils.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wayland-utils"

Wed Dec  7 17:34:40 2022 rev:2 rq:1040712 version:1.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/wayland-utils/wayland-utils.changes      
2020-08-03 14:17:45.792642119 +0200
+++ /work/SRC/openSUSE:Factory/.wayland-utils.new.1835/wayland-utils.changes    
2022-12-07 17:35:55.908856756 +0100
@@ -1,0 +2,12 @@
+Tue Dec  6 12:50:27 UTC 2022 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.1.0:
+  * Support for linux_dmabuf version 4 (version 3 still supported)
+  * A human readable description to the dmabuf format modifier tokens
+     using libdrm (optional),
+  * The list of SHM supported formats is now more consistent with the list
+     of dmabuf formats,
+  * Support for wl_output version 4,
+  * A couple of compilation issues on the BSD systems are addressed.
+
+-------------------------------------------------------------------

Old:
----
  wayland-utils-1.0.0.tar.xz
  wayland-utils-1.0.0.tar.xz.sig

New:
----
  wayland-utils-1.1.0.tar.xz
  wayland-utils-1.1.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wayland-utils.spec ++++++
--- /var/tmp/diff_new_pack.CB6xnT/_old  2022-12-07 17:35:58.596871475 +0100
+++ /var/tmp/diff_new_pack.CB6xnT/_new  2022-12-07 17:35:58.600871496 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package wayland-utils
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,24 +12,25 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 Name:           wayland-utils
-Version:        1.0.0
+Version:        1.1.0
 Release:        0
 Summary:        Wayland diagnostic utilities
 License:        MIT
 Group:          System/X11/Utilities
-URL:            http://wayland.freedesktop.org/
-
-Source:         http://wayland.freedesktop.org/releases/%name-%version.tar.xz
-Source2:        
http://wayland.freedesktop.org/releases/%name-%version.tar.xz.sig
+URL:            https://wayland.freedesktop.org/
+Source:         
https://gitlab.freedesktop.org/wayland/%name/-/releases/%version/downloads/%name-%version.tar.xz
+Source1:        
https://gitlab.freedesktop.org/wayland/%name/-/releases/%version/downloads/%name-%version.tar.xz.sig
 Source3:        %name.keyring
 BuildRequires:  cmake
 BuildRequires:  meson
-BuildRequires:  pkgconfig(wayland-server) >= 1.17
+BuildRequires:  pkgconfig(libdrm)
 BuildRequires:  pkgconfig(wayland-protocols) >= 1.17
+BuildRequires:  pkgconfig(wayland-server) >= 1.17
 
 %description
 A collection of wayland utilities, presently just wayland-info.

++++++ wayland-utils-1.0.0.tar.xz -> wayland-utils-1.1.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/.gitlab-ci.yml 
new/wayland-utils-1.1.0/.gitlab-ci.yml
--- old/wayland-utils-1.0.0/.gitlab-ci.yml      1970-01-01 01:00:00.000000000 
+0100
+++ new/wayland-utils-1.1.0/.gitlab-ci.yml      2022-09-13 10:51:57.000000000 
+0200
@@ -0,0 +1,66 @@
+.templates_sha: &templates_sha 0a0c8db6589472e3ff58e8c3feec518a43167286
+
+include:
+  - project: 'freedesktop/ci-templates'
+    ref: *templates_sha
+    file: '/templates/ci-fairy.yml'
+  - project: 'freedesktop/ci-templates'
+    ref: *templates_sha
+    file: '/templates/alpine.yml'
+
+variables:
+  FDO_UPSTREAM_REPO: 'wayland/wayland-utils'
+  FDO_DISTRIBUTION_TAG: '2022-05-26.0'
+  #FDO_FORCE_REBUILD: 1
+
+stages:
+  - "Contribution checks"
+  - "Prepare container"
+  - "Build and test"
+
+check-mr:
+  extends: .fdo.ci-fairy
+  stage: "Contribution checks"
+  script:
+   - ci-fairy check-commits --signed-off-by
+   - ci-fairy check-merge-request --require-allow-collaboration
+  rules:
+    - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
+      when: always
+    - when: never
+
+prepare-container:
+  extends: .fdo.container-build@alpine
+  stage: "Prepare container"
+  variables:
+    FDO_DISTRIBUTION_PACKAGES: 'build-base meson libdrm-dev wayland-protocols 
git libffi-dev expat-dev'
+    FDO_DISTRIBUTION_EXEC: |
+      git clone https://gitlab.freedesktop.org/wayland/wayland.git --depth 1 
--branch=1.20.0
+      cd wayland
+      meson build/ -Dtests=false -Ddocumentation=false -Ddtd_validation=false
+      ninja -C build/ install
+      cd ..
+      rm -rf wayland
+
+      git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
+      cd wayland-protocols
+      git checkout -q 1.24
+      meson build/ -Dtests=false
+      ninja -C build/ install
+      cd ..
+      rm -rf wayland-protocols
+  rules:
+    - when: on_success
+
+build:
+  extends: .fdo.distribution-image@alpine
+  stage: "Build and test"
+  script:
+    - meson build/ -Dwerror=true
+    - ninja -C build/
+    - ninja -C build/ test
+  artifacts:
+    paths:
+      - build/meson-logs/
+  rules:
+    - when: on_success
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/README.md 
new/wayland-utils-1.1.0/README.md
--- old/wayland-utils-1.0.0/README.md   2020-07-31 15:53:05.661747500 +0200
+++ new/wayland-utils-1.1.0/README.md   2022-09-13 10:51:57.000000000 +0200
@@ -38,7 +38,7 @@
 
 `wayland-info` is built using [Meson](https://mesonbuild.com/) and depends
 on [Wayland](https://gitlab.freedesktop.org/wayland/wayland) and
-[wayland-protocols](https://cgit.freedesktop.org/wayland/wayland-protocols).
+[wayland-protocols](https://gitlab.freedesktop.org/wayland/wayland-protocols).
 
        $ git clone https://gitlab.freedesktop.org/wayland/wayland-utils.git
        $ cd wayland-utils
@@ -53,6 +53,15 @@
 
        $ wayland-info
 
+Reporting issues and contributing
+=================================
+
+`wayland-info` is hosted on
+[freedesktop.org's GitLab 
instance](https://gitlab.freedesktop.org/wayland/wayland-utils).
+It uses the same contributing guidelines as the Wayland project, please refer
+to [Wayland's contributing 
document](https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/CONTRIBUTING.md)
+for more information.
+
 Credit
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/meson.build 
new/wayland-utils-1.1.0/meson.build
--- old/wayland-utils-1.0.0/meson.build 2020-07-31 15:53:05.661747500 +0200
+++ new/wayland-utils-1.1.0/meson.build 2022-09-13 10:51:57.000000000 +0200
@@ -1,9 +1,9 @@
 project('wayland-utils',
        'c',
-       version: '1.0.0',
+       version: '1.1.0',
        default_options: [
                'warning_level=3',
-               'c_std=gnu99',
+               'c_std=c99',
                'b_lundef=true',
        ],
        meson_version: '>= 0.47',
@@ -21,12 +21,17 @@
 cflags = ['-Wno-unused-parameter']
 add_project_arguments(cflags, language: 'c')
 
-dep_wayland_server = dependency('wayland-server', version: '>= 1.17.0')
-dep_wayland_client = dependency('wayland-client', version: '>= 1.17.0')
+dep_wayland_client = dependency('wayland-client', version: '>= 1.20.0')
+dep_libdrm = dependency('libdrm', required: get_option('drm'))
+dep_libdrm_version = dep_libdrm.version()
 
 config_h = configuration_data()
-config_h.set('_GNU_SOURCE', '1')
-config_h.set('_ALL_SOURCE', '1')
+config_h.set('_POSIX_C_SOURCE', '200809L')
+if dep_libdrm_version.version_compare('>=2.4.107')
+       message('Found libdrm with human format modifier support.')
+       config_h.set('HAVE_HUMAN_FORMAT_MODIFIER', '1')
+endif
+
 configure_file(output: 'config.h', configuration: config_h)
 
 subdir('wayland-info')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/meson_options.txt 
new/wayland-utils-1.1.0/meson_options.txt
--- old/wayland-utils-1.0.0/meson_options.txt   1970-01-01 01:00:00.000000000 
+0100
+++ new/wayland-utils-1.1.0/meson_options.txt   2022-09-13 10:51:57.000000000 
+0200
@@ -0,0 +1,5 @@
+option(
+       'drm',
+       description: 'Print extra DRM information (requires libdrm)',
+       type: 'feature',
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/releasing.md 
new/wayland-utils-1.1.0/releasing.md
--- old/wayland-utils-1.0.0/releasing.md        2020-07-31 15:53:05.661747500 
+0200
+++ new/wayland-utils-1.1.0/releasing.md        2022-09-13 10:51:57.000000000 
+0200
@@ -15,26 +15,19 @@
 
 2. Run the `release.sh` script to generate the tarballs, sign and upload them,
    and generate a release announcement template.  This script can be obtained
-   from X.org's modular package:
+   from the Wayland repository:
 
-   https://gitlab.freedesktop.org/xorg/util/modular/blob/master/release.sh
+   https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/release.sh
 
-   The script supports a `--dry-run` option to test it without actually doing a
-   release.  If the script fails on the distcheck step due to a test suite 
error
-   that can't be fixed for some reason, you can skip testsuite by specifying
-   the `--dist` argument.  Pass `--help` to see other supported options.
-
-       $ release.sh .
-
-3. Compose the release announcements.  The script will generate 
*.x.y.z.announce
-   files with a list of changes and tags.  Prepend these with a human-readable
+3. Compose the release announcements.  The script will generate a 
*-x.y.z-announce.eml
+   file with a list of changes and tags.  Prepend these with a human-readable
    listing of the most notable changes.
 
 4. PGP sign the release announcement and send it to
    <wayland-de...@lists.freedesktop.org>.
 
 5. Update `releases.html` in wayland.freedesktop.org with links to tarballs and
-   the release email URL. Copy tarballs produced by `release.sh` to 
`releases/`.
+   the release email URL.
 
    Once satisfied:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/wayland-info/meson.build 
new/wayland-utils-1.1.0/wayland-info/meson.build
--- old/wayland-utils-1.0.0/wayland-info/meson.build    2020-07-31 
15:53:05.661747500 +0200
+++ new/wayland-utils-1.1.0/wayland-info/meson.build    2022-09-13 
10:51:57.000000000 +0200
@@ -1,7 +1,7 @@
 dep_scanner = dependency('wayland-scanner', native: true)
 prog_scanner = 
find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
 
-dep_wp = dependency('wayland-protocols', version: '>= 1.18')
+dep_wp = dependency('wayland-protocols', version: '>= 1.24')
 dir_wp_base = dep_wp.get_pkgconfig_variable('pkgdatadir')
 
 generated_protocols = [
@@ -50,5 +50,5 @@
 executable('wayland-info',
        wayland_info_src + generated_protocols_sources,
        include_directories: dir_inc,
-       dependencies: dep_wayland_client,
+       dependencies: [dep_wayland_client, dep_libdrm],
        install : true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wayland-utils-1.0.0/wayland-info/wayland-info.c 
new/wayland-utils-1.1.0/wayland-info/wayland-info.c
--- old/wayland-utils-1.0.0/wayland-info/wayland-info.c 2020-07-31 
15:53:05.661747500 +0200
+++ new/wayland-utils-1.1.0/wayland-info/wayland-info.c 2022-09-13 
10:51:57.000000000 +0200
@@ -33,8 +33,13 @@
 #include <assert.h>
 #include <ctype.h>
 #include <unistd.h>
+#include <sys/mman.h>
 
 #include <wayland-client.h>
+#if HAVE_HUMAN_FORMAT_MODIFIER
+#include "xf86drm.h"
+#include "drm_fourcc.h"
+#endif
 
 #include "presentation-time-client-protocol.h"
 #include "linux-dmabuf-unstable-v1-client-protocol.h"
@@ -83,6 +88,8 @@
 
        int32_t version;
 
+       char *name, *description;
+
        struct {
                int32_t x, y;
                int32_t scale;
@@ -116,11 +123,28 @@
        uint64_t modifier;
 };
 
+struct linux_dmabuf_tranche {
+       struct wl_list link;
+
+       dev_t target_device;
+       uint32_t flags;
+       struct wl_array format_indices;
+};
+
 struct linux_dmabuf_info {
        struct global_info global;
        struct zwp_linux_dmabuf_v1 *dmabuf;
 
+       /* Deprecated, only for use in v3 */
        struct wl_list modifiers;
+
+       /* For use in v4 */
+       struct zwp_linux_dmabuf_feedback_v1 *feedback;
+       void *format_map;
+       uint32_t format_size;
+       dev_t main_device;
+       struct linux_dmabuf_tranche current_tranche;
+       struct wl_list tranches;
 };
 
 struct seat_info {
@@ -255,7 +279,7 @@
 fail_on_null(void *p, size_t size, char *file, int32_t line)
 {
        if (p == NULL) {
-               fprintf(stderr, "[%s] ", program_invocation_short_name);
+               fprintf(stderr, "[wayland-info] ");
                if (file)
                        fprintf(stderr, "%s:%d: ", file, line);
                fprintf(stderr, "out of memory");
@@ -310,6 +334,11 @@
 
        print_global_info(data);
 
+       if (output->name != NULL)
+               printf("\tname: %s\n", output->name);
+       if (output->description != NULL)
+               printf("\tdescription: %s\n", output->description);
+
        switch (output->geometry.subpixel) {
        case WL_OUTPUT_SUBPIXEL_UNKNOWN:
                subpixel_orientation = "unknown";
@@ -430,22 +459,19 @@
 
        print_global_info(data);
 
-       printf("\tformats:");
+       printf("\tformats (fourcc):");
 
        wl_list_for_each(format, &shm->formats, link)
                switch (format->format) {
                case WL_SHM_FORMAT_ARGB8888:
-                       printf(" ARGB8888");
+                       printf("\n\t         0 = 'AR24'");
                        break;
                case WL_SHM_FORMAT_XRGB8888:
-                       printf(" XRGB8888");
-                       break;
-               case WL_SHM_FORMAT_RGB565:
-                       printf(" RGB565");
+                       printf("\n\t         1 = 'XR24'");
                        break;
                default:
                        fourcc2str(format->format, str, sizeof(str));
-                       printf(" '%s'(0x%08x)", str, format->format);
+                       printf("\n\t0x%08x = '%s'", format->format, str);
                        break;
                }
 
@@ -453,19 +479,97 @@
 }
 
 static void
-print_linux_dmabuf_info(void *data)
+print_format_and_modifier(uint32_t format, uint64_t modifier)
 {
        char str[5];
+
+       fourcc2str(format, str, sizeof(str));
+
+#if HAVE_HUMAN_FORMAT_MODIFIER
+       char *name = drmGetFormatModifierName(modifier);
+       char *vendor = drmGetFormatModifierVendor(modifier);
+       if (!vendor)
+               printf("0x%08x = '%s'; 0x%016"PRIx64" = UNKNOWN",
+                      format, str, modifier);
+       else if (!name)
+               printf("0x%08x = '%s'; 0x%016"PRIx64" = %s_UNKNOWN_MODIFIER",
+                      format, str, modifier, vendor);
+       else if (fourcc_mod_get_vendor(modifier) == DRM_FORMAT_MOD_NONE)
+               printf("0x%08x = '%s'; 0x%016"PRIx64" = %s",
+                      format, str, modifier, name);
+       else
+               printf("0x%08x = '%s'; 0x%016"PRIx64" = %s_%s",
+                      format, str, modifier, vendor, name);
+
+       free(vendor);
+       free(name);
+#else
+       printf("0x%08x = '%s'; 0x%016"PRIx64"",
+              format, str, modifier);
+#endif
+}
+
+static void
+print_linux_dmabuf_info(void *data)
+{
        struct linux_dmabuf_info *dmabuf = data;
        struct linux_dmabuf_modifier *modifier;
+       struct linux_dmabuf_tranche *tranche;
 
        print_global_info(data);
 
-       printf("\tformats:");
+       if (dmabuf->main_device) {
+               printf("\tmain device: 0x%" PRIX64, (uint64_t) 
dmabuf->main_device);
+
+               if (dmabuf->format_map == MAP_FAILED) {
+                       printf("\tError: failed to map format table\n");
+                       return;
+               }
+
+               const struct {
+                       uint32_t format;
+                       uint32_t padding;
+                       uint64_t modifier;
+               } *formats = dmabuf->format_map;
+
+               wl_list_for_each(tranche, &dmabuf->tranches, link) {
+                       printf("\n\ttranche");
+
+                       printf("\n\t\ttarget device: 0x%" PRIX64,
+                              (uint64_t) tranche->target_device);
+                       printf("\n\t\tflags: ");
+                       if (tranche->flags == 0)
+                               printf("none");
+                       if (tranche->flags & 
ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT)
+                               printf("scanout");
+                       printf("\n");
+
+#if HAVE_HUMAN_FORMAT_MODIFIER
+                       printf("\t\tformats (fourcc) and modifiers (names):");
+#else
+                       printf("\t\tformats (fourcc) and modifiers:");
+#endif
+
+                       const uint16_t *index;
+                       wl_array_for_each(index, &tranche->format_indices) {
+                               printf("\n\t\t");
+                               
print_format_and_modifier(formats[*index].format,
+                                                         
formats[*index].modifier);
+                       }
+               }
+
+               munmap(dmabuf->format_map, dmabuf->format_size);
+       } else {
+#if HAVE_HUMAN_FORMAT_MODIFIER
+               printf("\tformats (fourcc) and modifiers (names):");
+#else
+               printf("\tformats (fourcc) and modifiers:");
+#endif
 
-       wl_list_for_each(modifier, &dmabuf->modifiers, link) {
-               fourcc2str(modifier->format, str, sizeof(str));
-               printf("\n\t'%s'(0x%08x), modifier: 0x%016"PRIx64, str, 
modifier->format, modifier->modifier);
+               wl_list_for_each(modifier, &dmabuf->modifiers, link) {
+                       printf("\n\t");
+                       print_format_and_modifier(modifier->format, 
modifier->modifier);
+               }
        }
 
        printf("\n");
@@ -1601,17 +1705,97 @@
 destroy_linux_dmabuf_info(void *data)
 {
        struct linux_dmabuf_info *dmabuf = data;
-       struct linux_dmabuf_modifier *modifier, *tmp;
+       struct linux_dmabuf_modifier *modifier, *modifier_tmp;
+       struct linux_dmabuf_tranche *tranche, *tranche_tmp;
 
-       wl_list_for_each_safe(modifier, tmp, &dmabuf->modifiers, link) {
+       wl_list_for_each_safe(modifier, modifier_tmp, &dmabuf->modifiers, link) 
{
                wl_list_remove(&modifier->link);
                free(modifier);
        }
 
+       wl_list_for_each_safe(tranche, tranche_tmp, &dmabuf->tranches, link) {
+               wl_list_remove(&tranche->link);
+               wl_array_release(&tranche->format_indices);
+               free(tranche);
+       }
+
        zwp_linux_dmabuf_v1_destroy(dmabuf->dmabuf);
 }
 
 static void
+linux_dmabuf_feedback_handle_done(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback)
+{
+}
+
+static void
+linux_dmabuf_feedback_handle_format_table(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback, int32_t fd, uint32_t size)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+
+       void *map = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
+       close(fd);
+
+       dmabuf->format_map = map;
+       dmabuf->format_size = size;
+}
+
+static void
+linux_dmabuf_feedback_handle_main_device(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback, struct wl_array *device)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+
+       assert(device->size == sizeof(dev_t));
+       memcpy(&dmabuf->main_device, device->data, sizeof(dev_t));
+}
+
+static void
+linux_dmabuf_feedback_handle_tranche_done(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+       struct linux_dmabuf_tranche *tranche = xzalloc(sizeof(struct 
linux_dmabuf_tranche));
+
+       memcpy(tranche, &dmabuf->current_tranche, sizeof(struct 
linux_dmabuf_tranche));
+       wl_list_insert(&dmabuf->tranches, &tranche->link);
+
+       memset(&dmabuf->current_tranche, 0, sizeof(struct 
linux_dmabuf_tranche));
+}
+
+static void
+linux_dmabuf_feedback_handle_tranche_target_device(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback, struct wl_array *device)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+
+       assert(device->size == sizeof(dev_t));
+       memcpy(&dmabuf->current_tranche.target_device, device->data, 
sizeof(dev_t));
+}
+
+static void
+linux_dmabuf_feedback_handle_tranche_formats(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback, struct wl_array *indices)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+
+       wl_array_copy(&dmabuf->current_tranche.format_indices, indices);
+}
+
+static void
+linux_dmabuf_feedback_handle_tranche_flags(void *data, struct 
zwp_linux_dmabuf_feedback_v1 *feedback, uint32_t flags)
+{
+       struct linux_dmabuf_info *dmabuf = data;
+
+       dmabuf->current_tranche.flags = flags;
+}
+
+static const struct zwp_linux_dmabuf_feedback_v1_listener 
linux_dmabuf_feedback_listener = {
+       linux_dmabuf_feedback_handle_done,
+       linux_dmabuf_feedback_handle_format_table,
+       linux_dmabuf_feedback_handle_main_device,
+       linux_dmabuf_feedback_handle_tranche_done,
+       linux_dmabuf_feedback_handle_tranche_target_device,
+       linux_dmabuf_feedback_handle_tranche_formats,
+       linux_dmabuf_feedback_handle_tranche_flags,
+};
+
+static void
 add_linux_dmabuf_info(struct wayland_info *info, uint32_t id, uint32_t version)
 {
        struct linux_dmabuf_info *dmabuf = xzalloc(sizeof *dmabuf);
@@ -1620,14 +1804,24 @@
        dmabuf->global.print = print_linux_dmabuf_info;
        dmabuf->global.destroy = destroy_linux_dmabuf_info;
 
+       wl_list_init(&dmabuf->tranches);
        wl_list_init(&dmabuf->modifiers);
 
-       if (version >= 3) {
+       if (version == 3) {
                dmabuf->dmabuf = wl_registry_bind(info->registry,
                                                  id, 
&zwp_linux_dmabuf_v1_interface, 3);
                zwp_linux_dmabuf_v1_add_listener(dmabuf->dmabuf, 
&linux_dmabuf_listener, dmabuf);
 
                info->roundtrip_needed = true;
+       } else if (version >= 4) {
+               dmabuf->dmabuf = wl_registry_bind(info->registry,
+                                                 id, 
&zwp_linux_dmabuf_v1_interface, 4);
+               dmabuf->feedback = 
zwp_linux_dmabuf_v1_get_default_feedback(dmabuf->dmabuf);
+               zwp_linux_dmabuf_feedback_v1_add_listener(dmabuf->feedback,
+                                                         
&linux_dmabuf_feedback_listener,
+                                                         dmabuf);
+
+               info->roundtrip_needed = true;
        }
 }
 
@@ -1684,11 +1878,30 @@
        output->geometry.scale = scale;
 }
 
+static void
+output_handle_name(void *data, struct wl_output *wl_output, const char *name)
+{
+       struct output_info *output = data;
+
+       output->name = strdup(name);
+}
+
+static void
+output_handle_description(void *data, struct wl_output *wl_output,
+                         const char *description)
+{
+       struct output_info *output = data;
+
+       output->description = strdup(description);
+}
+
 static const struct wl_output_listener output_listener = {
        output_handle_geometry,
        output_handle_mode,
        output_handle_done,
        output_handle_scale,
+       output_handle_name,
+       output_handle_description,
 };
 
 static void
@@ -1699,6 +1912,9 @@
 
        wl_output_destroy(output->output);
 
+       free(output->name);
+       free(output->description);
+
        if (output->geometry.make != NULL)
                free(output->geometry.make);
        if (output->geometry.model != NULL)
@@ -1719,7 +1935,7 @@
        output->global.print = print_output_info;
        output->global.destroy = destroy_output_info;
 
-       output->version = MIN(version, 2);
+       output->version = MIN(version, 4);
        output->geometry.scale = 1;
        wl_list_init(&output->modes);
 
@@ -1750,9 +1966,15 @@
        static const char *names[] = {
                [CLOCK_REALTIME] =              "CLOCK_REALTIME",
                [CLOCK_MONOTONIC] =             "CLOCK_MONOTONIC",
+#ifdef CLOCK_MONOTONIC_RAW
                [CLOCK_MONOTONIC_RAW] = "CLOCK_MONOTONIC_RAW",
+#endif
+#ifdef CLOCK_REALTIME_COARSE
                [CLOCK_REALTIME_COARSE] =       "CLOCK_REALTIME_COARSE",
+#endif
+#ifdef CLOCK_MONOTONIC_COARSE
                [CLOCK_MONOTONIC_COARSE] =      "CLOCK_MONOTONIC_COARSE",
+#endif
 #ifdef CLOCK_BOOTTIME
                [CLOCK_BOOTTIME] =              "CLOCK_BOOTTIME",
 #endif

Reply via email to