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 2023-01-23 18:32:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drm_info (Old)
 and      /work/SRC/openSUSE:Factory/.drm_info.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drm_info"

Mon Jan 23 18:32:04 2023 rev:2 rq:1060325 version:2.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/drm_info/drm_info.changes        2021-12-14 
22:02:17.687151300 +0100
+++ /work/SRC/openSUSE:Factory/.drm_info.new.32243/drm_info.changes     
2023-01-23 18:32:20.804219273 +0100
@@ -1,0 +2,11 @@
+Fri Jan 20 16:49:06 UTC 2023 - Andrea Manzini <[email protected]>
+
+- Update to version 2.4.0
+  * added manpage
+  * Migrate to gitlab.freedesktop.org
+  * Add support for DRM_FORMAT_MOD_ARM_TYPE_AFRC
+  * Fix FB planes tree glitch
+  * Print unit for pitch
+  * Use drmModeGetConnectorCurrent
+
+-------------------------------------------------------------------

Old:
----
  drm_info-2.3.0.tar.gz

New:
----
  drm_info-2.4.0.tar.gz

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

Other differences:
------------------
++++++ drm_info.spec ++++++
--- /var/tmp/diff_new_pack.uDY8Vi/_old  2023-01-23 18:32:21.220222152 +0100
+++ /var/tmp/diff_new_pack.uDY8Vi/_new  2023-01-23 18:32:21.228222207 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package drm_info
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
 
 
 Name:           drm_info
-Version:        2.3.0
+Version:        2.4.0
 Release:        0
 Summary:        Small utility to dump info about DRM devices
 License:        MIT
-URL:            https://github.com/ascent12/drm_info
-Source0:        
https://github.com/ascent12/drm_info/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+URL:            https://gitlab.freedesktop.org/emersion/drm_info
+Source0:        
https://gitlab.freedesktop.org/emersion/drm_info/-/archive/v%{version}/%{name}-v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  gcc
 BuildRequires:  libdrm-devel
 BuildRequires:  libjson-c-devel
@@ -31,12 +31,13 @@
 BuildRequires:  pciutils-devel
 BuildRequires:  pkg-config
 BuildRequires:  python3-base
+BuildRequires:  scdoc
 
 %description
 Small utility to dump info about DRM devices.
 
 %prep
-%autosetup -p1
+%autosetup -p1 -n %{name}-v%{version}
 
 %build
 %meson
@@ -49,5 +50,6 @@
 %doc README.md
 %license LICENSE
 %{_bindir}/drm_info
+%{_mandir}/man1/%{name}.1%{?ext_man}
 
 %changelog

++++++ drm_info-2.3.0.tar.gz -> drm_info-2.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/.build.yml 
new/drm_info-v2.4.0/.build.yml
--- old/drm_info-2.3.0/.build.yml       2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/.build.yml      2022-10-07 10:25:44.000000000 +0200
@@ -3,8 +3,10 @@
   - libdrm-dev
   - meson
   - pkgconf
+  - python3-setuptools
+  - scdoc
 sources:
-  - https://github.com/ascent12/drm_info
+  - https://gitlab.freedesktop.org/emersion/drm_info.git
 tasks:
   - setup: |
       cd drm_info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/README.md 
new/drm_info-v2.4.0/README.md
--- old/drm_info-2.3.0/README.md        2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/README.md       2022-10-07 10:25:44.000000000 +0200
@@ -1,6 +1,6 @@
 # drm_info
 
-[![builds.sr.ht 
status](https://builds.sr.ht/~ascent/drm_info/commits.svg)](https://builds.sr.ht/~ascent/drm_info/commits?)
+[![builds.sr.ht 
status](https://builds.sr.ht/~emersion/drm_info/commits/master.svg)](https://builds.sr.ht/~emersion/drm_info/commits/master)
 
 Small utility to dump info about DRM devices.
 
@@ -43,7 +43,7 @@
 from your GPU.
 
 ```
-drm_info -j | curl -X POST -d @- https://drmdb.emersion.fr/submit
+drm_info -j | curl -d @- https://drmdb.emersion.fr/submit
 ```
 
 This will upload information about your GPUs, your GPU drivers and your
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/drm_info.1.scd 
new/drm_info-v2.4.0/drm_info.1.scd
--- old/drm_info-2.3.0/drm_info.1.scd   1970-01-01 01:00:00.000000000 +0100
+++ new/drm_info-v2.4.0/drm_info.1.scd  2022-10-07 10:25:44.000000000 +0200
@@ -0,0 +1,28 @@
+drm_info(1)
+
+# NAME
+
+drm_info - dump information about DRM devices
+
+# SYNOPSIS
+
+*drm_info* [-j] [device]...
+
+# DESCRIPTION
+
+*drm_info* is a small utility to dump information about DRM devices.
+
+_device_ must be a path to a DRM device, e.g. "/dev/dri/card0". When omitted,
+all available devices are printed.
+
+# OPTIONS
+
+*-j*
+       Print information in JSON format. By default, the output will be
+       pretty-printed in a human-readable format.
+
+# AUTHORS
+
+Created by Scott Anderson <[email protected]>, maintained by
+Simon Ser <[email protected]>. For more information about drm_info
+development, see <https://gitlab.freedesktop.org/emersion/drm_info>.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/json.c new/drm_info-v2.4.0/json.c
--- old/drm_info-2.3.0/json.c   2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/json.c  2022-10-07 10:25:44.000000000 +0200
@@ -47,27 +47,6 @@
        { "SYNCOBJ_TIMELINE", DRM_CAP_SYNCOBJ_TIMELINE },
 };
 
-static int json_object_uint_to_json_string(struct json_object *obj,
-               struct printbuf *pb, int level, int flags)
-{
-       (void)level;
-       (void)flags;
-
-       uint64_t u = (uint64_t)json_object_get_int64(obj);
-
-       char buf[21]; // 20 digits + NULL byte
-       int len = snprintf(buf, sizeof(buf), "%" PRIu64, u);
-
-       return printbuf_memappend(pb, buf, len);
-}
-
-static struct json_object *new_json_object_uint64(uint64_t u)
-{
-       struct json_object *obj = json_object_new_int64((int64_t)u);
-       json_object_set_serializer(obj, json_object_uint_to_json_string, NULL, 
NULL);
-       return obj;
-}
-
 static struct json_object *kernel_info(void)
 {
        struct utsname utsname;
@@ -127,7 +106,7 @@
                struct json_object *cap_obj = NULL;
                uint64_t cap;
                if (drmGetCap(fd, caps[i].cap, &cap) == 0) {
-                       cap_obj = json_object_new_int64(cap);
+                       cap_obj = json_object_new_uint64(cap);
                }
                json_object_object_add(caps_obj, caps[i].name, cap_obj);
        }
@@ -146,9 +125,9 @@
 
        struct json_object *obj = json_object_new_object();
        json_object_object_add(obj, "available_nodes",
-               new_json_object_uint64(dev->available_nodes));
+               json_object_new_uint64(dev->available_nodes));
        json_object_object_add(obj, "bus_type",
-               new_json_object_uint64(dev->bustype));
+               json_object_new_uint64(dev->bustype));
 
        struct json_object *device_data_obj = NULL;
        switch (dev->bustype) {
@@ -156,21 +135,21 @@
                drmPciDeviceInfo *pci = dev->deviceinfo.pci;
                device_data_obj = json_object_new_object();
                json_object_object_add(device_data_obj, "vendor",
-                       new_json_object_uint64(pci->vendor_id));
+                       json_object_new_uint64(pci->vendor_id));
                json_object_object_add(device_data_obj, "device",
-                       new_json_object_uint64(pci->device_id));
+                       json_object_new_uint64(pci->device_id));
                json_object_object_add(device_data_obj, "subsystem_vendor",
-                       new_json_object_uint64(pci->subvendor_id));
+                       json_object_new_uint64(pci->subvendor_id));
                json_object_object_add(device_data_obj, "subsystem_device",
-                       new_json_object_uint64(pci->subdevice_id));
+                       json_object_new_uint64(pci->subdevice_id));
                break;
        case DRM_BUS_USB:;
                drmUsbDeviceInfo *usb = dev->deviceinfo.usb;
                device_data_obj = json_object_new_object();
                json_object_object_add(device_data_obj, "vendor",
-                       new_json_object_uint64(usb->vendor));
+                       json_object_new_uint64(usb->vendor));
                json_object_object_add(device_data_obj, "product",
-                       new_json_object_uint64(usb->product));
+                       json_object_new_uint64(usb->product));
                break;
        case DRM_BUS_PLATFORM:;
                drmPlatformDeviceInfo *platform = dev->deviceinfo.platform;
@@ -210,13 +189,13 @@
        for (uint32_t i = 0; i < data->count_modifiers; ++i) {
                struct json_object *mod_obj = json_object_new_object();
                json_object_object_add(mod_obj, "modifier",
-                       new_json_object_uint64(mods[i].modifier));
+                       json_object_new_uint64(mods[i].modifier));
 
                struct json_object *fmts_arr = json_object_new_array();
                for (uint64_t j = 0; j < 64; ++j) {
                        if (mods[i].formats & (1ull << j)) {
                                uint32_t fmt = fmts[j + mods[i].offset];
-                               json_object_array_add(fmts_arr, 
new_json_object_uint64(fmt));
+                               json_object_array_add(fmts_arr, 
json_object_new_uint64(fmt));
                        }
                }
                json_object_object_add(mod_obj, "formats", fmts_arr);
@@ -233,24 +212,24 @@
 {
        struct json_object *obj = json_object_new_object();
 
-       json_object_object_add(obj, "clock", 
new_json_object_uint64(mode->clock));
+       json_object_object_add(obj, "clock", 
json_object_new_uint64(mode->clock));
 
-       json_object_object_add(obj, "hdisplay", 
new_json_object_uint64(mode->hdisplay));
-       json_object_object_add(obj, "hsync_start", 
new_json_object_uint64(mode->hsync_start));
-       json_object_object_add(obj, "hsync_end", 
new_json_object_uint64(mode->hsync_end));
-       json_object_object_add(obj, "htotal", 
new_json_object_uint64(mode->htotal));
-       json_object_object_add(obj, "hskew", 
new_json_object_uint64(mode->hskew));
-
-       json_object_object_add(obj, "vdisplay", 
new_json_object_uint64(mode->vdisplay));
-       json_object_object_add(obj, "vsync_start", 
new_json_object_uint64(mode->vsync_start));
-       json_object_object_add(obj, "vsync_end", 
new_json_object_uint64(mode->vsync_end));
-       json_object_object_add(obj, "vtotal", 
new_json_object_uint64(mode->vtotal));
-       json_object_object_add(obj, "vscan", 
new_json_object_uint64(mode->vscan));
+       json_object_object_add(obj, "hdisplay", 
json_object_new_uint64(mode->hdisplay));
+       json_object_object_add(obj, "hsync_start", 
json_object_new_uint64(mode->hsync_start));
+       json_object_object_add(obj, "hsync_end", 
json_object_new_uint64(mode->hsync_end));
+       json_object_object_add(obj, "htotal", 
json_object_new_uint64(mode->htotal));
+       json_object_object_add(obj, "hskew", 
json_object_new_uint64(mode->hskew));
+
+       json_object_object_add(obj, "vdisplay", 
json_object_new_uint64(mode->vdisplay));
+       json_object_object_add(obj, "vsync_start", 
json_object_new_uint64(mode->vsync_start));
+       json_object_object_add(obj, "vsync_end", 
json_object_new_uint64(mode->vsync_end));
+       json_object_object_add(obj, "vtotal", 
json_object_new_uint64(mode->vtotal));
+       json_object_object_add(obj, "vscan", 
json_object_new_uint64(mode->vscan));
 
-       json_object_object_add(obj, "vrefresh", 
new_json_object_uint64(mode->vrefresh));
+       json_object_object_add(obj, "vrefresh", 
json_object_new_uint64(mode->vrefresh));
 
-       json_object_object_add(obj, "flags", 
new_json_object_uint64(mode->flags));
-       json_object_object_add(obj, "type", new_json_object_uint64(mode->type));
+       json_object_object_add(obj, "flags", 
json_object_new_uint64(mode->flags));
+       json_object_object_add(obj, "type", json_object_new_uint64(mode->type));
        json_object_object_add(obj, "name", json_object_new_string(mode->name));
 
        return obj;
@@ -286,7 +265,7 @@
        uint32_t *fmts = blob->data;
        uint32_t fmts_len = blob->length / sizeof(uint32_t);
        for (uint32_t i = 0; i < fmts_len; ++i) {
-               json_object_array_add(arr, new_json_object_uint64(fmts[i]));
+               json_object_array_add(arr, json_object_new_uint64(fmts[i]));
        }
 
        drmModeFreePropertyBlob(blob);
@@ -319,13 +298,13 @@
        }
        if (fb2) {
                struct json_object *obj = json_object_new_object();
-               json_object_object_add(obj, "id", 
new_json_object_uint64(fb2->fb_id));
-               json_object_object_add(obj, "width", 
new_json_object_uint64(fb2->width));
-               json_object_object_add(obj, "height", 
new_json_object_uint64(fb2->height));
+               json_object_object_add(obj, "id", 
json_object_new_uint64(fb2->fb_id));
+               json_object_object_add(obj, "width", 
json_object_new_uint64(fb2->width));
+               json_object_object_add(obj, "height", 
json_object_new_uint64(fb2->height));
 
-               json_object_object_add(obj, "format", 
new_json_object_uint64(fb2->pixel_format));
+               json_object_object_add(obj, "format", 
json_object_new_uint64(fb2->pixel_format));
                if (fb2->flags & DRM_MODE_FB_MODIFIERS) {
-                       json_object_object_add(obj, "modifier", 
new_json_object_uint64(fb2->modifier));
+                       json_object_object_add(obj, "modifier", 
json_object_new_uint64(fb2->modifier));
                }
 
                struct json_object *planes_arr = json_object_new_array();
@@ -339,9 +318,9 @@
                        json_object_array_add(planes_arr, plane_obj);
 
                        json_object_object_add(plane_obj, "offset",
-                               new_json_object_uint64(fb2->offsets[i]));
+                               json_object_new_uint64(fb2->offsets[i]));
                        json_object_object_add(plane_obj, "pitch",
-                               new_json_object_uint64(fb2->pitches[i]));
+                               json_object_new_uint64(fb2->pitches[i]));
                }
 
                drmModeFreeFB2(fb2);
@@ -358,14 +337,14 @@
        }
 
        struct json_object *obj = json_object_new_object();
-       json_object_object_add(obj, "id", new_json_object_uint64(fb->fb_id));
-       json_object_object_add(obj, "width", new_json_object_uint64(fb->width));
-       json_object_object_add(obj, "height", 
new_json_object_uint64(fb->height));
+       json_object_object_add(obj, "id", json_object_new_uint64(fb->fb_id));
+       json_object_object_add(obj, "width", json_object_new_uint64(fb->width));
+       json_object_object_add(obj, "height", 
json_object_new_uint64(fb->height));
 
        // Legacy properties
-       json_object_object_add(obj, "pitch", new_json_object_uint64(fb->pitch));
-       json_object_object_add(obj, "bpp", new_json_object_uint64(fb->bpp));
-       json_object_object_add(obj, "depth", new_json_object_uint64(fb->depth));
+       json_object_object_add(obj, "pitch", json_object_new_uint64(fb->pitch));
+       json_object_object_add(obj, "bpp", json_object_new_uint64(fb->bpp));
+       json_object_object_add(obj, "depth", json_object_new_uint64(fb->depth));
 
        drmModeFreeFB(fb);
 
@@ -399,26 +378,26 @@
 
                struct json_object *prop_obj = json_object_new_object();
                json_object_object_add(prop_obj, "id",
-                       new_json_object_uint64(prop->prop_id));
+                       json_object_new_uint64(prop->prop_id));
                json_object_object_add(prop_obj, "flags",
-                       new_json_object_uint64(flags));
-               json_object_object_add(prop_obj, "type", 
new_json_object_uint64(type));
+                       json_object_new_uint64(flags));
+               json_object_object_add(prop_obj, "type", 
json_object_new_uint64(type));
                json_object_object_add(prop_obj, "atomic",
                        json_object_new_boolean(atomic));
                json_object_object_add(prop_obj, "immutable",
                        json_object_new_boolean(immutable));
 
                json_object_object_add(prop_obj, "raw_value",
-                       new_json_object_uint64(value));
+                       json_object_new_uint64(value));
 
                struct json_object *spec_obj = NULL;
                switch (type) {
                case DRM_MODE_PROP_RANGE:
                        spec_obj = json_object_new_object();
                        json_object_object_add(spec_obj, "min",
-                               new_json_object_uint64(prop->values[0]));
+                               json_object_new_uint64(prop->values[0]));
                        json_object_object_add(spec_obj, "max",
-                               new_json_object_uint64(prop->values[1]));
+                               json_object_new_uint64(prop->values[1]));
                        break;
                case DRM_MODE_PROP_ENUM:
                case DRM_MODE_PROP_BITMASK:
@@ -428,12 +407,12 @@
                                json_object_object_add(item_obj, "name",
                                        
json_object_new_string(prop->enums[j].name));
                                json_object_object_add(item_obj, "value",
-                                       
new_json_object_uint64(prop->enums[j].value));
+                                       
json_object_new_uint64(prop->enums[j].value));
                                json_object_array_add(spec_obj, item_obj);
                        }
                        break;
                case DRM_MODE_PROP_OBJECT:
-                       spec_obj = new_json_object_uint64(prop->values[0]);
+                       spec_obj = json_object_new_uint64(prop->values[0]);
                        break;
                case DRM_MODE_PROP_SIGNED_RANGE:
                        spec_obj = json_object_new_object();
@@ -451,7 +430,7 @@
                case DRM_MODE_PROP_ENUM:
                case DRM_MODE_PROP_BITMASK:
                case DRM_MODE_PROP_OBJECT:
-                       value_obj = new_json_object_uint64(value);
+                       value_obj = json_object_new_uint64(value);
                        break;
                case DRM_MODE_PROP_BLOB:
                        // TODO: base64-encode blob contents
@@ -483,7 +462,7 @@
                        // This is a special case, as the SRC_* properties are
                        // in 16.16 fixed point
                        if (strncmp(prop->name, "SRC_", 4) == 0) {
-                               data_obj = new_json_object_uint64(value >> 16);
+                               data_obj = json_object_new_uint64(value >> 16);
                        }
                        break;
                case DRM_MODE_PROP_OBJECT:
@@ -512,33 +491,33 @@
        struct json_object *arr = json_object_new_array();
 
        for (int i = 0; i < res->count_connectors; ++i) {
-               drmModeConnector *conn = drmModeGetConnector(fd, 
res->connectors[i]);
+               drmModeConnector *conn = drmModeGetConnectorCurrent(fd, 
res->connectors[i]);
                if (!conn) {
-                       perror("drmModeGetConnector");
+                       perror("drmModeGetConnectorCurrent");
                        continue;
                }
 
                struct json_object *conn_obj = json_object_new_object();
 
                json_object_object_add(conn_obj, "id",
-                       new_json_object_uint64(conn->connector_id));
+                       json_object_new_uint64(conn->connector_id));
                json_object_object_add(conn_obj, "type",
-                       new_json_object_uint64(conn->connector_type));
+                       json_object_new_uint64(conn->connector_type));
                json_object_object_add(conn_obj, "status",
-                       new_json_object_uint64(conn->connection));
+                       json_object_new_uint64(conn->connection));
                json_object_object_add(conn_obj, "phy_width",
-                       new_json_object_uint64(conn->mmWidth));
+                       json_object_new_uint64(conn->mmWidth));
                json_object_object_add(conn_obj, "phy_height",
-                       new_json_object_uint64(conn->mmHeight));
+                       json_object_new_uint64(conn->mmHeight));
                json_object_object_add(conn_obj, "subpixel",
-                       new_json_object_uint64(conn->subpixel));
+                       json_object_new_uint64(conn->subpixel));
                json_object_object_add(conn_obj, "encoder_id",
-                       new_json_object_uint64(conn->encoder_id));
+                       json_object_new_uint64(conn->encoder_id));
 
                struct json_object *encoders_arr = json_object_new_array();
                for (int j = 0; j < conn->count_encoders; ++j) {
                        json_object_array_add(encoders_arr,
-                               new_json_object_uint64(conn->encoders[j]));
+                               json_object_new_uint64(conn->encoders[j]));
                }
                json_object_object_add(conn_obj, "encoders", encoders_arr);
 
@@ -575,15 +554,15 @@
                struct json_object *enc_obj = json_object_new_object();
 
                json_object_object_add(enc_obj, "id",
-                       new_json_object_uint64(enc->encoder_id));
+                       json_object_new_uint64(enc->encoder_id));
                json_object_object_add(enc_obj, "type",
-                       new_json_object_uint64(enc->encoder_type));
+                       json_object_new_uint64(enc->encoder_type));
                json_object_object_add(enc_obj, "crtc_id",
-                       new_json_object_uint64(enc->crtc_id));
+                       json_object_new_uint64(enc->crtc_id));
                json_object_object_add(enc_obj, "possible_crtcs",
-                       new_json_object_uint64(enc->possible_crtcs));
+                       json_object_new_uint64(enc->possible_crtcs));
                json_object_object_add(enc_obj, "possible_clones",
-                       new_json_object_uint64(enc->possible_clones));
+                       json_object_new_uint64(enc->possible_clones));
 
                drmModeFreeEncoder(enc);
 
@@ -607,13 +586,13 @@
                struct json_object *crtc_obj = json_object_new_object();
 
                json_object_object_add(crtc_obj, "id",
-                       new_json_object_uint64(crtc->crtc_id));
+                       json_object_new_uint64(crtc->crtc_id));
                json_object_object_add(crtc_obj, "fb_id",
-                       new_json_object_uint64(crtc->buffer_id));
+                       json_object_new_uint64(crtc->buffer_id));
                json_object_object_add(crtc_obj, "x",
-                       new_json_object_uint64(crtc->x));
+                       json_object_new_uint64(crtc->x));
                json_object_object_add(crtc_obj, "y",
-                       new_json_object_uint64(crtc->y));
+                       json_object_new_uint64(crtc->y));
                if (crtc->mode_valid) {
                        json_object_object_add(crtc_obj, "mode", 
mode_info(&crtc->mode));
                } else {
@@ -654,23 +633,23 @@
                struct json_object *plane_obj = json_object_new_object();
 
                json_object_object_add(plane_obj, "id",
-                       new_json_object_uint64(plane->plane_id));
+                       json_object_new_uint64(plane->plane_id));
                json_object_object_add(plane_obj, "possible_crtcs",
-                       new_json_object_uint64(plane->possible_crtcs));
+                       json_object_new_uint64(plane->possible_crtcs));
                json_object_object_add(plane_obj, "crtc_id",
-                       new_json_object_uint64(plane->crtc_id));
+                       json_object_new_uint64(plane->crtc_id));
                json_object_object_add(plane_obj, "fb_id",
-                       new_json_object_uint64(plane->fb_id));
+                       json_object_new_uint64(plane->fb_id));
                json_object_object_add(plane_obj, "crtc_x",
-                       new_json_object_uint64(plane->crtc_x));
+                       json_object_new_uint64(plane->crtc_x));
                json_object_object_add(plane_obj, "crtc_y",
-                       new_json_object_uint64(plane->crtc_y));
+                       json_object_new_uint64(plane->crtc_y));
                json_object_object_add(plane_obj, "x",
-                       new_json_object_uint64(plane->x));
+                       json_object_new_uint64(plane->x));
                json_object_object_add(plane_obj, "y",
-                       new_json_object_uint64(plane->y));
+                       json_object_new_uint64(plane->y));
                json_object_object_add(plane_obj, "gamma_size",
-                       new_json_object_uint64(plane->gamma_size));
+                       json_object_new_uint64(plane->gamma_size));
 
                json_object_object_add(plane_obj, "fb",
                        plane->fb_id ? fb_info(fd, plane->fb_id) : NULL);
@@ -678,7 +657,7 @@
                struct json_object *formats_arr = json_object_new_array();
                for (uint32_t j = 0; j < plane->count_formats; ++j) {
                        json_object_array_add(formats_arr,
-                               new_json_object_uint64(plane->formats[j]));
+                               json_object_new_uint64(plane->formats[j]));
                }
                json_object_object_add(plane_obj, "formats", formats_arr);
 
@@ -722,13 +701,13 @@
 
        struct json_object *fb_size_obj = json_object_new_object();
        json_object_object_add(fb_size_obj, "min_width",
-               new_json_object_uint64(res->min_width));
+               json_object_new_uint64(res->min_width));
        json_object_object_add(fb_size_obj, "max_width",
-               new_json_object_uint64(res->max_width));
+               json_object_new_uint64(res->max_width));
        json_object_object_add(fb_size_obj, "min_height",
-               new_json_object_uint64(res->min_height));
+               json_object_new_uint64(res->min_height));
        json_object_object_add(fb_size_obj, "max_height",
-               new_json_object_uint64(res->max_height));
+               json_object_new_uint64(res->max_height));
        json_object_object_add(obj, "fb_size", fb_size_obj);
 
        json_object_object_add(obj, "connectors", connectors_info(fd, res));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/meson.build 
new/drm_info-v2.4.0/meson.build
--- old/drm_info-2.3.0/meson.build      2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/meson.build     2022-10-07 10:25:44.000000000 +0200
@@ -1,5 +1,5 @@
 project('drm_info', 'c',
-  version: '2.3.0',
+  version: '2.4.0',
   license: 'MIT',
   meson_version: '>=0.49.0',
   default_options: [
@@ -12,26 +12,25 @@
 
 add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c')
 
-jsonc = dependency('json-c', version: '>=0.13', fallback: ['json-c', 'json_c'])
+jsonc = dependency('json-c', version: '>=0.14', fallback: ['json-c', 
'json_c_dep'])
 libpci = dependency('libpci', required: get_option('libpci'))
 libdrm = dependency('libdrm',
   fallback: ['libdrm', 'ext_libdrm'],
   default_options: [
-    'libkms=false',
-    'intel=false',
-    'radeon=false',
-    'amdgpu=false',
-    'nouveau=false',
-    'vmwgfx=false',
-    'omap=false',
-    'exynos=false',
-    'freedreno=false',
-    'tegra=false',
-    'vc4=false',
-    'etnaviv=false',
-    'cairo-tests=false',
-    'man-pages=false',
-    'valgrind=false',
+    'intel=disabled',
+    'radeon=disabled',
+    'amdgpu=disabled',
+    'nouveau=disabled',
+    'vmwgfx=disabled',
+    'omap=disabled',
+    'exynos=disabled',
+    'freedreno=disabled',
+    'tegra=disabled',
+    'vc4=disabled',
+    'etnaviv=disabled',
+    'cairo-tests=disabled',
+    'man-pages=disabled',
+    'valgrind=disabled',
   ],
 )
 
@@ -42,7 +41,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.104')
+if libdrm.version().version_compare('<2.4.113')
   if libdrm.type_name() == 'internal'
     error('libdrm subproject out of date. Run `meson subprojects update`.')
   endif
@@ -56,13 +55,13 @@
     warning(s)
   endforeach
 
-  fourcc_h = files('subprojects/libdrm/include/drm/drm_fourcc.h')
+  fourcc_h = meson.current_source_dir() / 
'subprojects/libdrm/include/drm/drm_fourcc.h'
   inc += include_directories('subprojects/libdrm/include/drm')
   libdrm = libdrm.partial_dependency(link_args: true)
 elif libdrm.type_name() == 'internal'
-  fourcc_h = files('subprojects/libdrm/include/drm/drm_fourcc.h')
+  fourcc_h = meson.current_source_dir() / 
'subprojects/libdrm/include/drm/drm_fourcc.h'
 else
-  fourcc_h = files(libdrm.get_pkgconfig_variable('includedir') / 
'libdrm/drm_fourcc.h')
+  fourcc_h = libdrm.get_pkgconfig_variable('includedir') / 
'libdrm/drm_fourcc.h'
 endif
 
 if libpci.found()
@@ -80,8 +79,31 @@
   command : [python3, files('fourcc.py'), fourcc_h, '@OUTPUT@'])
 
 executable('drm_info',
-  [files('main.c', 'modifiers.c', 'json.c', 'pretty.c'), tables_c],
+  ['main.c', 'modifiers.c', 'json.c', 'pretty.c', tables_c],
   include_directories: inc,
   dependencies: [libdrm, libpci, jsonc],
   install: true,
 )
+
+scdoc = dependency('scdoc', native: true, required: get_option('man-pages'))
+if scdoc.found()
+  man_pages = ['drm_info.1.scd']
+  sh = find_program('sh', native: true)
+
+  foreach src : man_pages
+    topic = src.split('.')[0]
+    section = src.split('.')[1]
+    output = topic + '.' + section
+
+    custom_target(
+      output,
+      input: src,
+      output: output,
+      command: [
+        sh, '-c', '@0@ < @INPUT@ > 
@1@'.format(scdoc.get_pkgconfig_variable('scdoc'), output)
+      ],
+      install: true,
+      install_dir: get_option('mandir') / 'man' + section
+    )
+  endforeach
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/meson_options.txt 
new/drm_info-v2.4.0/meson_options.txt
--- old/drm_info-2.3.0/meson_options.txt        2021-03-16 08:52:00.000000000 
+0100
+++ new/drm_info-v2.4.0/meson_options.txt       2022-10-07 10:25:44.000000000 
+0200
@@ -3,3 +3,8 @@
   value: 'auto',
   description: 'Print PCI device names via libpci'
 )
+option('man-pages',
+  type: 'feature',
+  value: 'auto',
+  description: 'Generate and install man pages'
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/modifiers.c 
new/drm_info-v2.4.0/modifiers.c
--- old/drm_info-2.3.0/modifiers.c      2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/modifiers.c     2022-10-07 10:25:44.000000000 +0200
@@ -145,6 +145,18 @@
        return "Unknown";
 }
 
+static const char *arm_afrc_cu_size_str(uint64_t cu_size) {
+       switch (cu_size) {
+       case AFRC_FORMAT_MOD_CU_SIZE_16:
+               return "16";
+       case AFRC_FORMAT_MOD_CU_SIZE_24:
+               return "24";
+       case AFRC_FORMAT_MOD_CU_SIZE_32:
+               return "32";
+       }
+       return "Unknown";
+}
+
 static void print_arm_modifier(uint64_t mod) {
        uint64_t type = (mod >> 52) & 0xF;
        uint64_t value = mod & 0x000FFFFFFFFFFFFFULL;
@@ -191,6 +203,18 @@
                        printf("ARM_MISC(unknown)");
                }
                break;
+       case DRM_FORMAT_MOD_ARM_TYPE_AFRC:;
+               uint64_t cu_size_p0 = value & AFRC_FORMAT_MOD_CU_SIZE_MASK;
+               uint64_t cu_size_p12 = (value >> 4) & 
AFRC_FORMAT_MOD_CU_SIZE_MASK;
+               printf("ARM_AFRC(");
+               printf("CU_SIZE_P0 = %s", arm_afrc_cu_size_str(cu_size_p0));
+               printf(", CU_SIZE_P12 = %s", arm_afrc_cu_size_str(cu_size_p12));
+               if (value & AFRC_FORMAT_MOD_LAYOUT_SCAN)
+                       printf(", SCAN");
+               else
+                       printf(", ROT");
+               printf(")");
+               break;
        default:
                printf("ARM(unknown)");
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/pretty.c new/drm_info-v2.4.0/pretty.c
--- old/drm_info-2.3.0/pretty.c 2021-03-16 08:52:00.000000000 +0100
+++ new/drm_info-v2.4.0/pretty.c        2022-10-07 10:25:44.000000000 +0200
@@ -20,11 +20,6 @@
 #define L_LAST "└───"
 #define L_GAP  "    "
 
-static uint64_t get_object_uint64(struct json_object *obj)
-{
-       return (uint64_t)json_object_get_int64(obj);
-}
-
 static const char *get_object_object_string(struct json_object *obj,
                const char *key)
 {
@@ -42,7 +37,7 @@
        if (!uint64_obj) {
                return 0;
        }
-       return get_object_uint64(uint64_obj);
+       return json_object_get_uint64(uint64_obj);
 }
 
 static void print_driver(struct json_object *obj)
@@ -74,7 +69,7 @@
                        printf("DRM_CAP_%s not supported\n", iter.key);
                } else {
                        printf("DRM_CAP_%s = %"PRIu64"\n", iter.key,
-                               get_object_uint64(iter.val));
+                               json_object_get_uint64(iter.val));
                }
        }
 }
@@ -341,7 +336,7 @@
                printf("\n");
                for (size_t j = 0; j < json_object_array_length(formats_arr); 
++j) {
                        bool fmt_last = j == 
json_object_array_length(formats_arr) - 1;
-                       uint32_t fmt = get_object_uint64(
+                       uint32_t fmt = json_object_get_uint64(
                                json_object_array_get_idx(formats_arr, j));
                        printf("%s%s%s%s (0x%08"PRIx32")\n", prefix, last ? 
L_GAP : L_LINE,
                                fmt_last ? L_LAST : L_VAL, format_str(fmt), 
fmt);
@@ -361,7 +356,7 @@
 {
        for (size_t i = 0; i < json_object_array_length(arr); ++i) {
                bool last = i == json_object_array_length(arr) - 1;
-               uint32_t fmt = get_object_uint64(json_object_array_get_idx(arr, 
i));
+               uint32_t fmt = 
json_object_get_uint64(json_object_array_get_idx(arr, i));
                printf("%s%s%s (0x%08"PRIx32")\n", prefix, last ? L_LAST : 
L_VAL,
                        format_str(fmt), fmt);
        }
@@ -392,21 +387,21 @@
                width, height);
 
        if (has_legacy) {
-               printf("%s" L_VAL "Pitch: %"PRIu32"\n", prefix,
-                       (uint32_t)get_object_uint64(pitch_obj));
+               printf("%s" L_VAL "Pitch: %"PRIu32" bytes\n", prefix,
+                       (uint32_t)json_object_get_uint64(pitch_obj));
                printf("%s" L_VAL "Bits per pixel: %"PRIu32"\n", prefix,
-                       (uint32_t)get_object_uint64(bpp_obj));
+                       (uint32_t)json_object_get_uint64(bpp_obj));
                printf("%s%sDepth: %"PRIu32"\n", prefix, format_obj ? L_VAL : 
L_LAST,
-                       (uint32_t)get_object_uint64(depth_obj));
+                       (uint32_t)json_object_get_uint64(depth_obj));
        }
        if (format_obj) {
                bool last = !modifier_obj && !planes_arr;
-               uint32_t fmt = (uint32_t)get_object_uint64(format_obj);
+               uint32_t fmt = (uint32_t)json_object_get_uint64(format_obj);
                printf("%s%sFormat: %s (0x%08"PRIx32")\n", prefix,
                        last ? L_LAST : L_VAL, format_str(fmt), fmt);
        }
        if (modifier_obj) {
-               uint64_t mod = get_object_uint64(modifier_obj);
+               uint64_t mod = json_object_get_uint64(modifier_obj);
                printf("%s%sModifier: ", prefix, planes_arr ? L_VAL : L_LAST);
                print_modifier(mod);
                printf("\n");
@@ -420,8 +415,8 @@
                        uint64_t offset = get_object_object_uint64(plane_obj, 
"offset");
                        uint64_t pitch = get_object_object_uint64(plane_obj, 
"pitch");
                        printf("%s" L_GAP "%sPlane %zu: "
-                               "offset = %"PRIu64", pitch = %"PRIu64"\n",
-                               prefix, last ? L_LAST : L_LINE, i, offset, 
pitch);
+                               "offset = %"PRIu64", pitch = %"PRIu64" bytes\n",
+                               prefix, last ? L_LAST : L_VAL, i, offset, 
pitch);
                }
        }
 }
@@ -479,9 +474,9 @@
                                printf("%"PRIu64"]", max);
 
                        if (data_obj != NULL)
-                               printf(" = %"PRIu64"\n", 
get_object_uint64(data_obj));
+                               printf(" = %"PRIu64"\n", 
json_object_get_uint64(data_obj));
                        else
-                               printf(" = %"PRIu64"\n", 
get_object_uint64(val_obj));
+                               printf(" = %"PRIu64"\n", 
json_object_get_uint64(val_obj));
                        break;
                case DRM_MODE_PROP_ENUM:
                        printf("enum {");
@@ -557,7 +552,7 @@
                        printf(")\n");
                        break;
                case DRM_MODE_PROP_OBJECT:;
-                       uint32_t obj_type = get_object_uint64(spec_obj);
+                       uint32_t obj_type = json_object_get_uint64(spec_obj);
                        printf("object %s = %"PRIu64"\n", obj_str(obj_type), 
raw_val);
                        if (!data_obj)
                                break;
@@ -706,7 +701,7 @@
                bool first = true;
                printf(L_LINE "%s" L_VAL "Encoders: {", last ? L_GAP : L_LINE);
                for (size_t j = 0; j < json_object_array_length(encs_arr); ++j) 
{
-                       uint32_t enc_id = get_object_uint64(
+                       uint32_t enc_id = json_object_get_uint64(
                                json_object_array_get_idx(encs_arr, j));
                        printf("%s%zi", first ? "" : ", ",
                                find_encoder_index(encoders_arr, enc_id));
@@ -784,28 +779,30 @@
        for (size_t i = 0; i < json_object_array_length(arr); ++i) {
                struct json_object *obj = json_object_array_get_idx(arr, i);
                bool last = i == json_object_array_length(arr) - 1;
+               const char *prefix = last ? L_LINE L_GAP : L_LINE L_LINE;
 
                uint32_t id = get_object_object_uint64(obj, "id");
                struct json_object *props_obj = json_object_object_get(obj, 
"properties");
 
                printf(L_LINE "%sCRTC %zu\n", last ? L_LAST : L_VAL, i);
 
-               printf(L_LINE "%s" L_VAL "Object ID: %"PRIu32"\n",
-                       last ? L_GAP : L_LINE, id);
+               printf("%s" L_VAL "Object ID: %"PRIu32"\n", prefix, id);
+
+               printf("%s" L_VAL "Legacy info\n", prefix);
 
                struct json_object *mode_obj = json_object_object_get(obj, 
"mode");
                if (mode_obj) {
-                       printf(L_LINE "%s" L_VAL "Mode: ", last ? L_GAP : 
L_LINE);
+                       printf("%s" L_LINE L_VAL "Mode: ", prefix);
                        print_mode(mode_obj);
                        printf("\n");
                }
 
                struct json_object *gamma_size_obj =
                        json_object_object_get(obj, "gamma_size");
-               printf(L_LINE "%s" L_VAL "Gamma size: %d\n",
-                       last ? L_GAP : L_LINE, 
json_object_get_int(gamma_size_obj));
+               printf("%s" L_LINE L_LAST "Gamma size: %d\n", prefix,
+                       json_object_get_int(gamma_size_obj));
 
-               print_properties(props_obj, last ? L_LINE L_GAP : L_LINE 
L_LINE);
+               print_properties(props_obj, prefix);
        }
 }
 
@@ -815,6 +812,7 @@
        for (size_t i = 0; i < json_object_array_length(arr); ++i) {
                struct json_object *obj = json_object_array_get_idx(arr, i);
                bool last = i == json_object_array_length(arr) - 1;
+               const char *prefix = last ? L_GAP L_GAP : L_GAP L_LINE;
 
                uint32_t id = get_object_object_uint64(obj, "id");
                uint32_t crtcs = get_object_object_uint64(obj, 
"possible_crtcs");
@@ -825,30 +823,33 @@
 
                printf(L_GAP "%sPlane %zu\n", last ? L_LAST : L_VAL, i);
 
-               printf(L_GAP "%s" L_VAL "Object ID: %"PRIu32"\n",
-                       last ? L_GAP : L_LINE, id);
-               printf(L_GAP "%s" L_VAL "CRTCs: ", last ? L_GAP : L_LINE);
+               printf("%s" L_VAL "Object ID: %"PRIu32"\n", prefix, id);
+               printf("%s" L_VAL "CRTCs: ", prefix);
                print_bitmask(crtcs);
                printf("\n");
 
-               printf(L_GAP "%s" L_VAL "FB ID: %"PRIu32"\n",
-                       last ? L_GAP : L_LINE, fb_id);
+               printf("%s" L_VAL "Legacy info\n", prefix);
+
+               char sub_prefix[strlen(prefix) + 2 * strlen(L_LINE) + 1];
+               snprintf(sub_prefix, sizeof(sub_prefix), "%s" L_LINE L_LINE, 
prefix);
+
+               printf("%s" L_LINE L_VAL "FB ID: %"PRIu32"\n", prefix, fb_id);
                if (fb_obj) {
-                       print_fb(fb_obj, last ? L_GAP L_GAP L_LINE : L_GAP 
L_LINE L_LINE);
+                       print_fb(fb_obj, sub_prefix);
                }
 
-               printf(L_GAP "%s" L_VAL "Formats:\n", last ? L_GAP : L_LINE);
+               printf("%s" L_LINE L_LAST "Formats:\n", prefix);
                for (size_t j = 0; j < json_object_array_length(formats_arr); 
++j) {
-                       uint32_t fmt = get_object_uint64(
+                       uint32_t fmt = json_object_get_uint64(
                                json_object_array_get_idx(formats_arr, j));
                        bool fmt_last = j == 
json_object_array_length(formats_arr) - 1;
 
-                       printf(L_GAP "%s" L_LINE "%s%s (0x%08"PRIx32")\n", last 
? L_GAP : L_LINE,
+                       printf("%s" L_LINE L_GAP "%s%s (0x%08"PRIx32")\n", 
prefix,
                                fmt_last ? L_LAST : L_VAL,
                                format_str(fmt), fmt);
                }
 
-               print_properties(props_obj, last ? L_GAP L_GAP : L_GAP L_LINE);
+               print_properties(props_obj, prefix);
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/subprojects/json-c.wrap 
new/drm_info-v2.4.0/subprojects/json-c.wrap
--- old/drm_info-2.3.0/subprojects/json-c.wrap  2021-03-16 08:52:00.000000000 
+0100
+++ new/drm_info-v2.4.0/subprojects/json-c.wrap 2022-10-07 10:25:44.000000000 
+0200
@@ -1,10 +1,12 @@
 [wrap-file]
-directory = json-c-0.13.1
+directory = json-c-0.16
+source_url = 
https://s3.amazonaws.com/json-c_releases/releases/json-c-0.16.tar.gz
+source_filename = json-c-0.16.tar.gz
+source_hash = 8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b
+patch_filename = json-c_0.16-3_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/json-c_0.16-3/get_patch
+patch_hash = 6e712826ba1e6e1b6d21c6157a764984fedc6b594c9f92443498b972b6377a94
+wrapdb_version = 0.16-3
 
-source_url = 
https://s3.amazonaws.com/json-c_releases/releases/json-c-0.13.1.tar.gz
-source_filename = json-c-0.13.1.tar.gz
-source_hash = b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873
-
-patch_url = 
https://github.com/mesonbuild/json-c/releases/download/0.13.1-1/json-c.zip
-patch_filename = json-c-0.13.1-1-wrap.zip
-patch_hash = 213a735c3c5f7ff4aa38850cd7bf236337c47fd553b9fcded64e709cab66b9fd
+[provide]
+json-c = json_c_dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drm_info-2.3.0/subprojects/libdrm.wrap 
new/drm_info-v2.4.0/subprojects/libdrm.wrap
--- old/drm_info-2.3.0/subprojects/libdrm.wrap  2021-03-16 08:52:00.000000000 
+0100
+++ new/drm_info-v2.4.0/subprojects/libdrm.wrap 2022-10-07 10:25:44.000000000 
+0200
@@ -1,4 +1,4 @@
 [wrap-git]
 url = https://gitlab.freedesktop.org/mesa/drm.git
-revision = libdrm-2.4.104
+revision = libdrm-2.4.113
 depth = 1

Reply via email to