Source-Changes-HG archive

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

[xsrc/xorg]: xsrc/external/mit/libdrm/dist initial import of libdrm-2.4.100



details:   https://anonhg.NetBSD.org/xsrc/rev/2b4bff86a2e5
branches:  xorg
changeset: 10452:2b4bff86a2e5
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 23 09:57:41 2020 +0000

description:
initial import of libdrm-2.4.100

diffstat:

 external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check       |    3 +-
 external/mit/libdrm/dist/amdgpu/amdgpu.h                  |   15 +
 external/mit/libdrm/dist/amdgpu/amdgpu_cs.c               |   19 +
 external/mit/libdrm/dist/amdgpu/meson.build               |    4 +-
 external/mit/libdrm/dist/configure                        |   20 +-
 external/mit/libdrm/dist/configure.ac                     |    2 +-
 external/mit/libdrm/dist/etnaviv/etnaviv-symbol-check     |    2 +-
 external/mit/libdrm/dist/etnaviv/meson.build              |    5 +-
 external/mit/libdrm/dist/exynos/exynos-symbol-check       |    2 +-
 external/mit/libdrm/dist/exynos/meson.build               |    4 +-
 external/mit/libdrm/dist/freedreno/freedreno-symbol-check |    2 +-
 external/mit/libdrm/dist/freedreno/meson.build            |    4 +-
 external/mit/libdrm/dist/include/drm/amdgpu_drm.h         |   24 +-
 external/mit/libdrm/dist/intel/i915_pciids.h              |  205 ++++-
 external/mit/libdrm/dist/intel/intel-symbol-check         |    2 +-
 external/mit/libdrm/dist/intel/intel_chipset.c            |    2 +
 external/mit/libdrm/dist/intel/intel_chipset.h            |    1 +
 external/mit/libdrm/dist/intel/meson.build                |   22 +-
 external/mit/libdrm/dist/libkms/kms-symbol-check          |    2 +-
 external/mit/libdrm/dist/libkms/meson.build               |    4 +-
 external/mit/libdrm/dist/meson.build                      |   19 +-
 external/mit/libdrm/dist/nouveau/meson.build              |    4 +-
 external/mit/libdrm/dist/nouveau/nouveau-symbol-check     |    2 +-
 external/mit/libdrm/dist/omap/meson.build                 |    4 +-
 external/mit/libdrm/dist/omap/omap-symbol-check           |    2 +-
 external/mit/libdrm/dist/radeon/meson.build               |    4 +-
 external/mit/libdrm/dist/radeon/radeon-symbol-check       |    2 +-
 external/mit/libdrm/dist/tegra/meson.build                |    4 +-
 external/mit/libdrm/dist/tegra/tegra-symbol-check         |    2 +-
 external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.c       |   12 +-
 external/mit/libdrm/dist/tests/amdgpu/basic_tests.c       |   94 ++-
 external/mit/libdrm/dist/tests/amdgpu/bo_tests.c          |    3 +-
 external/mit/libdrm/dist/tests/amdgpu/ras_tests.c         |  478 ++++++++++++-
 external/mit/libdrm/dist/tests/util/pattern.c             |    2 +-
 external/mit/libdrm/dist/xf86drm.c                        |  138 +--
 external/mit/libdrm/dist/xf86drm.h                        |   24 +-
 36 files changed, 829 insertions(+), 309 deletions(-)

diffs (truncated from 2053 to 300 lines):

diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check
--- a/external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check       Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check       Sun Feb 23 09:57:41 2020 +0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -u
 
@@ -46,6 +46,7 @@
 amdgpu_cs_import_syncobj
 amdgpu_cs_query_fence_status
 amdgpu_cs_query_reset_state
+amdgpu_cs_query_reset_state2
 amdgpu_query_sw_info
 amdgpu_cs_signal_semaphore
 amdgpu_cs_submit
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/amdgpu/amdgpu.h
--- a/external/mit/libdrm/dist/amdgpu/amdgpu.h  Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu.h  Sun Feb 23 09:57:41 2020 +0000
@@ -942,6 +942,21 @@
 int amdgpu_cs_query_reset_state(amdgpu_context_handle context,
                                uint32_t *state, uint32_t *hangs);
 
+/**
+ * Query reset state for the specific GPU Context.
+ *
+ * \param   context - \c [in]  GPU Context handle
+ * \param   flags   - \c [out] A combination of AMDGPU_CTX_QUERY2_FLAGS_*
+ *
+ * \return   0 on success\n
+ *          <0 - Negative POSIX Error code
+ *
+ * \sa amdgpu_cs_ctx_create()
+ *
+*/
+int amdgpu_cs_query_reset_state2(amdgpu_context_handle context,
+                                uint64_t *flags);
+
 /*
  * Command Buffers Management
  *
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/amdgpu/amdgpu_cs.c
--- a/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c       Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c       Sun Feb 23 09:57:41 2020 +0000
@@ -188,6 +188,25 @@
        return r;
 }
 
+drm_public int amdgpu_cs_query_reset_state2(amdgpu_context_handle context,
+                                           uint64_t *flags)
+{
+       union drm_amdgpu_ctx args;
+       int r;
+
+       if (!context)
+               return -EINVAL;
+
+       memset(&args, 0, sizeof(args));
+       args.in.op = AMDGPU_CTX_OP_QUERY_STATE2;
+       args.in.ctx_id = context->id;
+       r = drmCommandWriteRead(context->dev->fd, DRM_AMDGPU_CTX,
+                               &args, sizeof(args));
+       if (!r)
+               *flags = args.out.state.flags;
+       return r;
+}
+
 /**
  * Submit command to kernel DRM
  * \param   dev - \c [in]  Device handle
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/amdgpu/meson.build
--- a/external/mit/libdrm/dist/amdgpu/meson.build       Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/amdgpu/meson.build       Sun Feb 23 09:57:41 2020 +0000
@@ -59,7 +59,7 @@
 
 test(
   'amdgpu-symbol-check',
-  prog_bash,
+  find_program('amdgpu-symbol-check'),
   env : env_test,
-  args : [files('amdgpu-symbol-check'), libdrm_amdgpu]
+  args : libdrm_amdgpu,
 )
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/configure
--- a/external/mit/libdrm/dist/configure        Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/configure        Sun Feb 23 09:57:41 2020 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libdrm 2.4.99.
+# Generated by GNU Autoconf 2.69 for libdrm 2.4.100.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=DRI>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='libdrm'
 PACKAGE_TARNAME='libdrm'
-PACKAGE_VERSION='2.4.99'
-PACKAGE_STRING='libdrm 2.4.99'
+PACKAGE_VERSION='2.4.100'
+PACKAGE_STRING='libdrm 2.4.100'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=DRI'
 PACKAGE_URL=''
 
@@ -1433,7 +1433,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libdrm 2.4.99 to adapt to many kinds of systems.
+\`configure' configures libdrm 2.4.100 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1504,7 +1504,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libdrm 2.4.99:";;
+     short | recursive ) echo "Configuration of libdrm 2.4.100:";;
    esac
   cat <<\_ACEOF
 
@@ -1676,7 +1676,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libdrm configure 2.4.99
+libdrm configure 2.4.100
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2099,7 +2099,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libdrm $as_me 2.4.99, which was
+It was created by libdrm $as_me 2.4.100, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3458,7 +3458,7 @@
 
 # Define the identity of the package.
  PACKAGE='libdrm'
- VERSION='2.4.99'
+ VERSION='2.4.100'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15314,7 +15314,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libdrm $as_me 2.4.99, which was
+This file was extended by libdrm $as_me 2.4.100, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15380,7 +15380,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libdrm config.status 2.4.99
+libdrm config.status 2.4.100
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/configure.ac
--- a/external/mit/libdrm/dist/configure.ac     Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/configure.ac     Sun Feb 23 09:57:41 2020 +0000
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.99],
+        [2.4.100],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/etnaviv/etnaviv-symbol-check
--- a/external/mit/libdrm/dist/etnaviv/etnaviv-symbol-check     Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/etnaviv/etnaviv-symbol-check     Sun Feb 23 09:57:41 2020 +0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -u
 
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/etnaviv/meson.build
--- a/external/mit/libdrm/dist/etnaviv/meson.build      Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/etnaviv/meson.build      Sun Feb 23 09:57:41 2020 +0000
@@ -54,6 +54,7 @@
 
 test(
   'etnaviv-symbol-check',
-  prog_bash,
-  args : [files('etnaviv-symbol-check'), libdrm_etnaviv]
+  find_program('etnaviv-symbol-check'),
+  env : env_test,
+  args : libdrm_etnaviv,
 )
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/exynos/exynos-symbol-check
--- a/external/mit/libdrm/dist/exynos/exynos-symbol-check       Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/exynos/exynos-symbol-check       Sun Feb 23 09:57:41 2020 +0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -u
 
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/exynos/meson.build
--- a/external/mit/libdrm/dist/exynos/meson.build       Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/exynos/meson.build       Sun Feb 23 09:57:41 2020 +0000
@@ -48,7 +48,7 @@
 
 test(
   'exynos-symbol-check',
-  prog_bash,
+  find_program('exynos-symbol-check'),
   env : env_test,
-  args : [files('exynos-symbol-check'), libdrm_exynos]
+  args : libdrm_exynos,
 )
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/freedreno/freedreno-symbol-check
--- a/external/mit/libdrm/dist/freedreno/freedreno-symbol-check Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/freedreno/freedreno-symbol-check Sun Feb 23 09:57:41 2020 +0000
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 set -u
 
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/freedreno/meson.build
--- a/external/mit/libdrm/dist/freedreno/meson.build    Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/freedreno/meson.build    Sun Feb 23 09:57:41 2020 +0000
@@ -71,7 +71,7 @@
 
 test(
   'freedreno-symbol-check',
-  prog_bash,
+  find_program('freedreno-symbol-check'),
   env : env_test,
-  args : [files('freedreno-symbol-check'), libdrm_freedreno]
+  args : libdrm_freedreno,
 )
diff -r 10a15db304c5 -r 2b4bff86a2e5 external/mit/libdrm/dist/include/drm/amdgpu_drm.h
--- a/external/mit/libdrm/dist/include/drm/amdgpu_drm.h Sun Feb 23 09:37:04 2020 +0000
+++ b/external/mit/libdrm/dist/include/drm/amdgpu_drm.h Sun Feb 23 09:57:41 2020 +0000
@@ -128,6 +128,10 @@
  * for the second page onward should be set to NC.
  */
 #define AMDGPU_GEM_CREATE_MQD_GFX9             (1 << 8)
+/* Flag that BO may contain sensitive data that must be wiped before
+ * releasing the memory
+ */
+#define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9)
 
 struct drm_amdgpu_gem_create_in  {
        /** the requested memory size */
@@ -204,9 +208,9 @@
 /* unknown cause */
 #define AMDGPU_CTX_UNKNOWN_RESET       3
 
-/* indicate gpu reset occurred after ctx created */
+/* indicate gpu reset occured after ctx created */
 #define AMDGPU_CTX_QUERY2_FLAGS_RESET    (1<<0)
-/* indicate vram lost occurred after ctx created */
+/* indicate vram lost occured after ctx created */
 #define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1)
 /* indicate some job from this context once cause gpu hang */
 #define AMDGPU_CTX_QUERY2_FLAGS_GUILTY   (1<<2)
@@ -219,7 +223,10 @@
 #define AMDGPU_CTX_PRIORITY_VERY_LOW    -1023
 #define AMDGPU_CTX_PRIORITY_LOW         -512
 #define AMDGPU_CTX_PRIORITY_NORMAL      0
-/* Selecting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER */
+/*
+ * When used in struct drm_amdgpu_ctx_in, a priority above NORMAL requires
+ * CAP_SYS_NICE or DRM_MASTER
+*/
 #define AMDGPU_CTX_PRIORITY_HIGH        512
 #define AMDGPU_CTX_PRIORITY_VERY_HIGH   1023
 
@@ -229,6 +236,7 @@
        /** For future use, no flags defined so far */
        __u32   flags;
        __u32   ctx_id;
+       /** AMDGPU_CTX_PRIORITY_* */
        __s32   priority;
 };
 
@@ -281,6 +289,7 @@
        /* AMDGPU_SCHED_OP_* */
        __u32   op;
        __u32   fd;
+       /** AMDGPU_CTX_PRIORITY_* */
        __s32   priority;
        __u32   ctx_id;



Home | Main Index | Thread Index | Old Index