Source-Changes-HG archive

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

[xsrc/trunk]: xsrc/external/mit merge libdrm 2.4.112, and xterm-372.



details:   https://anonhg.NetBSD.org/xsrc/rev/3bd2cdabc517
branches:  trunk
changeset: 7049:3bd2cdabc517
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 11 19:26:44 2022 +0000

description:
merge libdrm 2.4.112, and xterm-372.

diffstat:

 external/mit/libdrm/dist/amdgpu/amdgpu.h                     |   15 +
 external/mit/libdrm/dist/libdrm_lists.h                      |   12 +-
 external/mit/libdrm/dist/libkms/Android.mk                   |   51 -
 external/mit/libdrm/dist/libkms/Makefile.sources             |   23 -
 external/mit/libdrm/dist/libkms/api.c                        |  139 ----
 external/mit/libdrm/dist/libkms/dumb.c                       |  216 ------
 external/mit/libdrm/dist/libkms/exynos.c                     |  220 ------
 external/mit/libdrm/dist/libkms/intel.c                      |  236 -------
 external/mit/libdrm/dist/libkms/internal.h                   |   80 --
 external/mit/libdrm/dist/libkms/kms-symbols.txt              |    8 -
 external/mit/libdrm/dist/libkms/libkms.h                     |   82 --
 external/mit/libdrm/dist/libkms/libkms.pc.in                 |   11 -
 external/mit/libdrm/dist/libkms/linux.c                      |  147 ----
 external/mit/libdrm/dist/libkms/meson.build                  |   78 --
 external/mit/libdrm/dist/libkms/nouveau.c                    |  218 ------
 external/mit/libdrm/dist/libkms/radeon.c                     |  239 -------
 external/mit/libdrm/dist/libkms/vmwgfx.c                     |  207 ------
 external/mit/libdrm/dist/tests/kms/kms-steal-crtc.c          |  161 ----
 external/mit/libdrm/dist/tests/kms/kms-universal-planes.c    |  357 -----------
 external/mit/libdrm/dist/tests/kms/libkms-test-crtc.c        |   43 -
 external/mit/libdrm/dist/tests/kms/libkms-test-device.c      |  217 ------
 external/mit/libdrm/dist/tests/kms/libkms-test-framebuffer.c |  153 ----
 external/mit/libdrm/dist/tests/kms/libkms-test-plane.c       |  137 ----
 external/mit/libdrm/dist/tests/kms/libkms-test-screen.c      |   90 --
 external/mit/libdrm/dist/tests/kms/libkms-test.h             |  120 ---
 external/mit/libdrm/dist/tests/kms/meson.build               |   49 -
 external/mit/libdrm/dist/tests/kmstest/main.c                |  109 ---
 external/mit/libdrm/dist/tests/kmstest/meson.build           |   30 -
 external/mit/libdrm/dist/tests/modetest/modetest.c           |    4 +-
 external/mit/libdrm/dist/xf86drm.c                           |    3 +-
 external/mit/libdrm/dist/xf86drmMode.c                       |  103 ++-
 external/mit/libdrm/dist/xf86drmMode.h                       |   30 +-
 external/mit/xterm/dist/fontutils.c                          |   11 +-
 external/mit/xterm/dist/graphics_sixel.c                     |   62 +-
 external/mit/xterm/dist/linedata.c                           |    4 +-
 external/mit/xterm/dist/misc.c                               |  114 ++-
 external/mit/xterm/dist/ptyx.h                               |   57 +-
 external/mit/xterm/dist/resize.c                             |   28 +-
 external/mit/xterm/dist/scrollback.c                         |    8 +-
 external/mit/xterm/dist/xterm.h                              |   26 +-
 external/mit/xterm/dist/xterm.man                            |  208 +++--
 41 files changed, 462 insertions(+), 3644 deletions(-)

diffs (truncated from 5057 to 300 lines):

diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/amdgpu/amdgpu.h
--- a/external/mit/libdrm/dist/amdgpu/amdgpu.h  Mon Jul 11 19:19:25 2022 +0000
+++ b/external/mit/libdrm/dist/amdgpu/amdgpu.h  Mon Jul 11 19:26:44 2022 +0000
@@ -943,6 +943,21 @@
                                     unsigned priority);
 
 /**
+ * Set or query the stable power state for GPU profiling.
+ *
+ * \param   dev        - \c [in] device handle
+ * \param   op         - \c [in] AMDGPU_CTX_OP_{GET,SET}_STABLE_PSTATE
+ * \param   flags      - \c [in] AMDGPU_CTX_STABLE_PSTATE_*
+ * \param   out_flags  - \c [out] output current stable pstate
+ *
+ * \return  0 on success otherwise POSIX Error code.
+ */
+int amdgpu_cs_ctx_stable_pstate(amdgpu_context_handle context,
+                               uint32_t op,
+                               uint32_t flags,
+                               uint32_t *out_flags);
+
+/**
  * Query reset state for the specific GPU Context
  *
  * \param   context - \c [in]  GPU Context handle
diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/libdrm_lists.h
--- a/external/mit/libdrm/dist/libdrm_lists.h   Mon Jul 11 19:19:25 2022 +0000
+++ b/external/mit/libdrm/dist/libdrm_lists.h   Mon Jul 11 19:26:44 2022 +0000
@@ -97,18 +97,18 @@
 
 #define DRMLISTFOREACHENTRY(__item, __list, __head)                            \
        for ((__item) = DRMLISTENTRY(__typeof__(*__item), (__list)->next, __head); \
-            &(__item)->__head != (__list);                                    \
+            &(__item)->__head != (__list);                                        \
             (__item) = DRMLISTENTRY(__typeof__(*__item),                          \
-                                    (__item)->__head.next, __head))
+                                    (__item)->__head.next, __head))
 
 #define DRMLISTFOREACHENTRYSAFE(__item, __temp, __list, __head)                \
        for ((__item) = DRMLISTENTRY(__typeof__(*__item), (__list)->next, __head), \
             (__temp) = DRMLISTENTRY(__typeof__(*__item),                          \
-                                    (__item)->__head.next, __head);           \
-            &(__item)->__head != (__list);                                    \
-            (__item) = (__temp),                                              \
+                                    (__item)->__head.next, __head);               \
+            &(__item)->__head != (__list);                                        \
+            (__item) = (__temp),                                                  \
             (__temp) = DRMLISTENTRY(__typeof__(*__item),                          \
-                                    (__temp)->__head.next, __head))
+                                    (__temp)->__head.next, __head))
 
 #define DRMLISTJOIN(__list, __join) if (!DRMLISTEMPTY(__list)) {       \
        (__list)->next->prev = (__join);                                \
diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/libkms/Android.mk
--- a/external/mit/libdrm/dist/libkms/Android.mk        Mon Jul 11 19:19:25 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
-
-intel_drivers := i915 i965 i915g iris
-radeon_drivers := r300g r600g radeonsi
-nouveau_drivers := nouveau
-virgl_drivers := virgl
-vmwgfx_drivers := vmwgfx
-
-valid_drivers := \
-       $(intel_drivers) \
-       $(radeon_drivers) \
-       $(nouveau_drivers) \
-       $(virgl_drivers) \
-       $(vmwgfx_drivers)
-
-# warn about invalid drivers
-invalid_drivers := $(filter-out $(valid_drivers), $(DRM_GPU_DRIVERS))
-ifneq ($(invalid_drivers),)
-$(warning invalid GPU drivers: $(invalid_drivers))
-# tidy up
-DRM_GPU_DRIVERS := $(filter-out $(invalid_drivers), $(DRM_GPU_DRIVERS))
-endif
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-include $(LOCAL_PATH)/Makefile.sources
-
-LOCAL_SRC_FILES := $(LIBKMS_FILES)
-
-ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
-LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
-endif
-
-ifneq ($(filter $(intel_drivers), $(DRM_GPU_DRIVERS)),)
-LOCAL_SRC_FILES += $(LIBKMS_INTEL_FILES)
-endif
-
-ifneq ($(filter $(nouveau_drivers), $(DRM_GPU_DRIVERS)),)
-LOCAL_SRC_FILES += $(LIBKMS_NOUVEAU_FILES)
-endif
-
-ifneq ($(filter $(radeon_drivers), $(DRM_GPU_DRIVERS)),)
-LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES)
-endif
-
-LOCAL_MODULE := libkms
-LOCAL_SHARED_LIBRARIES := libdrm
-
-include $(LIBDRM_COMMON_MK)
-include $(BUILD_SHARED_LIBRARY)
diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/libkms/Makefile.sources
--- a/external/mit/libdrm/dist/libkms/Makefile.sources  Mon Jul 11 19:19:25 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-LIBKMS_FILES := \
-       internal.h \
-       linux.c \
-       dumb.c \
-       api.c
-
-LIBKMS_VMWGFX_FILES := \
-       vmwgfx.c
-
-LIBKMS_INTEL_FILES := \
-       intel.c
-
-LIBKMS_NOUVEAU_FILES := \
-       nouveau.c
-
-LIBKMS_RADEON_FILES := \
-       radeon.c
-
-LIBKMS_EXYNOS_FILES := \
-       exynos.c
-
-LIBKMS_H_FILES := \
-       libkms.h
diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/libkms/api.c
--- a/external/mit/libdrm/dist/libkms/api.c     Mon Jul 11 19:19:25 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/**************************************************************************
- *
- * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "libdrm_macros.h"
-#include "internal.h"
-
-drm_public int kms_create(int fd, struct kms_driver **out)
-{
-       return linux_create(fd, out);
-}
-
-drm_public int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out)
-{
-       switch (key) {
-       case KMS_BO_TYPE:
-               break;
-       default:
-               return -EINVAL;
-       }
-       return kms->get_prop(kms, key, out);
-}
-
-drm_public int kms_destroy(struct kms_driver **kms)
-{
-       if (!(*kms))
-               return 0;
-
-       free(*kms);
-       *kms = NULL;
-       return 0;
-}
-
-drm_public int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out)
-{
-       unsigned width = 0;
-       unsigned height = 0;
-       enum kms_bo_type type = KMS_BO_TYPE_SCANOUT_X8R8G8B8;
-       int i;
-
-       for (i = 0; attr[i];) {
-               unsigned key = attr[i++];
-               unsigned value = attr[i++];
-
-               switch (key) {
-               case KMS_WIDTH:
-                       width = value;
-                       break;
-               case KMS_HEIGHT:
-                       height = value;
-                       break;
-               case KMS_BO_TYPE:
-                       type = value;
-                       break;
-               default:
-                       return -EINVAL;
-               }
-       }
-
-       if (width == 0 || height == 0)
-               return -EINVAL;
-
-       /* XXX sanity check type */
-
-       if (type == KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8 &&
-           (width != 64 || height != 64))
-               return -EINVAL;
-
-       return kms->bo_create(kms, width, height, type, attr, out);
-}
-
-drm_public int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out)
-{
-       switch (key) {
-       case KMS_PITCH:
-               *out = bo->pitch;
-               break;
-       case KMS_HANDLE:
-               *out = bo->handle;
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
-drm_public int kms_bo_map(struct kms_bo *bo, void **out)
-{
-       return bo->kms->bo_map(bo, out);
-}
-
-drm_public int kms_bo_unmap(struct kms_bo *bo)
-{
-       return bo->kms->bo_unmap(bo);
-}
-
-drm_public int kms_bo_destroy(struct kms_bo **bo)
-{
-       int ret;
-
-       if (!(*bo))
-               return 0;
-
-       ret = (*bo)->kms->bo_destroy(*bo);
-       if (ret)
-               return ret;
-
-       *bo = NULL;
-       return 0;
-}
diff -r 2577b6c61e18 -r 3bd2cdabc517 external/mit/libdrm/dist/libkms/dumb.c
--- a/external/mit/libdrm/dist/libkms/dumb.c    Mon Jul 11 19:19:25 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/**************************************************************************
- *
- * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR



Home | Main Index | Thread Index | Old Index