diff options
39 files changed, 57 insertions, 519 deletions
diff --git a/lib/libdrm/Android.common.mk b/lib/libdrm/Android.common.mk deleted file mode 100644 index 37c2b23a1..000000000 --- a/lib/libdrm/Android.common.mk +++ /dev/null @@ -1,22 +0,0 @@ -# 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 --git a/lib/libdrm/Android.mk b/lib/libdrm/Android.mk deleted file mode 100644 index 0ab6f0f98..000000000 --- a/lib/libdrm/Android.mk +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright © 2011-2012 Intel Corporation -# -# 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, sublicense, -# 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 NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS 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. -# - -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_ANDROID_H,INCLUDE_VMWGFX_H}_FILES -include $(LOCAL_PATH)/Makefile.sources - -#static library for the device (recovery) -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_C_INCLUDES := \ - $(LOCAL_PATH)/include/drm - -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 --git a/lib/libdrm/Makefile.sources b/lib/libdrm/Makefile.sources deleted file mode 100644 index 55290fe99..000000000 --- a/lib/libdrm/Makefile.sources +++ /dev/null @@ -1,45 +0,0 @@ -LIBDRM_FILES := \ - xf86drm.c \ - xf86drmHash.c \ - xf86drmHash.h \ - xf86drmRandom.c \ - xf86drmRandom.h \ - xf86drmSL.c \ - xf86drmMode.c \ - xf86atomic.h \ - libdrm_macros.h \ - libdrm_lists.h \ - util_double_list.h \ - util_math.h - -LIBDRM_H_FILES := \ - libsync.h \ - xf86drm.h \ - xf86drmMode.h - -LIBDRM_INCLUDE_H_FILES := \ - include/drm/drm.h \ - include/drm/drm_fourcc.h \ - include/drm/drm_mode.h \ - include/drm/drm_sarea.h \ - include/drm/i915_drm.h \ - include/drm/mach64_drm.h \ - include/drm/mga_drm.h \ - include/drm/msm_drm.h \ - include/drm/nouveau_drm.h \ - include/drm/qxl_drm.h \ - include/drm/r128_drm.h \ - include/drm/radeon_drm.h \ - include/drm/amdgpu_drm.h \ - include/drm/savage_drm.h \ - include/drm/sis_drm.h \ - include/drm/tegra_drm.h \ - include/drm/vc4_drm.h \ - include/drm/via_drm.h \ - include/drm/virtgpu_drm.h - -LIBDRM_INCLUDE_ANDROID_H_FILES := \ - android/gralloc_handle.h - -LIBDRM_INCLUDE_VMWGFX_H_FILES := \ - include/drm/vmwgfx_drm.h diff --git a/lib/libdrm/amdgpu/Android.mk b/lib/libdrm/amdgpu/Android.mk deleted file mode 100644 index 1f028d0b9..000000000 --- a/lib/libdrm/amdgpu/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_AMDGPU_FILES, LIBDRM_AMDGPU_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_amdgpu - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES) - -LOCAL_CFLAGS := \ - -DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\" - -LOCAL_REQUIRED_MODULES := amdgpu.ids - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/amdgpu/Makefile.sources b/lib/libdrm/amdgpu/Makefile.sources deleted file mode 100644 index 0c0b9a93a..000000000 --- a/lib/libdrm/amdgpu/Makefile.sources +++ /dev/null @@ -1,14 +0,0 @@ -LIBDRM_AMDGPU_FILES := \ - amdgpu_bo.c \ - amdgpu_cs.c \ - amdgpu_device.c \ - amdgpu_gpu_info.c \ - amdgpu_internal.h \ - amdgpu_vamgr.c \ - util_hash.c \ - util_hash.h \ - util_hash_table.c \ - util_hash_table.h - -LIBDRM_AMDGPU_H_FILES := \ - amdgpu.h diff --git a/lib/libdrm/data/Android.mk b/lib/libdrm/data/Android.mk deleted file mode 100644 index 62013f0cb..000000000 --- a/lib/libdrm/data/Android.mk +++ /dev/null @@ -1,10 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := amdgpu.ids -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_PROPRIETARY_MODULE := true -LOCAL_MODULE_RELATIVE_PATH := hwdata -LOCAL_SRC_FILES := $(LOCAL_MODULE) -include $(BUILD_PREBUILT) diff --git a/lib/libdrm/etnaviv/Android.mk b/lib/libdrm/etnaviv/Android.mk deleted file mode 100644 index 390f9a989..000000000 --- a/lib/libdrm/etnaviv/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_ETNAVIV_FILES, LIBDRM_ETNAVIV_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_etnaviv - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_ETNAVIV_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/etnaviv/Makefile.sources b/lib/libdrm/etnaviv/Makefile.sources deleted file mode 100644 index 525805674..000000000 --- a/lib/libdrm/etnaviv/Makefile.sources +++ /dev/null @@ -1,12 +0,0 @@ -LIBDRM_ETNAVIV_FILES := \ - etnaviv_device.c \ - etnaviv_gpu.c \ - etnaviv_bo.c \ - etnaviv_bo_cache.c \ - etnaviv_pipe.c \ - etnaviv_cmd_stream.c \ - etnaviv_drm.h \ - etnaviv_priv.h - -LIBDRM_ETNAVIV_H_FILES := \ - etnaviv_drmif.h diff --git a/lib/libdrm/freedreno/Android.mk b/lib/libdrm/freedreno/Android.mk deleted file mode 100644 index 2b582aede..000000000 --- a/lib/libdrm/freedreno/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_FREEDRENO_FILES, LIBDRM_FREEDRENO_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_freedreno - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/freedreno/Makefile.sources b/lib/libdrm/freedreno/Makefile.sources deleted file mode 100644 index 57a8bf1b9..000000000 --- a/lib/libdrm/freedreno/Makefile.sources +++ /dev/null @@ -1,25 +0,0 @@ -LIBDRM_FREEDRENO_FILES := \ - freedreno_device.c \ - freedreno_pipe.c \ - freedreno_priv.h \ - freedreno_ringbuffer.c \ - freedreno_bo.c \ - msm/msm_bo.c \ - msm/msm_device.c \ - msm/msm_drm.h \ - msm/msm_pipe.c \ - msm/msm_priv.h \ - msm/msm_ringbuffer.c - -LIBDRM_FREEDRENO_KGSL_FILES := \ - kgsl/kgsl_bo.c \ - kgsl/kgsl_device.c \ - kgsl/kgsl_drm.h \ - kgsl/kgsl_pipe.c \ - kgsl/kgsl_priv.h \ - kgsl/kgsl_ringbuffer.c \ - kgsl/msm_kgsl.h - -LIBDRM_FREEDRENO_H_FILES := \ - freedreno_drmif.h \ - freedreno_ringbuffer.h diff --git a/lib/libdrm/intel/Android.mk b/lib/libdrm/intel/Android.mk deleted file mode 100644 index f45312dd0..000000000 --- a/lib/libdrm/intel/Android.mk +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright © 2011 Intel Corporation -# -# 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, sublicense, -# 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 NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS 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. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_INTEL_FILES, LIBDRM_INTEL_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_intel - -LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) - -LOCAL_SHARED_LIBRARIES := \ - libdrm - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/intel/Makefile.sources b/lib/libdrm/intel/Makefile.sources deleted file mode 100644 index 7b2272c75..000000000 --- a/lib/libdrm/intel/Makefile.sources +++ /dev/null @@ -1,14 +0,0 @@ -LIBDRM_INTEL_FILES := \ - intel_bufmgr.c \ - intel_bufmgr_priv.h \ - intel_bufmgr_fake.c \ - intel_bufmgr_gem.c \ - intel_decode.c \ - intel_chipset.h \ - mm.c \ - mm.h - -LIBDRM_INTEL_H_FILES := \ - intel_bufmgr.h \ - intel_aub.h \ - intel_debug.h diff --git a/lib/libdrm/libsync.h b/lib/libdrm/libsync.h index e1aac628a..02861da15 100644 --- a/lib/libdrm/libsync.h +++ b/lib/libdrm/libsync.h @@ -33,7 +33,7 @@ #include <stdint.h> #include <string.h> #include <sys/ioctl.h> -#include <sys/poll.h> +#include <poll.h> #include <unistd.h> #if defined(__cplusplus) diff --git a/lib/libdrm/mk/libdrm_amdgpu/shlib_version b/lib/libdrm/mk/libdrm_amdgpu/shlib_version index 783f55bf5..f9025b091 100644 --- a/lib/libdrm/mk/libdrm_amdgpu/shlib_version +++ b/lib/libdrm/mk/libdrm_amdgpu/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=13 +minor=14 diff --git a/lib/libdrm/mk/man/drm-kms.7 b/lib/libdrm/mk/man/drm-kms.7 index 5164b944c..502a58af3 100644 --- a/lib/libdrm/mk/man/drm-kms.7 +++ b/lib/libdrm/mk/man/drm-kms.7 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRM-KMS" 7 "September 2012" "" "Direct Rendering Manager" +.TH "DRM-KMS" "7" "September 2012" "" "Direct Rendering Manager" .SH NAME drm-kms \- Kernel Mode-Setting .SH SYNOPSIS @@ -178,8 +178,7 @@ failure, otherwise, a valid CRTC id is returned. .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn) { drmModeEncoder *enc; @@ -218,14 +217,13 @@ static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn) /* cannot find a suitable CRTC */ return \-ENOENT; } -.ft P -.fi +.EE .UNINDENT .UNINDENT .SH REPORTING BUGS .sp Bugs in this manual should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrm\-memory\fP(7), \fBdrmModeGetResources\fP(3), diff --git a/lib/libdrm/mk/man/drm-memory.7 b/lib/libdrm/mk/man/drm-memory.7 index 56dbc4428..499b92fad 100644 --- a/lib/libdrm/mk/man/drm-memory.7 +++ b/lib/libdrm/mk/man/drm-memory.7 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRM-MEMORY" 7 "September 2012" "" "Direct Rendering Manager" +.TH "DRM-MEMORY" "7" "September 2012" "" "Direct Rendering Manager" .SH NAME drm-memory \- DRM Memory Management .SH SYNOPSIS @@ -67,8 +67,7 @@ The \fBDRM_IOCTL_MODE_CREATE_DUMB\fP ioctl takes as argument a structure of type .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_mode_create_dumb { __u32 height; __u32 width; @@ -79,8 +78,7 @@ struct drm_mode_create_dumb { __u32 pitch; __u64 size; }; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -104,16 +102,14 @@ To prepare the buffer for \fBmmap\fP(2) you need to use the .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_mode_map_dumb { __u32 handle; __u32 pad; __u64 offset; }; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -130,13 +126,11 @@ structure of type \fBstruct drm_mode_destroy_dumb\fP: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_mode_destroy_dumb { __u32 handle; }; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -217,14 +211,12 @@ GEM\-handles. To create a name for a GEM\-handle, you use the .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_gem_flink { __u32 handle; __u32 name; }; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -236,16 +228,14 @@ this name to other processes which can then import the name with the .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_gem_open { __u32 name; __u32 handle; __u32 size; }; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -289,8 +279,7 @@ can be used for scanout with the KMS API (see \fBdrm\-kms\fP(7)). .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX struct drm_mode_create_dumb creq; struct drm_mode_destroy_dumb dreq; struct drm_mode_map_dumb mreq; @@ -338,14 +327,13 @@ if (map == MAP_FAILED) { /* clear the framebuffer to 0 */ memset(map, 0, creq.size); -.ft P -.fi +.EE .UNINDENT .UNINDENT .SH REPORTING BUGS .sp Bugs in this manual should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrm\-kms\fP(7), \fBdrm\-prime\fP(7), \fBdrmAvailable\fP(3), diff --git a/lib/libdrm/mk/man/drm.7 b/lib/libdrm/mk/man/drm.7 index 20d52469d..bd321ae64 100644 --- a/lib/libdrm/mk/man/drm.7 +++ b/lib/libdrm/mk/man/drm.7 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRM" 7 "September 2012" "" "Direct Rendering Manager" +.TH "DRM" "7" "September 2012" "" "Direct Rendering Manager" .SH NAME drm \- Direct Rendering Manager .SH SYNOPSIS @@ -91,7 +91,7 @@ memory management, see \fBdrm\-memory\fP(7). .SH REPORTING BUGS .sp Bugs in this manual should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP\&. + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> \&. .SH SEE ALSO .sp \fBdrm\-kms\fP(7), \fBdrm\-memory\fP(7), \fBdrmSetMaster\fP(3), diff --git a/lib/libdrm/mk/man/drmAvailable.3 b/lib/libdrm/mk/man/drmAvailable.3 index 19a5f64c4..ce29962d7 100644 --- a/lib/libdrm/mk/man/drmAvailable.3 +++ b/lib/libdrm/mk/man/drmAvailable.3 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRMAVAILABLE" 3 "September 2012" "" "Direct Rendering Manager" +.TH "DRMAVAILABLE" "3" "September 2012" "" "Direct Rendering Manager" .SH NAME drmAvailable \- determine whether a DRM kernel driver has been loaded .SH SYNOPSIS @@ -46,7 +46,7 @@ Otherwise 0 is returned. .SH REPORTING BUGS .sp Bugs in this function should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrmOpen\fP(3) diff --git a/lib/libdrm/mk/man/drmHandleEvent.3 b/lib/libdrm/mk/man/drmHandleEvent.3 index fcfc2aa44..82079b31d 100644 --- a/lib/libdrm/mk/man/drmHandleEvent.3 +++ b/lib/libdrm/mk/man/drmHandleEvent.3 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRMHANDLEEVENT" 3 "September 2012" "" "Direct Rendering Manager" +.TH "DRMHANDLEEVENT" "3" "September 2012" "" "Direct Rendering Manager" .SH NAME drmHandleEvent \- read and process pending DRM events .SH SYNOPSIS @@ -45,8 +45,7 @@ parameters noted below: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX typedef struct _drmEventContext { int version; void (*vblank_handler) (int fd, @@ -60,8 +59,7 @@ typedef struct _drmEventContext { unsigned int tv_usec, void *user_data) } drmEventContext, *drmEventContextPtr; -.ft P -.fi +.EE .UNINDENT .UNINDENT .SH RETURN VALUE @@ -72,7 +70,7 @@ file\-descriptor fails or returns less than a full event record. .SH REPORTING BUGS .sp Bugs in this function should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrm\-kms\fP(7), \fBdrmModePageFlip\fP(3), diff --git a/lib/libdrm/mk/man/drmModeGetResources.3 b/lib/libdrm/mk/man/drmModeGetResources.3 index 8034bce69..f0baa4363 100644 --- a/lib/libdrm/mk/man/drmModeGetResources.3 +++ b/lib/libdrm/mk/man/drmModeGetResources.3 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DRMMODEGETRESOURCES" 3 "September 2012" "" "Direct Rendering Manager" +.TH "DRMMODEGETRESOURCES" "3" "September 2012" "" "Direct Rendering Manager" .SH NAME drmModeGetResources \- retrieve current display configuration information .SH SYNOPSIS @@ -45,8 +45,7 @@ configuration. The structure contains the following fields: .INDENT 0.0 .INDENT 3.5 .sp -.nf -.ft C +.EX typedef struct _drmModeRes { int count_fbs; uint32_t *fbs; @@ -63,8 +62,7 @@ typedef struct _drmModeRes { uint32_t min_width, max_width; uint32_t min_height, max_height; } drmModeRes, *drmModeResPtr; -.ft P -.fi +.EE .UNINDENT .UNINDENT .sp @@ -100,7 +98,7 @@ success, NULL on failure. The returned structure must be freed with .SH REPORTING BUGS .sp Bugs in this function should be reported to -\fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP + <https://gitlab.freedesktop.org/mesa/drm/\-/issues> .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrm\-kms\fP(7), \fBdrmModeGetFB\fP(3), \fBdrmModeAddFB\fP(3), diff --git a/lib/libdrm/mk/pkgconfig/gen_libdrm.sh b/lib/libdrm/mk/pkgconfig/gen_libdrm.sh index 2bd2739be..21d240e5b 100644 --- a/lib/libdrm/mk/pkgconfig/gen_libdrm.sh +++ b/lib/libdrm/mk/pkgconfig/gen_libdrm.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: gen_libdrm.sh,v 1.1 2021/02/11 10:34:51 jsg Exp $ +# $OpenBSD: gen_libdrm.sh,v 1.2 2024/10/17 10:00:00 jsg Exp $ # # Copyright (c) 2010,2011 Jasper Lievisse Adriaanse <jasper@openbsd.org> # @@ -50,7 +50,7 @@ if [ ! -w "${objdir}" ]; then exit 1 fi -lib_version=$(fgrep -m1 version ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") +lib_version=$(fgrep -m1 'version :' ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") pc_file="${objdir}/libdrm.pc" cat > ${pc_file} << __EOF__ diff --git a/lib/libdrm/mk/pkgconfig/gen_libdrm_amdgpu.sh b/lib/libdrm/mk/pkgconfig/gen_libdrm_amdgpu.sh index 73e2397c0..31d66f68b 100644 --- a/lib/libdrm/mk/pkgconfig/gen_libdrm_amdgpu.sh +++ b/lib/libdrm/mk/pkgconfig/gen_libdrm_amdgpu.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: gen_libdrm_amdgpu.sh,v 1.1 2021/02/11 10:34:51 jsg Exp $ +# $OpenBSD: gen_libdrm_amdgpu.sh,v 1.2 2024/10/17 10:00:00 jsg Exp $ # # Copyright (c) 2010,2011 Jasper Lievisse Adriaanse <jasper@openbsd.org> # @@ -50,7 +50,7 @@ if [ ! -w "${objdir}" ]; then exit 1 fi -lib_version=$(fgrep -m1 version ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") +lib_version=$(fgrep -m1 'version :' ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") pc_file="${objdir}/libdrm_amdgpu.pc" cat > ${pc_file} << __EOF__ diff --git a/lib/libdrm/mk/pkgconfig/gen_libdrm_intel.sh b/lib/libdrm/mk/pkgconfig/gen_libdrm_intel.sh index 54875e936..3f6075aee 100644 --- a/lib/libdrm/mk/pkgconfig/gen_libdrm_intel.sh +++ b/lib/libdrm/mk/pkgconfig/gen_libdrm_intel.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: gen_libdrm_intel.sh,v 1.1 2021/02/11 10:34:51 jsg Exp $ +# $OpenBSD: gen_libdrm_intel.sh,v 1.2 2024/10/17 10:00:00 jsg Exp $ # # Copyright (c) 2010,2011 Jasper Lievisse Adriaanse <jasper@openbsd.org> # @@ -50,7 +50,7 @@ if [ ! -w "${objdir}" ]; then exit 1 fi -lib_version=$(fgrep -m1 version ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") +lib_version=$(fgrep -m1 'version :' ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") pc_file="${objdir}/libdrm_intel.pc" cat > ${pc_file} << __EOF__ diff --git a/lib/libdrm/mk/pkgconfig/gen_libdrm_radeon.sh b/lib/libdrm/mk/pkgconfig/gen_libdrm_radeon.sh index 1860cc30f..b0112fcb6 100644 --- a/lib/libdrm/mk/pkgconfig/gen_libdrm_radeon.sh +++ b/lib/libdrm/mk/pkgconfig/gen_libdrm_radeon.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: gen_libdrm_radeon.sh,v 1.1 2021/02/11 10:34:51 jsg Exp $ +# $OpenBSD: gen_libdrm_radeon.sh,v 1.2 2024/10/17 10:00:00 jsg Exp $ # # Copyright (c) 2010,2011 Jasper Lievisse Adriaanse <jasper@openbsd.org> # @@ -50,7 +50,7 @@ if [ ! -w "${objdir}" ]; then exit 1 fi -lib_version=$(fgrep -m1 version ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") +lib_version=$(fgrep -m1 'version :' ${curdir}/../../meson.build | sed -e "s/^.*'\(.*\)'.*$/\1/") pc_file="${objdir}/libdrm_radeon.pc" cat > ${pc_file} << __EOF__ diff --git a/lib/libdrm/nouveau/Android.mk b/lib/libdrm/nouveau/Android.mk deleted file mode 100644 index b430af4fd..000000000 --- a/lib/libdrm/nouveau/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_NOUVEAU_FILES, LIBDRM_NOUVEAU_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_nouveau - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/nouveau/Makefile.sources b/lib/libdrm/nouveau/Makefile.sources deleted file mode 100644 index 89f2a2b5c..000000000 --- a/lib/libdrm/nouveau/Makefile.sources +++ /dev/null @@ -1,9 +0,0 @@ -LIBDRM_NOUVEAU_FILES := \ - nouveau.c \ - pushbuf.c \ - bufctx.c \ - abi16.c \ - private.h - -LIBDRM_NOUVEAU_H_FILES := \ - nouveau.h diff --git a/lib/libdrm/omap/Android.mk b/lib/libdrm/omap/Android.mk deleted file mode 100644 index b25cca13c..000000000 --- a/lib/libdrm/omap/Android.mk +++ /dev/null @@ -1,13 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := libdrm_omap -LOCAL_VENDOR_MODULE := true - -LOCAL_SRC_FILES := omap_drm.c - -LOCAL_SHARED_LIBRARIES := libdrm - -include $(LIBDRM_COMMON_MK) - -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/radeon/Android.mk b/lib/libdrm/radeon/Android.mk deleted file mode 100644 index 71040dab7..000000000 --- a/lib/libdrm/radeon/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -# Import variables LIBDRM_RADEON_FILES, LIBDRM_RADEON_H_FILES -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_radeon - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) - -include $(LIBDRM_COMMON_MK) -include $(BUILD_SHARED_LIBRARY) diff --git a/lib/libdrm/radeon/Makefile.sources b/lib/libdrm/radeon/Makefile.sources deleted file mode 100644 index 1cf482a4e..000000000 --- a/lib/libdrm/radeon/Makefile.sources +++ /dev/null @@ -1,21 +0,0 @@ -LIBDRM_RADEON_FILES := \ - radeon_bo_gem.c \ - radeon_cs_gem.c \ - radeon_cs_space.c \ - radeon_bo.c \ - radeon_cs.c \ - radeon_surface.c - -LIBDRM_RADEON_H_FILES := \ - radeon_bo.h \ - radeon_cs.h \ - radeon_surface.h \ - radeon_bo_gem.h \ - radeon_cs_gem.h \ - radeon_bo_int.h \ - radeon_cs_int.h \ - r600_pci_ids.h - -LIBDRM_RADEON_BOF_FILES := \ - bof.c \ - bof.h diff --git a/lib/libdrm/tests/Android.mk b/lib/libdrm/tests/Android.mk deleted file mode 100644 index 5053e7d64..000000000 --- a/lib/libdrm/tests/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(call all-subdir-makefiles) diff --git a/lib/libdrm/tests/modetest/Android.mk b/lib/libdrm/tests/modetest/Android.mk deleted file mode 100644 index c1a71fd97..000000000 --- a/lib/libdrm/tests/modetest/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_SRC_FILES := $(MODETEST_FILES) - -LOCAL_MODULE := modetest - -LOCAL_SHARED_LIBRARIES := libdrm -LOCAL_STATIC_LIBRARIES := libdrm_util - -include $(LIBDRM_COMMON_MK) -include $(BUILD_EXECUTABLE) diff --git a/lib/libdrm/tests/modetest/Makefile.sources b/lib/libdrm/tests/modetest/Makefile.sources deleted file mode 100644 index 399af0df1..000000000 --- a/lib/libdrm/tests/modetest/Makefile.sources +++ /dev/null @@ -1,6 +0,0 @@ -MODETEST_FILES := \ - buffers.c \ - buffers.h \ - cursor.c \ - cursor.h \ - modetest.c diff --git a/lib/libdrm/tests/proptest/Android.mk b/lib/libdrm/tests/proptest/Android.mk deleted file mode 100644 index 91a590fc9..000000000 --- a/lib/libdrm/tests/proptest/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_SRC_FILES := $(PROPTEST_FILES) - -LOCAL_MODULE := proptest - -LOCAL_SHARED_LIBRARIES := libdrm -LOCAL_STATIC_LIBRARIES := libdrm_util - -include $(LIBDRM_COMMON_MK) -include $(BUILD_EXECUTABLE) diff --git a/lib/libdrm/tests/proptest/Makefile.sources b/lib/libdrm/tests/proptest/Makefile.sources deleted file mode 100644 index 446110d68..000000000 --- a/lib/libdrm/tests/proptest/Makefile.sources +++ /dev/null @@ -1,2 +0,0 @@ -PROPTEST_FILES := \ - proptest.c diff --git a/lib/libdrm/tests/util/Android.mk b/lib/libdrm/tests/util/Android.mk deleted file mode 100644 index 12eccb42a..000000000 --- a/lib/libdrm/tests/util/Android.mk +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright © 2015 NVIDIA Corporation -# -# 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, sublicense, -# 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 NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -include $(LOCAL_PATH)/Makefile.sources - -LOCAL_MODULE := libdrm_util - -LOCAL_SHARED_LIBRARIES := libdrm - -LOCAL_SRC_FILES := $(UTIL_FILES) - -LOCAL_EXPORT_C_INCLUDE_DIRS := $(LIBDRM_TOP)/tests - -include $(LIBDRM_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) diff --git a/lib/libdrm/tests/util/Makefile.sources b/lib/libdrm/tests/util/Makefile.sources deleted file mode 100644 index e5f851136..000000000 --- a/lib/libdrm/tests/util/Makefile.sources +++ /dev/null @@ -1,8 +0,0 @@ -UTIL_FILES := \ - common.h \ - format.c \ - format.h \ - kms.c \ - kms.h \ - pattern.c \ - pattern.h diff --git a/lib/libdrm/vc4/Makefile.sources b/lib/libdrm/vc4/Makefile.sources deleted file mode 100644 index 8bf97ff1e..000000000 --- a/lib/libdrm/vc4/Makefile.sources +++ /dev/null @@ -1,3 +0,0 @@ -LIBDRM_VC4_H_FILES := \ - vc4_packet.h \ - vc4_qpu_defines.h diff --git a/lib/libdrm/xf86drm.c b/lib/libdrm/xf86drm.c index 4cd0a488d..9bb27a58e 100644 --- a/lib/libdrm/xf86drm.c +++ b/lib/libdrm/xf86drm.c @@ -60,7 +60,6 @@ #if HAVE_SYS_SYSCTL_H #include <sys/sysctl.h> #endif -#include <math.h> #include <inttypes.h> #if defined(__FreeBSD__) @@ -4502,14 +4501,24 @@ process_device(drmDevicePtr *device, const char *d_name, { struct stat sbuf; char node[PATH_MAX + 1]; - int node_type, subsystem_type; + int node_type, subsystem_type, written; unsigned int maj, min; + const int max_node_length = ALIGN(drmGetMaxNodeName(), sizeof(void *)); node_type = drmGetNodeType(d_name); if (node_type < 0) return -1; - snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, d_name); + written = snprintf(node, PATH_MAX, "%s/%s", DRM_DIR_NAME, d_name); + if (written < 0) + return -1; + + /* anything longer than this will be truncated in drmDeviceAlloc. + * Account for NULL byte + */ + if (written + 1 > max_node_length) + return -1; + if (stat(node, &sbuf)) return -1; diff --git a/lib/libdrm/xf86drm.h b/lib/libdrm/xf86drm.h index 01be18788..15bfffe2b 100644 --- a/lib/libdrm/xf86drm.h +++ b/lib/libdrm/xf86drm.h @@ -919,6 +919,11 @@ extern int drmGetDeviceFromDevId(dev_t dev_id, uint32_t flags, drmDevicePtr *dev */ extern int drmGetNodeTypeFromDevId(dev_t devid); +/** + * Check if two drmDevice pointers represent the same DRM device. + * + * Returns 1 if the devices are equal, 0 otherwise. + */ extern int drmDevicesEqual(drmDevicePtr a, drmDevicePtr b); extern int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle); |