Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package drm_info for openSUSE:Factory 
checked in at 2024-09-24 17:32:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drm_info (Old)
 and      /work/SRC/openSUSE:Factory/.drm_info.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drm_info"

Tue Sep 24 17:32:03 2024 rev:6 rq:1202602 version:2.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/drm_info/drm_info.changes        2024-04-04 
22:27:37.258320347 +0200
+++ /work/SRC/openSUSE:Factory/.drm_info.new.29891/drm_info.changes     
2024-09-24 17:32:24.234888082 +0200
@@ -1,0 +2,13 @@
+Wed Sep 11 23:26:27 UTC 2024 - llyyr <ll...@yukari.in>
+
+- Update to 2.7.0:
+  * Add new DRM caps from libdrm v2.4.120
+  * Don't print zero version date
+  * Constify blob data
+  * Add flag to read JSON from file
+  * pretty: use Unicode multiplication sign for sizes
+  * build: bump libdrm to v2.4.122
+  * Add support for the SIZE_HINTS property
+  * Print modifier hex code with leading zeroes
+
+-------------------------------------------------------------------

Old:
----
  drm_info-2.6.0.tar.gz

New:
----
  drm_info-2.7.0.tar.gz

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

Other differences:
------------------
++++++ drm_info.spec ++++++
--- /var/tmp/diff_new_pack.49YqKg/_old  2024-09-24 17:32:24.922916885 +0200
+++ /var/tmp/diff_new_pack.49YqKg/_new  2024-09-24 17:32:24.922916885 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           drm_info
-Version:        2.6.0
+Version:        2.7.0
 Release:        0
 Summary:        Small utility to dump info about DRM devices
 License:        MIT

++++++ drm_info-2.6.0.tar.gz -> drm_info-2.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/json.c new/drm_info-v2.7.0/json.c
--- old/drm_info-v2.6.0/json.c  2023-10-10 10:58:44.000000000 +0200
+++ new/drm_info-v2.7.0/json.c  2024-07-30 19:46:25.000000000 +0200
@@ -26,6 +26,7 @@
        { "ATOMIC", DRM_CLIENT_CAP_ATOMIC },
        { "ASPECT_RATIO", DRM_CLIENT_CAP_ASPECT_RATIO },
        { "WRITEBACK_CONNECTORS", DRM_CLIENT_CAP_WRITEBACK_CONNECTORS },
+       { "CURSOR_PLANE_HOTSPOT", DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT },
 };
 
 static const struct {
@@ -46,6 +47,7 @@
        { "CRTC_IN_VBLANK_EVENT", DRM_CAP_CRTC_IN_VBLANK_EVENT },
        { "SYNCOBJ", DRM_CAP_SYNCOBJ },
        { "SYNCOBJ_TIMELINE", DRM_CAP_SYNCOBJ_TIMELINE },
+       { "ATOMIC_ASYNC_PAGE_FLIP", DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP },
 };
 
 static struct json_object *tainted_info(void)
@@ -256,7 +258,7 @@
                return NULL;
        }
 
-       struct drm_format_modifier_blob *data = blob->data;
+       const struct drm_format_modifier_blob *data = blob->data;
 
        uint32_t *fmts = (uint32_t *)
                ((char *)data + data->formats_offset);
@@ -321,7 +323,7 @@
                return NULL;
        }
 
-       drmModeModeInfo *mode = blob->data;
+       const drmModeModeInfo *mode = blob->data;
 
        struct json_object *obj = mode_info(mode);
 
@@ -340,8 +342,8 @@
                return NULL;
        }
 
-       uint32_t *fmts = blob->data;
-       uint32_t fmts_len = blob->length / sizeof(uint32_t);
+       const uint32_t *fmts = blob->data;
+       uint32_t fmts_len = blob->length / sizeof(fmts[0]);
        for (uint32_t i = 0; i < fmts_len; ++i) {
                json_object_array_add(arr, json_object_new_uint64(fmts[i]));
        }
@@ -429,6 +431,31 @@
        return obj;
 }
 
+static struct json_object *size_hints_info(int fd, uint32_t blob_id)
+{
+       struct json_object *arr = json_object_new_array();
+
+       drmModePropertyBlobRes *blob = drmModeGetPropertyBlob(fd, blob_id);
+       if (!blob) {
+               perror("drmModeGetPropertyBlob");
+               return NULL;
+       }
+
+       const struct drm_plane_size_hint *size_hints = blob->data;
+       uint32_t size_hints_len = blob->length / sizeof(size_hints[0]);
+       for (uint32_t i = 0; i < size_hints_len; ++i) {
+               struct drm_plane_size_hint size = size_hints[i];
+               struct json_object *obj = json_object_new_object();
+               json_object_object_add(obj, "width", 
json_object_new_uint64(size.width));
+               json_object_object_add(obj, "height", 
json_object_new_uint64(size.height));
+               json_object_array_add(arr, obj);
+       }
+
+       drmModeFreePropertyBlob(blob);
+
+       return arr;
+}
+
 static struct json_object *fb_info(int fd, uint32_t id)
 {
 #ifdef HAVE_GETFB2
@@ -599,6 +626,8 @@
                                data_obj = path_info(fd, value);
                        } else if (strcmp(prop->name, "HDR_OUTPUT_METADATA") == 
0) {
                                data_obj = hdr_output_metadata_info(fd, value);
+                       } else if (strcmp(prop->name, "SIZE_HINTS") == 0) {
+                               data_obj = size_hints_info(fd, value);
                        }
                        break;
                case DRM_MODE_PROP_RANGE:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/main.c new/drm_info-v2.7.0/main.c
--- old/drm_info-v2.6.0/main.c  2023-10-10 10:58:44.000000000 +0200
+++ new/drm_info-v2.7.0/main.c  2024-07-30 19:46:25.000000000 +0200
@@ -11,24 +11,33 @@
 
 int main(int argc, char *argv[])
 {
-       bool json = false;
+       bool json = false, input = false;
 
        int opt;
-       while ((opt = getopt(argc, argv, "j")) != -1) {
+       while ((opt = getopt(argc, argv, "ji")) != -1) {
                switch (opt) {
                case 'j':
                        json = true;
                        break;
+               case 'i':
+                       input = true;
+                       break;
                default:
-                       fprintf(stderr, "usage: drm_info [-j] [--] 
[path]...\n");
+                       fprintf(stderr, "usage: drm_info [-j] [-i] [--] 
[path]...\n");
                        exit(opt == '?' ? EXIT_SUCCESS : EXIT_FAILURE);
                }
        }
 
-       struct json_object *obj = drm_info(&argv[optind]);
+       struct json_object *obj;
+       if (input) {
+               obj = json_object_from_fd(STDIN_FILENO);
+       } else {
+               obj = drm_info(&argv[optind]);
+       }
        if (!obj) {
                exit(EXIT_FAILURE);
        }
+
        if (json) {
                json_object_to_fd(STDOUT_FILENO, obj,
                        JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/meson.build 
new/drm_info-v2.7.0/meson.build
--- old/drm_info-v2.6.0/meson.build     2023-10-10 10:58:44.000000000 +0200
+++ new/drm_info-v2.7.0/meson.build     2024-07-30 19:46:25.000000000 +0200
@@ -1,5 +1,5 @@
 project('drm_info', 'c',
-  version: '2.6.0',
+  version: '2.7.0',
   license: 'MIT',
   meson_version: '>=0.49.0',
   default_options: [
@@ -40,7 +40,7 @@
 #
 # We need to make sure we don't use any new libdrm functions, but those
 # are added very infrequently, so this is unlikely to be an issue.
-if libdrm.version().version_compare('<2.4.115')
+if libdrm.version().version_compare('<2.4.122')
   if libdrm.type_name() == 'internal'
     error('libdrm subproject out of date. Run `meson subprojects update`.')
   endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/modifiers.c 
new/drm_info-v2.7.0/modifiers.c
--- old/drm_info-v2.6.0/modifiers.c     2023-10-10 10:58:44.000000000 +0200
+++ new/drm_info-v2.7.0/modifiers.c     2024-07-30 19:46:25.000000000 +0200
@@ -322,5 +322,5 @@
        default:
                printf("%s", basic_modifier_str(mod));
        }
-       printf(" (0x%"PRIx64")", mod);
+       printf(" (0x%016"PRIx64")", mod);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/pretty.c new/drm_info-v2.7.0/pretty.c
--- old/drm_info-v2.6.0/pretty.c        2023-10-10 10:58:44.000000000 +0200
+++ new/drm_info-v2.7.0/pretty.c        2024-07-30 19:46:25.000000000 +0200
@@ -60,8 +60,12 @@
        int version_patch = get_object_object_uint64(version_obj, "patch");
        const char *version_date = get_object_object_string(version_obj, 
"date");
 
-       printf(L_VAL "Driver: %s (%s) version %d.%d.%d (%s)\n", name, desc,
-               version_major, version_minor, version_patch, version_date);
+       printf(L_VAL "Driver: %s (%s) version %d.%d.%d", name, desc,
+               version_major, version_minor, version_patch);
+       if (strcmp(version_date, "0") != 0) {
+               printf(" (%s)", version_date);
+       }
+       printf("\n");
 
        struct json_object_iter iter;
        struct json_object *client_caps_obj =
@@ -206,7 +210,7 @@
        int type = get_object_object_uint64(obj, "type");
        int flags = get_object_object_uint64(obj, "flags");
 
-       printf("%"PRIu16"x%"PRIu16"@%.02f ", hdisplay, vdisplay,
+       printf("%"PRIu16"×%"PRIu16"@%.02f ", hdisplay, vdisplay,
                refresh_rate(obj) / 1000.0);
 
        if (type & DRM_MODE_TYPE_PREFERRED)
@@ -444,6 +448,17 @@
                (int) get_object_object_uint64(obj, "max_fall"));
 }
 
+static void print_size_hints(struct json_object *arr, const char *prefix)
+{
+       for (size_t i = 0; i < json_object_array_length(arr); ++i) {
+               bool last = i == json_object_array_length(arr) - 1;
+               struct json_object *obj = json_object_array_get_idx(arr, i);
+               printf("%s%s%"PRIu64"×%"PRIu64"\n", prefix, last ? L_LAST : 
L_VAL,
+                       get_object_object_uint64(obj, "width"),
+                       get_object_object_uint64(obj, "height"));
+       }
+}
+
 static void print_fb(struct json_object *obj, const char *prefix)
 {
        uint32_t id = get_object_object_uint64(obj, "id");
@@ -459,7 +474,7 @@
        bool has_legacy = pitch_obj && bpp_obj && depth_obj;
 
        printf("%s" L_VAL "Object ID: %"PRIu32"\n", prefix, id);
-       printf("%s%sSize: %"PRIu32"x%"PRIu32"\n", prefix,
+       printf("%s%sSize: %"PRIu32"×%"PRIu32"\n", prefix,
                (has_legacy || format_obj) ? L_VAL : L_LAST,
                width, height);
 
@@ -596,6 +611,8 @@
                                print_path(data_obj, sub_prefix);
                        else if (strcmp(prop_name, "HDR_OUTPUT_METADATA") == 0)
                                print_hdr_output_metadata(data_obj, sub_prefix);
+                       else if (strcmp(prop_name, "SIZE_HINTS") == 0)
+                               print_size_hints(data_obj, sub_prefix);
                        break;
                case DRM_MODE_PROP_BITMASK:
                        printf("bitmask {");
@@ -771,7 +788,7 @@
                printf(L_LINE "%s" L_VAL "Status: %s\n", last ? L_GAP : L_LINE,
                        conn_status(status));
                if (status != DRM_MODE_DISCONNECTED) {
-                       printf(L_LINE "%s" L_VAL "Physical size: 
%"PRIu32"x%"PRIu32" mm\n",
+                       printf(L_LINE "%s" L_VAL "Physical size: 
%"PRIu32"×%"PRIu32" mm\n",
                                last ? L_GAP : L_LINE, phy_width, phy_height);
                        printf(L_LINE "%s" L_VAL "Subpixel: %s\n", last ? L_GAP 
: L_LINE,
                                conn_subpixel(subpixel));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-v2.6.0/subprojects/libdrm.wrap 
new/drm_info-v2.7.0/subprojects/libdrm.wrap
--- old/drm_info-v2.6.0/subprojects/libdrm.wrap 2023-10-10 10:58:44.000000000 
+0200
+++ new/drm_info-v2.7.0/subprojects/libdrm.wrap 2024-07-30 19:46:25.000000000 
+0200
@@ -1,4 +1,4 @@
 [wrap-git]
 url = https://gitlab.freedesktop.org/mesa/drm.git
-revision = libdrm-2.4.115
+revision = libdrm-2.4.122
 depth = 1

Reply via email to