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.102



details:   https://anonhg.NetBSD.org/xsrc/rev/72a7123471f0
branches:  xorg
changeset: 10591:72a7123471f0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Nov 01 09:51:24 2020 +0000

description:
initial import of libdrm-2.4.102

diffstat:

 external/mit/libdrm/dist/.editorconfig                    |   23 +
 external/mit/libdrm/dist/Android.common.mk                |   22 +
 external/mit/libdrm/dist/Android.mk                       |   39 +-
 external/mit/libdrm/dist/CONTRIBUTING.rst                 |  105 +
 external/mit/libdrm/dist/CleanSpec.mk                     |    4 +
 external/mit/libdrm/dist/README.rst                       |   33 +
 external/mit/libdrm/dist/RELEASING                        |   40 +
 external/mit/libdrm/dist/amdgpu/.editorconfig             |   13 +
 external/mit/libdrm/dist/amdgpu/Android.mk                |   19 +
 external/mit/libdrm/dist/amdgpu/amdgpu-symbols.txt        |   74 +
 external/mit/libdrm/dist/amdgpu/amdgpu.h                  |   18 +
 external/mit/libdrm/dist/amdgpu/amdgpu_cs.c               |   48 +-
 external/mit/libdrm/dist/amdgpu/amdgpu_internal.h         |    2 +-
 external/mit/libdrm/dist/amdgpu/meson.build               |   11 +-
 external/mit/libdrm/dist/android/gralloc_handle.h         |  111 +
 external/mit/libdrm/dist/core-symbols.txt                 |  197 +++
 external/mit/libdrm/dist/data/Android.mk                  |   10 +
 external/mit/libdrm/dist/data/amdgpu.ids                  |   20 +-
 external/mit/libdrm/dist/etnaviv/Android.mk               |   14 +
 external/mit/libdrm/dist/etnaviv/etnaviv-symbols.txt      |   36 +
 external/mit/libdrm/dist/etnaviv/meson.build              |   11 +-
 external/mit/libdrm/dist/exynos/exynos-symbols.txt        |   23 +
 external/mit/libdrm/dist/exynos/meson.build               |   11 +-
 external/mit/libdrm/dist/freedreno/Android.mk             |    6 +-
 external/mit/libdrm/dist/freedreno/freedreno-symbols.txt  |   45 +
 external/mit/libdrm/dist/freedreno/kgsl/README            |   26 +
 external/mit/libdrm/dist/freedreno/meson.build            |   11 +-
 external/mit/libdrm/dist/include/drm/drm.h                |    5 +-
 external/mit/libdrm/dist/include/drm/nouveau_drm.h        |   77 +-
 external/mit/libdrm/dist/intel/.gitignore                 |    1 +
 external/mit/libdrm/dist/intel/Android.mk                 |    9 +-
 external/mit/libdrm/dist/intel/i915_pciids.h              |   39 +-
 external/mit/libdrm/dist/intel/intel-symbols.txt          |   83 +
 external/mit/libdrm/dist/intel/intel_bufmgr_gem.c         |   45 +-
 external/mit/libdrm/dist/intel/meson.build                |   12 +-
 external/mit/libdrm/dist/intel/tests/.gitignore           |    1 +
 external/mit/libdrm/dist/intel/tests/test-batch.sh        |    2 +-
 external/mit/libdrm/dist/libkms/Android.mk                |    8 +-
 external/mit/libdrm/dist/libkms/kms-symbols.txt           |    8 +
 external/mit/libdrm/dist/libkms/meson.build               |   11 +-
 external/mit/libdrm/dist/meson.build                      |   51 +-
 external/mit/libdrm/dist/nouveau/Android.mk               |    6 +-
 external/mit/libdrm/dist/nouveau/meson.build              |   11 +-
 external/mit/libdrm/dist/nouveau/nouveau-symbols.txt      |   41 +
 external/mit/libdrm/dist/nouveau/private.h                |    2 +-
 external/mit/libdrm/dist/omap/Android.mk                  |   13 +
 external/mit/libdrm/dist/omap/meson.build                 |   11 +-
 external/mit/libdrm/dist/omap/omap-symbols.txt            |   18 +
 external/mit/libdrm/dist/radeon/Android.mk                |    6 +-
 external/mit/libdrm/dist/radeon/meson.build               |   11 +-
 external/mit/libdrm/dist/radeon/radeon-symbols.txt        |   44 +
 external/mit/libdrm/dist/symbols-check.py                 |  130 ++
 external/mit/libdrm/dist/tegra/.gitignore                 |    1 +
 external/mit/libdrm/dist/tegra/meson.build                |   11 +-
 external/mit/libdrm/dist/tegra/tegra-symbols.txt          |   13 +
 external/mit/libdrm/dist/tests/Android.mk                 |    1 +
 external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.c       |   65 +-
 external/mit/libdrm/dist/tests/amdgpu/amdgpu_test.h       |    5 +
 external/mit/libdrm/dist/tests/amdgpu/basic_tests.c       |  600 ++++++++-
 external/mit/libdrm/dist/tests/amdgpu/cs_tests.c          |    1 +
 external/mit/libdrm/dist/tests/amdgpu/deadlock_tests.c    |   68 +-
 external/mit/libdrm/dist/tests/amdgpu/decode_messages.h   |    6 +
 external/mit/libdrm/dist/tests/amdgpu/meson.build         |    2 +-
 external/mit/libdrm/dist/tests/amdgpu/ras_tests.c         |  285 ++--
 external/mit/libdrm/dist/tests/amdgpu/syncobj_tests.c     |    2 +-
 external/mit/libdrm/dist/tests/amdgpu/vcn_tests.c         |   21 +-
 external/mit/libdrm/dist/tests/kms/kms-steal-crtc.c       |    2 +-
 external/mit/libdrm/dist/tests/kms/kms-universal-planes.c |    2 +-
 external/mit/libdrm/dist/tests/kms/libkms-test-screen.c   |    4 +-
 external/mit/libdrm/dist/tests/meson.build                |   10 +-
 external/mit/libdrm/dist/tests/modetest/Android.mk        |    2 +
 external/mit/libdrm/dist/tests/modetest/modetest.c        |  890 +++++++------
 external/mit/libdrm/dist/tests/nouveau/.gitignore         |    1 +
 external/mit/libdrm/dist/tests/nouveau/threaded.c         |    4 +
 external/mit/libdrm/dist/tests/proptest/Android.mk        |   14 +
 external/mit/libdrm/dist/tests/tegra/.gitignore           |    1 +
 external/mit/libdrm/dist/tests/ttmtest/AUTHORS            |    1 +
 external/mit/libdrm/dist/tests/ttmtest/ChangeLog          |   23 +
 external/mit/libdrm/dist/tests/ttmtest/Makefile.am        |    1 +
 external/mit/libdrm/dist/tests/ttmtest/configure.ac       |   33 +
 external/mit/libdrm/dist/tests/ttmtest/reconf             |    2 +
 external/mit/libdrm/dist/tests/ttmtest/src/Makefile.am    |    8 +
 external/mit/libdrm/dist/tests/ttmtest/src/ttmtest.c      |  430 ++++++
 external/mit/libdrm/dist/tests/ttmtest/src/xf86dri.c      |  603 +++++++++
 external/mit/libdrm/dist/tests/ttmtest/src/xf86dri.h      |  116 +
 external/mit/libdrm/dist/tests/ttmtest/src/xf86dristr.h   |  390 ++++++
 external/mit/libdrm/dist/tests/util/Android.mk            |   38 +
 external/mit/libdrm/dist/tests/vbltest/vbltest.c          |    2 +-
 external/mit/libdrm/dist/xf86atomic.h                     |    1 +
 external/mit/libdrm/dist/xf86drm.c                        |  319 ++++-
 external/mit/libdrm/dist/xf86drm.h                        |   25 +
 external/mit/libdrm/dist/xf86drmMode.c                    |   52 +-
 external/mit/libdrm/dist/xf86drmMode.h                    |   18 +
 93 files changed, 4885 insertions(+), 805 deletions(-)

diffs (truncated from 7875 to 300 lines):

diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/.editorconfig
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/.editorconfig    Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,23 @@
+# To use this config with your editor, follow the instructions at:
+# http://editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+insert_final_newline = true
+
+[*.{c,h}]
+indent_style = space
+indent_size = 4
+
+[{Makefile.*,*.mk}]
+indent_style = tab
+
+[*.m4]
+indent_style = space
+indent_size = 2
+
+[{meson.build,meson_options.txt}]
+indent_style = space
+indent_size = 2
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/Android.common.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/Android.common.mk        Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,22 @@
+# XXX: Consider moving these to config.h analogous to autoconf.
+LOCAL_CFLAGS += \
+       -DMAJOR_IN_SYSMACROS=1 \
+       -DHAVE_ALLOCA_H=0 \
+       -DHAVE_SYS_SELECT_H=0 \
+       -DHAVE_SYS_SYSCTL_H=0 \
+       -DHAVE_VISIBILITY=1 \
+       -fvisibility=hidden \
+       -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+
+LOCAL_CFLAGS += \
+       -Wno-error \
+       -Wno-unused-parameter \
+       -Wno-missing-field-initializers \
+       -Wno-pointer-arith \
+       -Wno-enum-conversion
+
+# Quiet down the build system and remove any .h files from the sources
+LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
+LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)
+
+LOCAL_PROPRIETARY_MODULE := true
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/Android.mk
--- a/external/mit/libdrm/dist/Android.mk       Wed Oct 21 14:48:56 2020 +0000
+++ b/external/mit/libdrm/dist/Android.mk       Sun Nov 01 09:51:24 2020 +0000
@@ -21,27 +21,54 @@
 # IN THE SOFTWARE.
 #
 
+LIBDRM_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
+ifneq ($(filter 2 4, $(LIBDRM_ANDROID_MAJOR_VERSION)),)
+$(error "Android 4.4 and earlier not supported")
+endif
+
+LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk
+
 LOCAL_PATH := $(call my-dir)
+LIBDRM_TOP := $(LOCAL_PATH)
+
 include $(CLEAR_VARS)
 
-# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES
+# Import variables LIBDRM_{,H,INCLUDE_H,INCLUDE_ANDROID_H,INCLUDE_VMWGFX_H}_FILES
 include $(LOCAL_PATH)/Makefile.sources
 
+#static library for the device (recovery)
+include $(CLEAR_VARS)
 LOCAL_MODULE := libdrm
-LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := $(LIBDRM_FILES)
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
        $(LOCAL_PATH) \
-       $(LOCAL_PATH)/include/drm
+       $(LOCAL_PATH)/include/drm \
+       $(LOCAL_PATH)/android
 
 LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/include/drm
 
-LOCAL_CFLAGS := \
-       -DHAVE_VISIBILITY=1 \
-       -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+include $(LIBDRM_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# Shared library for the device
+include $(CLEAR_VARS)
+LOCAL_MODULE := libdrm
 
+LOCAL_SRC_FILES := $(LIBDRM_FILES)
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+       $(LOCAL_PATH) \
+       $(LOCAL_PATH)/include/drm \
+       $(LOCAL_PATH)/android
+
+LOCAL_SHARED_LIBRARIES := \
+       libcutils
+
+LOCAL_C_INCLUDES := \
+        $(LOCAL_PATH)/include/drm
+
+include $(LIBDRM_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)
 
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/CONTRIBUTING.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/CONTRIBUTING.rst Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,105 @@
+Contributing to libdrm
+======================
+
+Submitting Patches
+------------------
+
+Patches should be sent to dri-devel%lists.freedesktop.org@localhost, using git
+send-email. For patches only touching driver specific code one of the driver
+mailing lists (like amd-gfx%lists.freedesktop.org@localhost) is also appropriate. See git
+documentation for help:
+
+http://git-scm.com/documentation
+
+Since dri-devel is a very busy mailing list please use --subject-prefix="PATCH
+libdrm" to make it easier to find libdrm patches. This is best done by running
+
+    git config --local format.subjectprefix "PATCH libdrm"
+
+The first line of a commit message should contain a prefix indicating what part
+is affected by the patch followed by one sentence that describes the change. For
+examples:
+
+    amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping
+
+The body of the commit message should describe what the patch changes and why,
+and also note any particular side effects. For a recommended reading on
+writing commit messages, see:
+
+http://who-t.blogspot.de/2009/12/on-commit-messages.html
+
+Your patches should also include a Signed-off-by line with your name and email
+address. If you're not the patch's original author, you should also gather
+S-o-b's by them (and/or whomever gave the patch to you.) The significance of
+this is that it certifies that you created the patch, that it was created under
+an appropriate open source license, or provided to you under those terms.  This
+lets us indicate a chain of responsibility for the copyright status of the code.
+For more details:
+
+https://developercertificate.org/
+
+We won't reject patches that lack S-o-b, but it is strongly recommended.
+
+Review and Merging
+------------------
+
+Patches should have at least one positive review (Reviewed-by: tag) or
+indication of approval (Acked-by: tag) before merging. For any code shared
+between drivers this is mandatory.
+
+Please note that kernel/userspace API header files have special rules, see
+include/drm/README.
+
+Coding style in the project loosely follows the CodingStyle of the linux kernel:
+
+https://www.kernel.org/doc/html/latest/process/coding-style.html?highlight=coding%20style
+
+Commit Rights
+-------------
+
+Commit rights will be granted to anyone who requests them and fulfills the
+below criteria:
+
+- Submitted a few (5-10 as a rule of thumb) non-trivial (not just simple
+  spelling fixes and whitespace adjustment) patches that have been merged
+  already. Since libdrm is just a glue library between the kernel and userspace
+  drivers, merged patches to those components also count towards the commit
+  criteria.
+
+- Are actively participating on discussions about their work (on the mailing
+  list or IRC). This should not be interpreted as a requirement to review other
+  peoples patches but just make sure that patch submission isn't one-way
+  communication. Cross-review is still highly encouraged.
+
+- Will be regularly contributing further patches. This includes regular
+  contributors to other parts of the open source graphics stack who only
+  do the oddball rare patch within libdrm itself.
+
+- Agrees to use their commit rights in accordance with the documented merge
+  criteria, tools, and processes.
+
+To apply for commit rights ("Developer" role in gitlab) send a mail to
+dri-devel%lists.freedesktop.org@localhost and please ping the maintainers if your request
+is stuck.
+
+Committers are encouraged to request their commit rights get removed when they
+no longer contribute to the project. Commit rights will be reinstated when they
+come back to the project.
+
+Maintainers and committers should encourage contributors to request commit
+rights, as especially junior contributors tend to underestimate their skills.
+
+Code of Conduct
+---------------
+
+Please be aware the fd.o Code of Conduct also applies to libdrm:
+
+https://www.freedesktop.org/wiki/CodeOfConduct/
+
+See the gitlab project owners for contact details of the libdrm maintainers.
+
+Abuse of commit rights, like engaging in commit fights or willfully pushing
+patches that violate the documented merge criteria, will also be handled through
+the Code of Conduct enforcement process.
+
+Happy hacking!
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/CleanSpec.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/CleanSpec.mk     Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,4 @@
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/include/libdrm)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/include/freedreno)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdrm_*intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libdrm_*intermediates)
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/README.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/README.rst       Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,33 @@
+libdrm - userspace library for drm
+----------------------------------
+
+This is libdrm, a userspace library for accessing the DRM, direct rendering
+manager, on Linux, BSD and other operating systems that support the ioctl
+interface.
+The library provides wrapper functions for the ioctls to avoid exposing the
+kernel interface directly, and for chipsets with drm memory manager, support
+for tracking relocations and buffers.
+New functionality in the kernel DRM drivers typically requires a new libdrm,
+but a new libdrm will always work with an older kernel.
+
+libdrm is a low-level library, typically used by graphics drivers such as
+the Mesa drivers, the X drivers, libva and similar projects.
+
+
+Compiling
+---------
+
+To set up meson:
+
+    meson builddir/
+
+By default this will install into /usr/local, you can change your prefix
+with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after 
+the initial meson setup).
+
+Then use ninja to build and install:
+
+    ninja -C builddir/ install
+
+If you are installing into a system location you will need to run install
+separately, and as root.
diff -r e9fc99e1e381 -r 72a7123471f0 external/mit/libdrm/dist/RELEASING
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/libdrm/dist/RELEASING        Sun Nov 01 09:51:24 2020 +0000
@@ -0,0 +1,40 @@
+The release criteria for libdrm is essentially "if you need a release,
+make one".  There is no designated release engineer or maintainer.
+Anybody is free to make a release if there's a certain feature or bug
+fix they need in a released version of libdrm.
+
+When new ioctl definitions are merged into drm-next, we will add
+support to libdrm, at which point we typically create a new release.
+However, this is up to whoever is driving the feature in question.
+
+Follow these steps to release a new version of libdrm:
+
+  1) Bump the version number in meson.build. We seem to have settled for
+     2.4.x as the versioning scheme for libdrm, so just bump the micro
+     version.
+
+  2) Run `ninja -C builddir/ dist` to generate the tarballs.
+     Make sure that the version number of the tarball name in
+     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:
+
+       git push origin master
+
+     assuming the remote for the upstream libdrm repo is called origin.



Home | Main Index | Thread Index | Old Index