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.97
details: https://anonhg.NetBSD.org/xsrc/rev/93fd5dc42ac3
branches: trunk
changeset: 10169:93fd5dc42ac3
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Mar 04 08:20:57 2019 +0000
description:
initial import of libdrm-2.4.97
diffstat:
external/mit/libdrm/dist/Makefile.in | 3 +-
external/mit/libdrm/dist/aclocal.m4 | 87 +-
external/mit/libdrm/dist/amdgpu/Makefile.in | 1 +
external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check | 3 +
external/mit/libdrm/dist/amdgpu/amdgpu.h | 54 +
external/mit/libdrm/dist/amdgpu/amdgpu_cs.c | 25 +
external/mit/libdrm/dist/build-aux/compile | 11 +-
external/mit/libdrm/dist/build-aux/config.guess | 560 +++++----
external/mit/libdrm/dist/build-aux/config.sub | 249 +--
external/mit/libdrm/dist/build-aux/depcomp | 2 +-
external/mit/libdrm/dist/build-aux/install-sh | 25 +-
external/mit/libdrm/dist/build-aux/ltmain.sh | 786 ++++++++-----
external/mit/libdrm/dist/build-aux/missing | 8 +-
external/mit/libdrm/dist/build-aux/test-driver | 8 +-
external/mit/libdrm/dist/configure | 141 +-
external/mit/libdrm/dist/configure.ac | 2 +-
external/mit/libdrm/dist/data/Makefile.in | 1 +
external/mit/libdrm/dist/data/amdgpu.ids | 28 +-
external/mit/libdrm/dist/etnaviv/Makefile.in | 1 +
external/mit/libdrm/dist/exynos/Makefile.in | 1 +
external/mit/libdrm/dist/freedreno/Makefile.in | 1 +
external/mit/libdrm/dist/freedreno/freedreno_ringbuffer.h | 3 +-
external/mit/libdrm/dist/include/drm/amdgpu_drm.h | 8 +
external/mit/libdrm/dist/intel/Makefile.in | 1 +
external/mit/libdrm/dist/libkms/Makefile.in | 1 +
external/mit/libdrm/dist/m4/libtool.m4 | 74 +-
external/mit/libdrm/dist/m4/ltoptions.m4 | 2 +-
external/mit/libdrm/dist/m4/ltsugar.m4 | 2 +-
external/mit/libdrm/dist/m4/ltversion.m4 | 12 +-
external/mit/libdrm/dist/m4/lt~obsolete.m4 | 2 +-
external/mit/libdrm/dist/man/Makefile.in | 1 +
external/mit/libdrm/dist/meson.build | 4 +-
external/mit/libdrm/dist/nouveau/Makefile.in | 1 +
external/mit/libdrm/dist/omap/Makefile.in | 1 +
external/mit/libdrm/dist/radeon/Makefile.in | 1 +
external/mit/libdrm/dist/tegra/Makefile.in | 1 +
external/mit/libdrm/dist/tests/Makefile.in | 1 +
external/mit/libdrm/dist/tests/amdgpu/Makefile.in | 1 +
external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.c | 3 +-
external/mit/libdrm/dist/tests/amdgpu/deadlock_tests.c | 128 ++-
external/mit/libdrm/dist/tests/amdgpu/vcn_tests.c | 18 +-
external/mit/libdrm/dist/tests/amdgpu/vm_tests.c | 43 +
external/mit/libdrm/dist/tests/drmdevice.c | 5 +-
external/mit/libdrm/dist/tests/etnaviv/Makefile.in | 1 +
external/mit/libdrm/dist/tests/exynos/Makefile.in | 1 +
external/mit/libdrm/dist/tests/kms/Makefile.in | 1 +
external/mit/libdrm/dist/tests/kmstest/Makefile.in | 1 +
external/mit/libdrm/dist/tests/modeprint/Makefile.in | 1 +
external/mit/libdrm/dist/tests/modetest/Makefile.in | 1 +
external/mit/libdrm/dist/tests/nouveau/Makefile.in | 1 +
external/mit/libdrm/dist/tests/proptest/Makefile.in | 1 +
external/mit/libdrm/dist/tests/radeon/Makefile.in | 1 +
external/mit/libdrm/dist/tests/tegra/Makefile.in | 1 +
external/mit/libdrm/dist/tests/util/Makefile.in | 1 +
external/mit/libdrm/dist/tests/vbltest/Makefile.in | 1 +
external/mit/libdrm/dist/vc4/Makefile.in | 1 +
external/mit/libdrm/dist/xf86drmHash.c | 1 -
57 files changed, 1411 insertions(+), 913 deletions(-)
diffs (truncated from 5211 to 300 lines):
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/Makefile.in
--- a/external/mit/libdrm/dist/Makefile.in Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/Makefile.in Mon Mar 04 08:20:57 2019 +0000
@@ -273,7 +273,7 @@
$(top_srcdir)/build-aux/depcomp \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/ltmain.sh \
- $(top_srcdir)/build-aux/missing README build-aux/compile \
+ $(top_srcdir)/build-aux/missing build-aux/compile \
build-aux/config.guess build-aux/config.sub build-aux/depcomp \
build-aux/install-sh build-aux/ltmain.sh build-aux/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -460,6 +460,7 @@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/aclocal.m4
--- a/external/mit/libdrm/dist/aclocal.m4 Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/aclocal.m4 Mon Mar 04 08:20:57 2019 +0000
@@ -20,9 +20,9 @@
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-# serial 11 (pkg-config-0.29.1)
-
+dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29.1)
+dnl
dnl Copyright © 2004 Scott James Remnant <scott%netsplit.com@localhost>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists%gmail.com@localhost>
dnl
@@ -296,74 +296,6 @@
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
-dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
-dnl [DESCRIPTION], [DEFAULT])
-dnl ------------------------------------------
-dnl
-dnl Prepare a "--with-" configure option using the lowercase
-dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
-dnl PKG_CHECK_MODULES in a single macro.
-AC_DEFUN([PKG_WITH_MODULES],
-[
-m4_pushdef([with_arg], m4_tolower([$1]))
-
-m4_pushdef([description],
- [m4_default([$5], [build with ]with_arg[ support])])
-
-m4_pushdef([def_arg], [m4_default([$6], [auto])])
-m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
-m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
-
-m4_case(def_arg,
- [yes],[m4_pushdef([with_without], [--without-]with_arg)],
- [m4_pushdef([with_without],[--with-]with_arg)])
-
-AC_ARG_WITH(with_arg,
- AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
- [AS_TR_SH([with_]with_arg)=def_arg])
-
-AS_CASE([$AS_TR_SH([with_]with_arg)],
- [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
- [auto],[PKG_CHECK_MODULES([$1],[$2],
- [m4_n([def_action_if_found]) $3],
- [m4_n([def_action_if_not_found]) $4])])
-
-m4_popdef([with_arg])
-m4_popdef([description])
-m4_popdef([def_arg])
-
-])dnl PKG_WITH_MODULES
-
-dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl [DESCRIPTION], [DEFAULT])
-dnl -----------------------------------------------
-dnl
-dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
-dnl check._[VARIABLE-PREFIX] is exported as make variable.
-AC_DEFUN([PKG_HAVE_WITH_MODULES],
-[
-PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
-
-AM_CONDITIONAL([HAVE_][$1],
- [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
-])dnl PKG_HAVE_WITH_MODULES
-
-dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
-dnl [DESCRIPTION], [DEFAULT])
-dnl ------------------------------------------------------
-dnl
-dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
-dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
-dnl and preprocessor variable.
-AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
-[
-PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
-
-AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
- [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
-])dnl PKG_HAVE_DEFINE_WITH_MODULES
-
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -788,13 +720,24 @@
fi])
# Test for the ability of xmlto to generate a text target
+#
+# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
+# following test for empty XML docbook files.
+# For compatibility reasons use the following empty XML docbook file and if
+# it fails try it again with a non-empty XML file.
have_xmlto_text=no
cat > conftest.xml << "EOF"
EOF
AS_IF([test "$have_xmlto" = yes],
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
[have_xmlto_text=yes],
- [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+ [# Try it again with a non-empty XML file.
+ cat > conftest.xml << "EOF"
+<x></x>
+EOF
+ AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
rm -f conftest.xml
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/amdgpu/Makefile.in
--- a/external/mit/libdrm/dist/amdgpu/Makefile.in Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/amdgpu/Makefile.in Mon Mar 04 08:20:57 2019 +0000
@@ -558,6 +558,7 @@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check
--- a/external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu-symbol-check Mon Mar 04 08:20:57 2019 +0000
@@ -19,6 +19,8 @@
amdgpu_bo_free
amdgpu_bo_import
amdgpu_bo_inc_ref
+amdgpu_bo_list_create_raw
+amdgpu_bo_list_destroy_raw
amdgpu_bo_list_create
amdgpu_bo_list_destroy
amdgpu_bo_list_update
@@ -47,6 +49,7 @@
amdgpu_cs_signal_semaphore
amdgpu_cs_submit
amdgpu_cs_submit_raw
+amdgpu_cs_submit_raw2
amdgpu_cs_syncobj_export_sync_file
amdgpu_cs_syncobj_import_sync_file
amdgpu_cs_syncobj_reset
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/amdgpu/amdgpu.h
--- a/external/mit/libdrm/dist/amdgpu/amdgpu.h Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu.h Mon Mar 04 08:20:57 2019 +0000
@@ -42,6 +42,7 @@
#endif
struct drm_amdgpu_info_hw_ip;
+struct drm_amdgpu_bo_list_entry;
/*--------------------------------------------------------------------------*/
/* --------------------------- Defines ------------------------------------ */
@@ -779,6 +780,37 @@
*
* \param dev - \c [in] Device handle.
* See #amdgpu_device_initialize()
+ * \param number_of_buffers - \c [in] Number of BOs in the list
+ * \param buffers - \c [in] List of BO handles
+ * \param result - \c [out] Created BO list handle
+ *
+ * \return 0 on success\n
+ * <0 - Negative POSIX Error code
+ *
+ * \sa amdgpu_bo_list_destroy_raw(), amdgpu_cs_submit_raw2()
+*/
+int amdgpu_bo_list_create_raw(amdgpu_device_handle dev,
+ uint32_t number_of_buffers,
+ struct drm_amdgpu_bo_list_entry *buffers,
+ uint32_t *result);
+
+/**
+ * Destroys a BO list handle.
+ *
+ * \param bo_list - \c [in] BO list handle.
+ *
+ * \return 0 on success\n
+ * <0 - Negative POSIX Error code
+ *
+ * \sa amdgpu_bo_list_create_raw(), amdgpu_cs_submit_raw2()
+*/
+int amdgpu_bo_list_destroy_raw(amdgpu_device_handle dev, uint32_t bo_list);
+
+/**
+ * Creates a BO list handle for command submission.
+ *
+ * \param dev - \c [in] Device handle.
+ * See #amdgpu_device_initialize()
* \param number_of_resources - \c [in] Number of BOs in the list
* \param resources - \c [in] List of BO handles
* \param resource_prios - \c [in] Optional priority for each handle
@@ -1587,6 +1619,28 @@
struct drm_amdgpu_cs_chunk *chunks,
uint64_t *seq_no);
+/**
+ * Submit raw command submission to the kernel with a raw BO list handle.
+ *
+ * \param dev - \c [in] device handle
+ * \param context - \c [in] context handle for context id
+ * \param bo_list_handle - \c [in] raw bo list handle (0 for none)
+ * \param num_chunks - \c [in] number of CS chunks to submit
+ * \param chunks - \c [in] array of CS chunks
+ * \param seq_no - \c [out] output sequence number for submission.
+ *
+ * \return 0 on success\n
+ * <0 - Negative POSIX Error code
+ *
+ * \sa amdgpu_bo_list_create_raw(), amdgpu_bo_list_destroy_raw()
+ */
+int amdgpu_cs_submit_raw2(amdgpu_device_handle dev,
+ amdgpu_context_handle context,
+ uint32_t bo_list_handle,
+ int num_chunks,
+ struct drm_amdgpu_cs_chunk *chunks,
+ uint64_t *seq_no);
+
void amdgpu_cs_chunk_fence_to_dep(struct amdgpu_cs_fence *fence,
struct drm_amdgpu_cs_chunk_dep *dep);
void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info,
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/amdgpu/amdgpu_cs.c
--- a/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu_cs.c Mon Mar 04 08:20:57 2019 +0000
@@ -731,6 +731,31 @@
return 0;
}
+drm_public int amdgpu_cs_submit_raw2(amdgpu_device_handle dev,
+ amdgpu_context_handle context,
+ uint32_t bo_list_handle,
+ int num_chunks,
+ struct drm_amdgpu_cs_chunk *chunks,
+ uint64_t *seq_no)
+{
+ union drm_amdgpu_cs cs = {0};
+ uint64_t *chunk_array;
+ int i, r;
+
+ chunk_array = alloca(sizeof(uint64_t) * num_chunks);
+ for (i = 0; i < num_chunks; i++)
+ chunk_array[i] = (uint64_t)(uintptr_t)&chunks[i];
+ cs.in.chunks = (uint64_t)(uintptr_t)chunk_array;
+ cs.in.ctx_id = context->id;
+ cs.in.bo_list_handle = bo_list_handle;
+ cs.in.num_chunks = num_chunks;
+ r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_CS,
+ &cs, sizeof(cs));
+ if (!r && seq_no)
+ *seq_no = cs.out.handle;
+ return r;
+}
+
drm_public void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info,
struct drm_amdgpu_cs_chunk_data *data)
{
diff -r 825fe7c61397 -r 93fd5dc42ac3 external/mit/libdrm/dist/build-aux/compile
--- a/external/mit/libdrm/dist/build-aux/compile Sun Mar 03 22:43:54 2019 +0000
+++ b/external/mit/libdrm/dist/build-aux/compile Mon Mar 04 08:20:57 2019 +0000
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey%cygnus.com@localhost>.
#
# This program is free software; you can redistribute it and/or modify
@@ -255,8 +255,7 @@
echo "compile $scriptversion"
exit $?
Home |
Main Index |
Thread Index |
Old Index