Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libdrm/dist initial import of libdrm-2.4.112



details:   https://anonhg.NetBSD.org/xsrc/rev/37a776a9750e
branches:  trunk
changeset: 7047:37a776a9750e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 11 19:19:22 2022 +0000

description:
initial import of libdrm-2.4.112

diffstat:

 external/mit/libdrm/dist/.gitlab-ci.yml                    |     7 +-
 external/mit/libdrm/dist/RELEASING                         |     4 +-
 external/mit/libdrm/dist/amdgpu/amdgpu-symbols.txt         |     1 +
 external/mit/libdrm/dist/amdgpu/amdgpu_cs.c                |    22 +
 external/mit/libdrm/dist/amdgpu/meson.build                |     8 +-
 external/mit/libdrm/dist/core-symbols.txt                  |     2 +
 external/mit/libdrm/dist/data/amdgpu.ids                   |    17 +
 external/mit/libdrm/dist/etnaviv/meson.build               |     9 +-
 external/mit/libdrm/dist/exynos/meson.build                |     8 +-
 external/mit/libdrm/dist/freedreno/meson.build             |     8 +-
 external/mit/libdrm/dist/gen_table_fourcc.py               |     2 +-
 external/mit/libdrm/dist/include/drm/amdgpu_drm.h          |    32 +-
 external/mit/libdrm/dist/include/drm/tegra_drm.h           |   429 ++++-
 external/mit/libdrm/dist/intel/i915_pciids.h               |    24 +
 external/mit/libdrm/dist/intel/intel_chipset.c             |     3 +
 external/mit/libdrm/dist/intel/meson.build                 |     9 +-
 external/mit/libdrm/dist/man/drm-kms.7.rst                 |     4 +-
 external/mit/libdrm/dist/man/drm.7.rst                     |     2 +-
 external/mit/libdrm/dist/meson.build                       |   126 +-
 external/mit/libdrm/dist/meson_options.txt                 |     7 -
 external/mit/libdrm/dist/nouveau/meson.build               |     9 +-
 external/mit/libdrm/dist/nouveau/nouveau-symbols.txt       |     1 +
 external/mit/libdrm/dist/nouveau/nouveau.h                 |     4 +
 external/mit/libdrm/dist/nouveau/pushbuf.c                 |    16 +
 external/mit/libdrm/dist/omap/meson.build                  |     8 +-
 external/mit/libdrm/dist/radeon/meson.build                |     9 +-
 external/mit/libdrm/dist/tegra/channel.c                   |   195 ++
 external/mit/libdrm/dist/tegra/job.c                       |   187 ++
 external/mit/libdrm/dist/tegra/meson.build                 |    16 +-
 external/mit/libdrm/dist/tegra/private.h                   |    85 +-
 external/mit/libdrm/dist/tegra/pushbuf.c                   |   184 ++
 external/mit/libdrm/dist/tegra/syncpt.c                    |   101 +
 external/mit/libdrm/dist/tegra/tegra-symbols.txt           |    27 +-
 external/mit/libdrm/dist/tegra/tegra.c                     |   390 ++--
 external/mit/libdrm/dist/tegra/tegra.h                     |    95 +-
 external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.c        |    26 +
 external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.h        |    45 +-
 external/mit/libdrm/dist/tests/amdgpu/basic_tests.c        |   826 +++++++--
 external/mit/libdrm/dist/tests/amdgpu/cp_dma_tests.c       |   533 ++++++
 external/mit/libdrm/dist/tests/amdgpu/deadlock_tests.c     |    38 +-
 external/mit/libdrm/dist/tests/amdgpu/decode_messages.h    |    27 +
 external/mit/libdrm/dist/tests/amdgpu/hotunplug_tests.c    |    10 +-
 external/mit/libdrm/dist/tests/amdgpu/jpeg_tests.c         |   579 ++++++
 external/mit/libdrm/dist/tests/amdgpu/meson.build          |     2 +-
 external/mit/libdrm/dist/tests/amdgpu/security_tests.c     |     4 +-
 external/mit/libdrm/dist/tests/amdgpu/vce_tests.c          |     3 +-
 external/mit/libdrm/dist/tests/amdgpu/vcn_tests.c          |  1028 +++++++++++-
 external/mit/libdrm/dist/tests/exynos/exynos_fimg2d_test.c |     1 -
 external/mit/libdrm/dist/tests/exynos/meson.build          |    21 +-
 external/mit/libdrm/dist/tests/meson.build                 |     4 -
 external/mit/libdrm/dist/tests/modeprint/modeprint.c       |     4 +-
 external/mit/libdrm/dist/tests/nouveau/threaded.c          |     2 +-
 external/mit/libdrm/dist/tests/proptest/proptest.c         |     4 +-
 external/mit/libdrm/dist/tests/tegra/drm-test-tegra.c      |   147 +
 external/mit/libdrm/dist/tests/tegra/drm-test-tegra.h      |    55 +
 external/mit/libdrm/dist/tests/tegra/drm-test.c            |   248 ++
 external/mit/libdrm/dist/tests/tegra/drm-test.h            |    72 +
 external/mit/libdrm/dist/tests/tegra/gr2d-fill.c           |   146 +
 external/mit/libdrm/dist/tests/tegra/host1x.h              |    34 +
 external/mit/libdrm/dist/tests/tegra/meson.build           |    88 +-
 external/mit/libdrm/dist/tests/tegra/openclose.c           |    52 +-
 external/mit/libdrm/dist/tests/tegra/syncpt-timeout.c      |   163 +
 external/mit/libdrm/dist/tests/tegra/syncpt-wait.c         |   151 +
 external/mit/libdrm/dist/tests/tegra/vic-blit.c            |   333 +++
 external/mit/libdrm/dist/tests/tegra/vic-clear.c           |   173 ++
 external/mit/libdrm/dist/tests/tegra/vic-flip.c            |   333 +++
 external/mit/libdrm/dist/tests/tegra/vic.c                 |   184 ++
 external/mit/libdrm/dist/tests/tegra/vic.h                 |   181 ++
 external/mit/libdrm/dist/tests/tegra/vic30.c               |   458 +++++
 external/mit/libdrm/dist/tests/tegra/vic30.h               |   439 +++++
 external/mit/libdrm/dist/tests/tegra/vic40.c               |   338 +++
 external/mit/libdrm/dist/tests/tegra/vic40.h               |   285 +++
 external/mit/libdrm/dist/tests/tegra/vic41.c               |   342 +++
 external/mit/libdrm/dist/tests/tegra/vic41.h               |   372 ++++
 external/mit/libdrm/dist/tests/tegra/vic42.c               |   342 +++
 external/mit/libdrm/dist/tests/tegra/vic42.h               |   597 ++++++
 external/mit/libdrm/dist/tests/util/kms.c                  |    27 -
 external/mit/libdrm/dist/tests/util/kms.h                  |     1 -
 78 files changed, 10053 insertions(+), 716 deletions(-)

diffs (truncated from 12669 to 300 lines):

diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/.gitlab-ci.yml
--- a/external/mit/libdrm/dist/.gitlab-ci.yml   Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/.gitlab-ci.yml   Mon Jul 11 19:19:22 2022 +0000
@@ -41,10 +41,10 @@
     BUILD_OS: debian
     FDO_DISTRIBUTION_VERSION: buster
     FDO_DISTRIBUTION_PACKAGES: 'build-essential docbook-xsl libatomic-ops-dev libcairo2-dev libcunit1-dev libpciaccess-dev meson ninja-build pkg-config python3 python3-pip python3-wheel 
python3-setuptools python3-docutils valgrind'
-    FDO_DISTRIBUTION_EXEC: 'pip3 install meson==0.52.1'
+    FDO_DISTRIBUTION_EXEC: 'pip3 install meson==0.53.0'
     # bump this tag every time you change something which requires rebuilding the
     # base image
-    FDO_DISTRIBUTION_TAG: "2021-08-03.0"
+    FDO_DISTRIBUTION_TAG: "2022-01-19.0"
 
 .debian-x86_64:
   extends:
@@ -198,7 +198,6 @@
         -D freedreno=true
         -D freedreno-kgsl=true
         -D intel=true
-        -D libkms=true
         -D man-pages=true
         -D nouveau=true
         -D omap=true
@@ -228,7 +227,7 @@
     # the workspace to see details about the failed tests.
     - |
       set +e
-      /app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build -D amdgpu=true -D cairo-tests=true -D intel=true -D libkms=true -D man-pages=true -D nouveau=false -D radeon=true -D valgrind=auto 
&& ninja -C build"
+      /app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build -D amdgpu=true -D cairo-tests=true -D intel=true -D man-pages=true -D nouveau=false -D radeon=true -D valgrind=auto && ninja -C 
build"
       set -ex
       scp -r vm:$CI_PROJECT_NAME/build/meson-logs .
       /app/vmctl exec "ninja -C $CI_PROJECT_NAME/build install"
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/RELEASING
--- a/external/mit/libdrm/dist/RELEASING        Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/RELEASING        Mon Jul 11 19:19:22 2022 +0000
@@ -18,9 +18,9 @@
      builddir/meson-dist/ matches the number you bumped to. Move that
      tarball to the libdrm repo root for the release script to pick up.
 
-  3) Push the updated master branch with the bumped version number:
+  3) Push the updated main branch with the bumped version number:
 
-       git push origin master
+       git push origin main
 
      assuming the remote for the upstream libdrm repo is called origin.
 
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/amdgpu/amdgpu-symbols.txt
--- a/external/mit/libdrm/dist/amdgpu/amdgpu-symbols.txt        Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu-symbols.txt        Mon Jul 11 19:19:22 2022 +0000
@@ -25,6 +25,7 @@
 amdgpu_cs_ctx_create2
 amdgpu_cs_ctx_free
 amdgpu_cs_ctx_override_priority
+amdgpu_cs_ctx_stable_pstate
 amdgpu_cs_destroy_semaphore
 amdgpu_cs_destroy_syncobj
 amdgpu_cs_export_syncobj
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/amdgpu/amdgpu_cs.c
--- a/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c       Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c       Mon Jul 11 19:19:22 2022 +0000
@@ -167,6 +167,28 @@
        return 0;
 }
 
+drm_public int amdgpu_cs_ctx_stable_pstate(amdgpu_context_handle context,
+                                          uint32_t op,
+                                          uint32_t flags,
+                                          uint32_t *out_flags)
+{
+       union drm_amdgpu_ctx args;
+       int r;
+
+       if (!context)
+               return -EINVAL;
+
+       memset(&args, 0, sizeof(args));
+       args.in.op = op;
+       args.in.ctx_id = context->id;
+       args.in.flags = flags;
+       r = drmCommandWriteRead(context->dev->fd, DRM_AMDGPU_CTX,
+                               &args, sizeof(args));
+       if (!r && out_flags)
+               *out_flags = args.out.pstate.flags;
+       return r;
+}
+
 drm_public int amdgpu_cs_query_reset_state(amdgpu_context_handle context,
                                           uint32_t *state, uint32_t *hangs)
 {
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/amdgpu/meson.build
--- a/external/mit/libdrm/dist/amdgpu/meson.build       Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/amdgpu/meson.build       Mon Jul 11 19:19:22 2022 +0000
@@ -44,11 +44,9 @@
 install_headers('amdgpu.h', subdir : 'libdrm')
 
 pkg.generate(
+  libdrm_amdgpu,
   name : 'libdrm_amdgpu',
-  libraries : libdrm_amdgpu,
   subdirs : ['.', 'libdrm'],
-  version : meson.project_version(),
-  requires_private : 'libdrm',
   description : 'Userspace interface to kernel DRM services for amdgpu',
 )
 
@@ -57,6 +55,10 @@
   include_directories : [inc_drm, include_directories('.')],
 )
 
+if meson.version().version_compare('>= 0.54.0')
+  meson.override_dependency('libdrm_amdgpu', ext_libdrm_amdgpu)
+endif
+
 test(
   'amdgpu-symbols-check',
   symbols_check,
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/core-symbols.txt
--- a/external/mit/libdrm/dist/core-symbols.txt Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/core-symbols.txt Mon Jul 11 19:19:22 2022 +0000
@@ -103,6 +103,7 @@
 drmModeAtomicMerge
 drmModeAtomicSetCursor
 drmModeAttachMode
+drmModeConnectorGetPossibleCrtcs
 drmModeConnectorSetProperty
 drmModeCreateLease
 drmModeCreatePropertyBlob
@@ -126,6 +127,7 @@
 drmModeFreeResources
 drmModeGetConnector
 drmModeGetConnectorCurrent
+drmModeGetConnectorTypeName
 drmModeGetCrtc
 drmModeGetEncoder
 drmModeGetFB
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/data/amdgpu.ids
--- a/external/mit/libdrm/dist/data/amdgpu.ids  Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/data/amdgpu.ids  Mon Jul 11 19:19:22 2022 +0000
@@ -275,18 +275,35 @@
 7341,  00,     AMD Radeon Pro W5500
 7347,  00,     AMD Radeon Pro W5500M
 73A3,  00,     AMD Radeon Pro W6800
+73A5,  C0,     AMD Radeon RX 6950 XT
 73AF,  C0,     AMD Radeon RX 6900 XT
 73BF,  C0,     AMD Radeon RX 6900 XT
 73BF,  C1,     AMD Radeon RX 6800 XT
 73BF,  C3,     AMD Radeon RX 6800
+73DF,  C0,     AMD Radeon RX 6750 XT
 73DF,  C1,     AMD Radeon RX 6700 XT
 73DF,  C3,     AMD Radeon RX 6800M
 73DF,  C5,     AMD Radeon RX 6700 XT
 73DF,  CF,     AMD Radeon RX 6700M
 73E1,  00,     AMD Radeon Pro W6600M
 73E3,  00,     AMD Radeon Pro W6600
+73EF,  C0,     AMD Radeon RX 6800S
+73EF,  C1,     AMD Radeon RX 6650 XT
+73EF,  C2,     AMD Radeon RX 6700S
+73EF,  C3,     AMD Radeon RX 6650M
+73EF,  C4,     AMD Radeon RX 6650M XT
 73FF,  C1,     AMD Radeon RX 6600 XT
 73FF,  C3,     AMD Radeon RX 6600M
+73FF,  C7,     AMD Radeon RX 6600
+73FF,  CB,     AMD Radeon RX 6600S
+7421,  00,     AMD Radeon Pro W6500M
+7422,  00,     AMD Radeon PRO W6400
+7423,  00,     AMD Radeon Pro W6300M
+7424,  00,     AMD Radeon RX 6300
+743F,  C1,     AMD Radeon RX 6500 XT
+743F,  C3,     AMD Radeon RX 6500
+743F,  C7,     AMD Radeon RX 6400
+743F,  CF,     AMD Radeon RX 6300M
 9874,  C4,     AMD Radeon R7 Graphics
 9874,  C5,     AMD Radeon R6 Graphics
 9874,  C6,     AMD Radeon R6 Graphics
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/etnaviv/meson.build
--- a/external/mit/libdrm/dist/etnaviv/meson.build      Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/etnaviv/meson.build      Mon Jul 11 19:19:22 2022 +0000
@@ -31,6 +31,7 @@
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
   c_args : libdrm_c_args,
+  gnu_symbol_visibility : 'hidden',
   dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
   version : '1.0.0',
   install : true,
@@ -39,11 +40,9 @@
 install_headers('etnaviv_drmif.h', subdir : 'libdrm')
 
 pkg.generate(
+  libdrm_etnaviv,
   name : 'libdrm_etnaviv',
-  libraries : libdrm_etnaviv,
   subdirs : ['.', 'libdrm'],
-  version : meson.project_version(),
-  requires_private : 'libdrm',
   description : 'Userspace interface to Tegra kernel DRM services',
 )
 
@@ -52,6 +51,10 @@
   include_directories : [inc_drm, include_directories('.')],
 )
 
+if meson.version().version_compare('>= 0.54.0')
+  meson.override_dependency('libdrm_etnaviv', ext_libdrm_etnaviv)
+endif
+
 test(
   'etnaviv-symbols-check',
   symbols_check,
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/exynos/meson.build
--- a/external/mit/libdrm/dist/exynos/meson.build       Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/exynos/meson.build       Mon Jul 11 19:19:22 2022 +0000
@@ -22,6 +22,7 @@
   'drm_exynos',
   [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
   c_args : libdrm_c_args,
+  gnu_symbol_visibility : 'hidden',
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
   dependencies : [dep_pthread_stubs],
@@ -37,12 +38,15 @@
   include_directories : [inc_drm, include_directories('.')],
 )
 
+if meson.version().version_compare('>= 0.54.0')
+  meson.override_dependency('libdrm_exynos', ext_libdrm_exynos)
+endif
+
 pkg.generate(
+  libdrm_exynos,
   name : 'libdrm_exynos',
-  libraries : libdrm_exynos,
   subdirs : ['.', 'libdrm', 'exynos'],
   version : '0.7',
-  requires_private : 'libdrm',
   description : 'Userspace interface to exynos kernel DRM services',
 )
 
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/freedreno/meson.build
--- a/external/mit/libdrm/dist/freedreno/meson.build    Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/freedreno/meson.build    Mon Jul 11 19:19:22 2022 +0000
@@ -55,17 +55,19 @@
   include_directories : [inc_drm, include_directories('.')],
 )
 
+if meson.version().version_compare('>= 0.54.0')
+  meson.override_dependency('libdrm_freedreno', ext_libdrm_freedreno)
+endif
+
 install_headers(
   'freedreno_drmif.h', 'freedreno_ringbuffer.h',
   subdir : 'freedreno'
 )
 
 pkg.generate(
+  libdrm_freedreno,
   name : 'libdrm_freedreno',
-  libraries : libdrm_freedreno,
   subdirs : ['.', 'libdrm', 'freedreno'],
-  version : meson.project_version(),
-  requires_private : 'libdrm',
   description : 'Userspace interface to freedreno kernel DRM services',
 )
 
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/gen_table_fourcc.py
--- a/external/mit/libdrm/dist/gen_table_fourcc.py      Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/gen_table_fourcc.py      Mon Jul 11 19:19:22 2022 +0000
@@ -56,7 +56,7 @@
    that script instead of adding here entries manually! */
 static const struct drmFormatModifierInfo drm_format_modifier_table[] = {
 ''')
-    f.write('    { DRM_MODIFIER_INVALID(NONE, INVALID_MODIFIER) },\n')
+    f.write('    { DRM_MODIFIER_INVALID(NONE, INVALID) },\n')
     f.write('    { DRM_MODIFIER_LINEAR(NONE, LINEAR) },\n')
 
     for entry in fm_re['intel']:
diff -r 7a064e5e9f9a -r 37a776a9750e external/mit/libdrm/dist/include/drm/amdgpu_drm.h
--- a/external/mit/libdrm/dist/include/drm/amdgpu_drm.h Mon Jul 11 09:13:30 2022 +0000
+++ b/external/mit/libdrm/dist/include/drm/amdgpu_drm.h Mon Jul 11 19:19:22 2022 +0000
@@ -80,7 +80,7 @@
  *
  * %AMDGPU_GEM_DOMAIN_GTT      GPU accessible system memory, mapped into the
  * GPU's virtual address space via gart. Gart memory linearizes non-contiguous
- * pages of system memory, allows GPU access system memory in a linezrized
+ * pages of system memory, allows GPU access system memory in a linearized
  * fashion.
  *
  * %AMDGPU_GEM_DOMAIN_VRAM     Local video memory. For APUs, it is memory
@@ -206,6 +206,8 @@
 #define AMDGPU_CTX_OP_FREE_CTX 2
 #define AMDGPU_CTX_OP_QUERY_STATE      3
 #define AMDGPU_CTX_OP_QUERY_STATE2     4
+#define AMDGPU_CTX_OP_GET_STABLE_PSTATE        5
+#define AMDGPU_CTX_OP_SET_STABLE_PSTATE        6
 
 /* GPU reset status */
 #define AMDGPU_CTX_NO_RESET            0
@@ -238,10 +240,18 @@



Home | Main Index | Thread Index | Old Index