libdrm: update to 2.4.100 Changes build framework to meson. [ANNOUNCE] libdrm 2.4.110 misc bug fixes [ANNOUNCE] libdrm 2.4.109 misc bug fixes [ANNOUNCE] libdrm 2.4.108 misc bug fixes, build fixes [ANNOUNCE] libdrm 2.4.107 misc bug fixes, update AMD product names [ANNOUNCE] libdrm 2.4.106 Some nouveau debug, amdgpu tests, and a regression fix from 105. Releasing so 105 doesn't end up being used a lot with a regression. [ANNOUNCE] libdrm 2.4.105 misc bug fixes, update AMD product names [ANNOUNCE] libdrm 2.4.104 This release brings updated kernel headers and converts man pages to reStructuredText. [ANNOUNCE] libdrm 2.4.103 libdrm mostly for new hw and ame names. [ANNOUNCE] libdrm 2.4.102 lots of FreeBSD and modetest stuff. [ANNOUNCE] libdrm 2.4.101 misc bug fixes, update AMD product namesdiff -r1.97 -r1.98 pkgsrc/x11/libdrm/Makefile
(tnn)
@@ -1,65 +1,98 @@ | @@ -1,65 +1,98 @@ | |||
1 | # $NetBSD: Makefile,v 1.97 2021/12/01 13:01:15 nia Exp $ | 1 | # $NetBSD: Makefile,v 1.98 2022/03/13 15:20:01 tnn Exp $ | |
2 | 2 | |||
3 | DISTNAME= libdrm-2.4.100 | 3 | DISTNAME= libdrm-2.4.110 | |
4 | CATEGORIES= x11 graphics | 4 | CATEGORIES= x11 graphics | |
5 | MASTER_SITES= https://dri.freedesktop.org/libdrm/ | 5 | MASTER_SITES= https://dri.freedesktop.org/libdrm/ | |
6 | EXTRACT_SUFX= .tar.xz | |||
6 | 7 | |||
7 | MAINTAINER= joerg@NetBSD.org | 8 | MAINTAINER= joerg@NetBSD.org | |
8 | HOMEPAGE= https://dri.freedesktop.org/wiki/DRM | 9 | HOMEPAGE= https://dri.freedesktop.org/wiki/DRM | |
9 | COMMENT= Userspace interface to kernel DRM services | 10 | COMMENT= Userspace interface to kernel DRM services | |
10 | LICENSE= mit | 11 | LICENSE= mit | |
11 | 12 | |||
12 | # Platforms with kernel support for DRM | 13 | # Platforms with kernel support for DRM | |
13 | ONLY_FOR_PLATFORM= NetBSD-*-* DragonFly-*-* FreeBSD-*-* OpenBSD-*-* \ | 14 | ONLY_FOR_PLATFORM= NetBSD-*-* DragonFly-*-* FreeBSD-*-* OpenBSD-*-* \ | |
14 | Linux-*-* SunOS-*-* | 15 | Linux-*-* SunOS-*-* | |
15 | 16 | |||
16 | USE_PKGLOCALEDIR= yes | 17 | USE_TOOLS+= pkg-config | |
17 | USE_TOOLS+= gmake pkg-config | 18 | ||
18 | USE_LIBTOOL= yes | 19 | PKGCONFIG_OVERRIDE+= amdgpu/libdrm_amdgpu.pc.in | |
20 | PKGCONFIG_OVERRIDE+= etnaviv/libdrm_etnaviv.pc.in | |||
21 | PKGCONFIG_OVERRIDE+= exynos/libdrm_exynos.pc.in | |||
22 | PKGCONFIG_OVERRIDE+= freedreno/libdrm_freedreno.pc.in | |||
23 | PKGCONFIG_OVERRIDE+= intel/libdrm_intel.pc.in | |||
24 | PKGCONFIG_OVERRIDE+= libkms/libkms.pc.in | |||
25 | PKGCONFIG_OVERRIDE+= nouveau/libdrm_nouveau.pc.in | |||
26 | PKGCONFIG_OVERRIDE+= omap/libdrm_omap.pc.in | |||
27 | PKGCONFIG_OVERRIDE+= radeon/libdrm_radeon.pc.in | |||
28 | PKGCONFIG_OVERRIDE+= tegra/libdrm_tegra.pc.in | |||
29 | PKGCONFIG_OVERRIDE+= vc4/libdrm_vc4.pc.in | |||
19 | PKGCONFIG_OVERRIDE+= libdrm.pc.in | 30 | PKGCONFIG_OVERRIDE+= libdrm.pc.in | |
20 | GNU_CONFIGURE= yes | |||
21 | 31 | |||
22 | .include "../../mk/bsd.prefs.mk" | 32 | .include "../../mk/bsd.prefs.mk" | |
23 | 33 | |||
24 | SUBST_CLASSES+= atomic | 34 | SUBST_CLASSES+= atomic | |
25 | SUBST_FILES.atomic= xf86drm.h | 35 | SUBST_FILES.atomic= xf86drm.h | |
26 | SUBST_MESSAGE.atomic= Configuring atomic operations in xf86drm.h | 36 | SUBST_MESSAGE.atomic= Configuring atomic operations in xf86drm.h | |
27 | SUBST_STAGE.atomic= pre-configure | 37 | SUBST_STAGE.atomic= pre-configure | |
28 | SUBST_VARS.atomic= ATOMIC_OPS_CHECK | 38 | SUBST_VARS.atomic= ATOMIC_OPS_CHECK | |
29 | 39 | |||
30 | ATOMIC_OPS_CHECK= 0 | 40 | ATOMIC_OPS_CHECK= 0 | |
31 | .if exists(${CROSS_DESTDIR}/usr/include/sys/atomic.h) | 41 | .if exists(${CROSS_DESTDIR}/usr/include/sys/atomic.h) | |
32 | ATOMIC_OPS_CHECK= 1 | 42 | ATOMIC_OPS_CHECK= 1 | |
33 | .else | 43 | .else | |
34 | . include "../../devel/libatomic_ops/buildlink3.mk" | 44 | . include "../../devel/libatomic_ops/buildlink3.mk" | |
35 | CONFIGURE_ENV+= drm_cv_atomic_primitives=libatomic-ops | |||
36 | .endif | 45 | .endif | |
37 | 46 | |||
38 | CONFIGURE_ARGS+= PTHREADSTUBS_CFLAGS=-I${PREFIX}/include \ | 47 | PLIST_VARS+= intel arm kms | |
39 | PTHREADSTUBS_LIBS=-L${PREFIX}/lib | |||
40 | CONFIGURE_ARGS+= --disable-manpages | |||
41 | CONFIGURE_ARGS+= --disable-valgrind | |||
42 | 48 | |||
43 | LDFLAGS.NetBSD+= -lpci | 49 | .if ${OPSYS} == "Linux" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "NetBSD" | |
50 | MESON_ARGS+= -Dlibkms=true | |||
51 | PLIST.kms= yes | |||
52 | .else | |||
53 | MESON_ARGS+= -Dlibkms=false | |||
54 | .endif | |||
44 | 55 | |||
45 | PLIST_VARS+= intel arm kms | 56 | PLIST_VARS+= intel arm kms | |
46 | .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" | 57 | .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" | |
47 | # libpciaccess is needed to build support for the intel KMS API, | 58 | MESON_ARGS+= -Dintel=true | |
48 | # libdrm_intel.so. | 59 | MESON_ARGS+= -Dvmwgfx=true | |
49 | .include "../../sysutils/libpciaccess/buildlink3.mk" | 60 | .include "../../sysutils/libpciaccess/buildlink3.mk" | |
50 | PLIST.intel= yes | 61 | PLIST.intel= yes | |
51 | .elif !empty(MACHINE_ARCH:Marm*) || \ | 62 | .else | |
63 | MESON_ARGS+= -Dintel=false | |||
64 | MESON_ARGS+= -Dvmwgfx=false | |||
65 | .endif | |||
66 | ||||
67 | MESON_ARGS+= -Dradeon=true | |||
68 | MESON_ARGS+= -Damdgpu=true | |||
69 | MESON_ARGS+= -Dnouveau=true | |||
70 | ||||
71 | .if !empty(MACHINE_ARCH:Marm*) || \ | |||
52 | !empty(MACHINE_ARCH:Mearm*) || \ | 72 | !empty(MACHINE_ARCH:Mearm*) || \ | |
53 | ${MACHINE_ARCH} == "aarch64" | 73 | ${MACHINE_ARCH} == "aarch64" | |
74 | MESON_ARGS+= -Detnaviv=true | |||
75 | MESON_ARGS+= -Dexynos=true | |||
76 | MESON_ARGS+= -Dfreedreno=true | |||
77 | MESON_ARGS+= -Dvc4=true | |||
78 | MESON_ARGS+= -Domap=true | |||
79 | MESON_ARGS+= -Dtegra=true | |||
54 | PLIST.arm= yes | 80 | PLIST.arm= yes | |
55 | #.else | 81 | .else | |
56 | #CONFIGURE_ARGS+= --disable-intel | 82 | MESON_ARGS+= -Detnaviv=false | |
83 | MESON_ARGS+= -Dexynos=false | |||
84 | MESON_ARGS+= -Dfreedreno=false | |||
85 | MESON_ARGS+= -Domap=false | |||
86 | MESON_ARGS+= -Dtegra=false | |||
87 | MESON_ARGS+= -Dvc4=false | |||
57 | .endif | 88 | .endif | |
58 | 89 | |||
59 | .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" | 90 | MESON_ARGS+= -Dman-pages=false | |
60 | PLIST.kms= yes | 91 | MESON_ARGS+= -Dvalgrind=false | |
61 | .endif | 92 | ||
93 | LDFLAGS.NetBSD+= -lpci | |||
62 | 94 | |||
63 | X11_BUILTIN_NAME?= libdrm | 95 | X11_BUILTIN_NAME?= libdrm | |
64 | .include "../../meta-pkgs/modular-xorg/avoid-duplicate.mk" | 96 | .include "../../meta-pkgs/modular-xorg/avoid-duplicate.mk" | |
97 | .include "../../devel/meson/build.mk" | |||
65 | .include "../../mk/bsd.pkg.mk" | 98 | .include "../../mk/bsd.pkg.mk" |
@@ -1,65 +1,102 @@ | @@ -1,65 +1,102 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.22 2021/07/20 09:43:22 tnn Exp $ | 1 | @comment $NetBSD: PLIST,v 1.23 2022/03/13 15:20:01 tnn Exp $ | |
2 | ${PLIST.arm}include/exynos/exynos_drm.h | |||
3 | ${PLIST.arm}include/exynos/exynos_fimg2d.h | |||
2 | ${PLIST.arm}include/freedreno/freedreno_drmif.h | 4 | ${PLIST.arm}include/freedreno/freedreno_drmif.h | |
3 | ${PLIST.arm}include/freedreno/freedreno_ringbuffer.h | 5 | ${PLIST.arm}include/freedreno/freedreno_ringbuffer.h | |
4 | include/libdrm/amdgpu.h | 6 | include/libdrm/amdgpu.h | |
5 | include/libdrm/amdgpu_drm.h | 7 | include/libdrm/amdgpu_drm.h | |
6 | include/libdrm/drm.h | 8 | include/libdrm/drm.h | |
7 | include/libdrm/drm_fourcc.h | 9 | include/libdrm/drm_fourcc.h | |
8 | include/libdrm/drm_mode.h | 10 | include/libdrm/drm_mode.h | |
9 | include/libdrm/drm_sarea.h | 11 | include/libdrm/drm_sarea.h | |
12 | ${PLIST.arm}include/libdrm/etnaviv_drmif.h | |||
13 | ${PLIST.arm}include/libdrm/exynos_drmif.h | |||
10 | include/libdrm/i915_drm.h | 14 | include/libdrm/i915_drm.h | |
11 | ${PLIST.intel}include/libdrm/intel_aub.h | 15 | ${PLIST.intel}include/libdrm/intel_aub.h | |
12 | ${PLIST.intel}include/libdrm/intel_bufmgr.h | 16 | ${PLIST.intel}include/libdrm/intel_bufmgr.h | |
13 | ${PLIST.intel}include/libdrm/intel_debug.h | 17 | ${PLIST.intel}include/libdrm/intel_debug.h | |
14 | include/libdrm/mach64_drm.h | 18 | include/libdrm/mach64_drm.h | |
15 | include/libdrm/mga_drm.h | 19 | include/libdrm/mga_drm.h | |
16 | include/libdrm/msm_drm.h | 20 | include/libdrm/msm_drm.h | |
17 | include/libdrm/nouveau/nouveau.h | 21 | include/libdrm/nouveau/nouveau.h | |
18 | include/libdrm/nouveau/nvif/cl0080.h | 22 | include/libdrm/nouveau/nvif/cl0080.h | |
19 | include/libdrm/nouveau/nvif/cl9097.h | 23 | include/libdrm/nouveau/nvif/cl9097.h | |
20 | include/libdrm/nouveau/nvif/class.h | 24 | include/libdrm/nouveau/nvif/class.h | |
21 | include/libdrm/nouveau/nvif/if0002.h | 25 | include/libdrm/nouveau/nvif/if0002.h | |
22 | include/libdrm/nouveau/nvif/if0003.h | 26 | include/libdrm/nouveau/nvif/if0003.h | |
23 | include/libdrm/nouveau/nvif/ioctl.h | 27 | include/libdrm/nouveau/nvif/ioctl.h | |
24 | include/libdrm/nouveau/nvif/unpack.h | 28 | include/libdrm/nouveau/nvif/unpack.h | |
25 | include/libdrm/nouveau_drm.h | 29 | include/libdrm/nouveau_drm.h | |
30 | ${PLIST.arm}include/libdrm/omap_drmif.h | |||
26 | include/libdrm/qxl_drm.h | 31 | include/libdrm/qxl_drm.h | |
27 | include/libdrm/r128_drm.h | 32 | include/libdrm/r128_drm.h | |
28 | include/libdrm/r600_pci_ids.h | 33 | include/libdrm/r600_pci_ids.h | |
29 | include/libdrm/radeon_bo.h | 34 | include/libdrm/radeon_bo.h | |
30 | include/libdrm/radeon_bo_gem.h | 35 | include/libdrm/radeon_bo_gem.h | |
31 | include/libdrm/radeon_bo_int.h | 36 | include/libdrm/radeon_bo_int.h | |
32 | include/libdrm/radeon_cs.h | 37 | include/libdrm/radeon_cs.h | |
33 | include/libdrm/radeon_cs_gem.h | 38 | include/libdrm/radeon_cs_gem.h | |
34 | include/libdrm/radeon_cs_int.h | 39 | include/libdrm/radeon_cs_int.h | |
35 | include/libdrm/radeon_drm.h | 40 | include/libdrm/radeon_drm.h | |
36 | include/libdrm/radeon_surface.h | 41 | include/libdrm/radeon_surface.h | |
37 | include/libdrm/savage_drm.h | 42 | include/libdrm/savage_drm.h | |
38 | include/libdrm/sis_drm.h | 43 | include/libdrm/sis_drm.h | |
44 | ${PLIST.arm}include/libdrm/tegra.h | |||
39 | include/libdrm/tegra_drm.h | 45 | include/libdrm/tegra_drm.h | |
40 | include/libdrm/vc4_drm.h | 46 | include/libdrm/vc4_drm.h | |
41 | ${PLIST.arm}include/libdrm/vc4_packet.h | 47 | ${PLIST.arm}include/libdrm/vc4_packet.h | |
42 | ${PLIST.arm}include/libdrm/vc4_qpu_defines.h | 48 | ${PLIST.arm}include/libdrm/vc4_qpu_defines.h | |
43 | include/libdrm/via_drm.h | 49 | include/libdrm/via_drm.h | |
44 | include/libdrm/virtgpu_drm.h | 50 | include/libdrm/virtgpu_drm.h | |
45 | include/libdrm/vmwgfx_drm.h | 51 | ${PLIST.intel}include/libdrm/vmwgfx_drm.h | |
46 | ${PLIST.kms}include/libkms/libkms.h | 52 | ${PLIST.kms}include/libkms/libkms.h | |
47 | include/libsync.h | 53 | include/libsync.h | |
54 | ${PLIST.arm}include/omap/omap_drm.h | |||
48 | include/xf86drm.h | 55 | include/xf86drm.h | |
49 | include/xf86drmMode.h | 56 | include/xf86drmMode.h | |
50 | lib/libdrm.la | 57 | lib/libdrm.so | |
51 | lib/libdrm_amdgpu.la | 58 | lib/libdrm.so.2 | |
52 | ${PLIST.arm}lib/libdrm_freedreno.la | 59 | lib/libdrm.so.2.4.0 | |
53 | ${PLIST.intel}lib/libdrm_intel.la | 60 | lib/libdrm_amdgpu.so | |
54 | lib/libdrm_nouveau.la | 61 | lib/libdrm_amdgpu.so.1 | |
55 | lib/libdrm_radeon.la | 62 | lib/libdrm_amdgpu.so.1.0.0 | |
56 | ${PLIST.kms}lib/libkms.la | 63 | ${PLIST.arm}lib/libdrm_etnaviv.so | |
64 | ${PLIST.arm}lib/libdrm_etnaviv.so.1 | |||
65 | ${PLIST.arm}lib/libdrm_etnaviv.so.1.0.0 | |||
66 | ${PLIST.arm}lib/libdrm_exynos.so | |||
67 | ${PLIST.arm}lib/libdrm_exynos.so.1 | |||
68 | ${PLIST.arm}lib/libdrm_exynos.so.1.0.0 | |||
69 | ${PLIST.arm}lib/libdrm_freedreno.so | |||
70 | ${PLIST.arm}lib/libdrm_freedreno.so.1 | |||
71 | ${PLIST.arm}lib/libdrm_freedreno.so.1.0.0 | |||
72 | ${PLIST.intel}lib/libdrm_intel.so | |||
73 | ${PLIST.intel}lib/libdrm_intel.so.1 | |||
74 | ${PLIST.intel}lib/libdrm_intel.so.1.0.0 | |||
75 | lib/libdrm_nouveau.so | |||
76 | lib/libdrm_nouveau.so.2 | |||
77 | lib/libdrm_nouveau.so.2.0.0 | |||
78 | ${PLIST.arm}lib/libdrm_omap.so | |||
79 | ${PLIST.arm}lib/libdrm_omap.so.1 | |||
80 | ${PLIST.arm}lib/libdrm_omap.so.1.0.0 | |||
81 | lib/libdrm_radeon.so | |||
82 | lib/libdrm_radeon.so.1 | |||
83 | lib/libdrm_radeon.so.1.0.1 | |||
84 | ${PLIST.arm}lib/libdrm_tegra.so | |||
85 | ${PLIST.arm}lib/libdrm_tegra.so.0 | |||
86 | ${PLIST.arm}lib/libdrm_tegra.so.0.0.0 | |||
87 | ${PLIST.kms}lib/libkms.so | |||
88 | ${PLIST.kms}lib/libkms.so.1 | |||
89 | ${PLIST.kms}lib/libkms.so.1.0.0 | |||
57 | lib/pkgconfig/libdrm.pc | 90 | lib/pkgconfig/libdrm.pc | |
58 | lib/pkgconfig/libdrm_amdgpu.pc | 91 | lib/pkgconfig/libdrm_amdgpu.pc | |
92 | ${PLIST.arm}lib/pkgconfig/libdrm_etnaviv.pc | |||
93 | ${PLIST.arm}lib/pkgconfig/libdrm_exynos.pc | |||
59 | ${PLIST.arm}lib/pkgconfig/libdrm_freedreno.pc | 94 | ${PLIST.arm}lib/pkgconfig/libdrm_freedreno.pc | |
60 | ${PLIST.intel}lib/pkgconfig/libdrm_intel.pc | 95 | ${PLIST.intel}lib/pkgconfig/libdrm_intel.pc | |
61 | lib/pkgconfig/libdrm_nouveau.pc | 96 | lib/pkgconfig/libdrm_nouveau.pc | |
97 | ${PLIST.arm}lib/pkgconfig/libdrm_omap.pc | |||
62 | lib/pkgconfig/libdrm_radeon.pc | 98 | lib/pkgconfig/libdrm_radeon.pc | |
63 | ${PLIST.kms}lib/pkgconfig/libkms.pc | 99 | ${PLIST.arm}lib/pkgconfig/libdrm_tegra.pc | |
64 | ${PLIST.arm}lib/pkgconfig/libdrm_vc4.pc | 100 | ${PLIST.arm}lib/pkgconfig/libdrm_vc4.pc | |
101 | ${PLIST.kms}lib/pkgconfig/libkms.pc | |||
65 | share/libdrm/amdgpu.ids | 102 | share/libdrm/amdgpu.ids |
@@ -1,13 +1,20 @@ | @@ -1,13 +1,20 @@ | |||
1 | $NetBSD: distinfo,v 1.99 2021/10/26 11:34:08 nia Exp $ | 1 | $NetBSD: distinfo,v 1.100 2022/03/13 15:20:01 tnn Exp $ | |
2 | 2 | |||
3 | BLAKE2s (libdrm-2.4.100.tar.gz) = 1cfd02d9d2ec59d0a32ba5287908d7056aa262e45c186f35b5fc327e99afb69a | 3 | BLAKE2s (libdrm-2.4.110.tar.xz) = 3f45410c126cfb5ad5d8166270faa108751c1476c5f3926cc9b471b341147d0b | |
4 | SHA512 (libdrm-2.4.100.tar.gz) = b61835473c77691c4a8e67b32b9df420661e8bf8700507334b58bde5e6a402dee4aea2bec1e5b83343dd28fcb6cf9fd084064d437332f178df81c4780552595b | 4 | SHA512 (libdrm-2.4.110.tar.xz) = 52f92ef1fe4c218a1d7dba53ef43334dbfca80e3209afe59f3a32c4bf67473126534e990df07a931a12d46a3b997c21ef17c1c4d8a0c88d44d5c6c040e3b6be3 | |
5 | Size (libdrm-2.4.100.tar.gz) = 1149132 bytes | 5 | Size (libdrm-2.4.110.tar.xz) = 436372 bytes | |
6 | SHA1 (patch-ac) = 67c998df7dfc0dabc86320ea6d015cede3e464ea | 6 | SHA1 (patch-ac) = 67c998df7dfc0dabc86320ea6d015cede3e464ea | |
7 | SHA1 (patch-amdgpu_amdgpu__cs.c) = 125eca62cd3e00a6e039066152780174dcde0705 | |||
8 | SHA1 (patch-etnaviv_etnaviv__device.c) = 236b2df05a918c35c4decfee416ff5bfe9c073d4 | |||
9 | SHA1 (patch-exynos_exynos__drm.c) = 3fa4c8a592a5f4e0c4001eb6fa1bc7811e398605 | |||
10 | SHA1 (patch-exynos_exynos__fimg2d.c) = 298438b128bdb4ff57a8c0d7d6a081485e64e49a | |||
7 | SHA1 (patch-include_drm_drm.h) = 48a912f40bf2b2a1c23edbe4446fa7869212f17b | 11 | SHA1 (patch-include_drm_drm.h) = 48a912f40bf2b2a1c23edbe4446fa7869212f17b | |
8 | SHA1 (patch-libkms_vmwgfx.c) = d2204c0b79098c6c36b7f282b486c58c6354bd1d | 12 | SHA1 (patch-libkms_vmwgfx.c) = d2204c0b79098c6c36b7f282b486c58c6354bd1d | |
9 | SHA1 (patch-libsync.h) = 1e0603e72a54a069fc9d2ab2c9559d22381a69d3 | 13 | SHA1 (patch-libsync.h) = 1e0603e72a54a069fc9d2ab2c9559d22381a69d3 | |
10 | SHA1 (patch-nouveau_private.h) = fe347abfaed3b37ef8fee645a388e19ca1e97552 | 14 | SHA1 (patch-meson.build) = b9ebb763a807da931f83f4d5c02925ab5498ef69 | |
11 | SHA1 (patch-xf86drm.c) = 02ef5f5ec351b7f52a97ab80d3d469e854ac957a | 15 | SHA1 (patch-omap_omap__drm.c) = a23eefa9a57315d3ae77e528fd29de70ff9b2648 | |
12 | SHA1 (patch-xf86drmMode.c) = 5f66d45a63b0915f22d0abe115aace13c53823a8 | 16 | SHA1 (patch-tests_exynos_exynos__fimg2d__test.c) = 9fc874ecc9a42db75327f736d04038f7cf8f00ff | |
17 | SHA1 (patch-tests_nouveau_threaded.c) = 82b566666e77898c209d66ce804c913b53e53a50 | |||
18 | SHA1 (patch-xf86drm.c) = 6e4b3ee406666b37cc0b923ad49b945055919c83 | |||
19 | SHA1 (patch-xf86drmMode.c) = 078b1ecaa4fedd74992d682433701245ee51785b | |||
13 | SHA1 (patch-xf86drmMode.h) = a28b02887389be8670193c119f711901af61a6b2 | 20 | SHA1 (patch-xf86drmMode.h) = a28b02887389be8670193c119f711901af61a6b2 |
$NetBSD: patch-amdgpu_amdgpu__cs.c,v 1.3 2022/03/13 15:20:01 tnn Exp $
libc-supplied compat alloca(3) should not be used
--- amdgpu/amdgpu_cs.c.orig 2022-02-16 10:00:13.000000000 +0000
+++ amdgpu/amdgpu_cs.c
@@ -28,9 +28,7 @@
#include <pthread.h>
#include <sched.h>
#include <sys/ioctl.h>
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
+#define alloca(size) __builtin_alloca(size)
#include "xf86drm.h"
#include "amdgpu_drm.h"
$NetBSD: patch-etnaviv_etnaviv__device.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
Fix Linuxisms.
--- etnaviv/etnaviv_device.c.orig 2021-07-02 12:49:05.425771700 +0000
+++ etnaviv/etnaviv_device.c
@@ -25,8 +25,10 @@
*/
#include <stdlib.h>
+#ifdef __linux__
#include <linux/stddef.h>
#include <linux/types.h>
+#endif
#include <errno.h>
#include <sys/mman.h>
#include <fcntl.h>
$NetBSD: patch-exynos_exynos__drm.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
Fix Linuxisms.
--- exynos/exynos_drm.c.orig 2022-02-16 10:00:13.000000000 +0000
+++ exynos/exynos_drm.c
@@ -31,7 +31,9 @@
#include <unistd.h>
#include <sys/mman.h>
+#ifdef __linux__
#include <linux/stddef.h>
+#endif
#include <xf86drm.h>
$NetBSD: patch-exynos_exynos__fimg2d.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
Fix Linuxisms.
--- exynos/exynos_fimg2d.c.orig 2022-02-16 10:00:13.000000000 +0000
+++ exynos/exynos_fimg2d.c
@@ -30,7 +30,9 @@
#include <assert.h>
#include <sys/mman.h>
+#ifdef __linux__
#include <linux/stddef.h>
+#endif
#include <xf86drm.h>
$NetBSD: patch-meson.build,v 1.1 2022/03/13 15:20:01 tnn Exp $
xxx how to deal with this properly?
--- meson.build.orig 2021-07-02 12:49:05.442438400 +0000
+++ meson.build
@@ -35,7 +35,7 @@ config.set10('UDEV', get_option('udev'))
with_freedreno_kgsl = get_option('freedreno-kgsl')
with_install_tests = get_option('install-test-programs')
-if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly'].contains(host_machine.system())
dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
else
dep_pthread_stubs = []
$NetBSD: patch-omap_omap__drm.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
Fix Linuxisms.
--- omap/omap_drm.c.orig 2022-02-16 10:00:13.000000000 +0000
+++ omap/omap_drm.c
@@ -27,8 +27,10 @@
*/
#include <stdlib.h>
+#ifdef __linux__
#include <linux/stddef.h>
#include <linux/types.h>
+#endif
#include <errno.h>
#include <sys/mman.h>
#include <fcntl.h>
$NetBSD: patch-tests_exynos_exynos__fimg2d__test.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
Fix Linuxisms.
--- tests/exynos/exynos_fimg2d_test.c.orig 2022-02-16 10:00:13.000000000 +0000
+++ tests/exynos/exynos_fimg2d_test.c
@@ -31,7 +31,9 @@
#include <unistd.h>
#include <sys/mman.h>
+#ifdef __linux__
#include <linux/stddef.h>
+#endif
#include <xf86drm.h>
#include <xf86drmMode.h>
$NetBSD: patch-tests_nouveau_threaded.c,v 1.1 2022/03/13 15:20:01 tnn Exp $
--- tests/nouveau/threaded.c.orig 2021-07-02 12:49:05.455772000 +0000
+++ tests/nouveau/threaded.c
@@ -36,7 +36,7 @@ static int failed;
static int import_fd;
-#if defined(__GLIBC__) || defined(__FreeBSD__)
+#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__)
int ioctl(int fd, unsigned long request, ...)
#else
int ioctl(int fd, int request, ...)
@@ -1,45 +1,45 @@ | @@ -1,45 +1,45 @@ | |||
1 | $NetBSD: patch-xf86drm.c,v 1.6 2019/09/08 15:55:04 maya Exp $ | 1 | $NetBSD: patch-xf86drm.c,v 1.7 2022/03/13 15:20:01 tnn Exp $ | |
2 | 2 | |||
3 | Implement drmParseSubsystemType, drmParsePciBusInfo for NetBSD | 3 | Implement drmParseSubsystemType, drmParsePciBusInfo for NetBSD | |
4 | 4 | |||
5 | --- xf86drm.c.orig 2019-04-19 15:52:29.000000000 +0000 | 5 | --- xf86drm.c.orig 2021-07-02 12:49:05.459105300 +0000 | |
6 | +++ xf86drm.c | 6 | +++ xf86drm.c | |
7 | @@ -86,7 +86,10 @@ | 7 | @@ -86,7 +86,10 @@ | |
8 | #endif | 8 | #endif | |
9 | 9 | |||
10 | #ifdef __NetBSD__ | 10 | #ifdef __NetBSD__ | |
11 | -#define DRM_MAJOR 34 | 11 | -#define DRM_MAJOR 34 | |
12 | +#define DRM_MAJOR 180 | 12 | +#define DRM_MAJOR 180 | |
13 | +#include <sys/param.h> | 13 | +#include <sys/param.h> | |
14 | +#include <dev/pci/pcireg.h> | 14 | +#include <dev/pci/pcireg.h> | |
15 | +#include <pci.h> | 15 | +#include <pci.h> | |
16 | #endif | 16 | #endif | |
17 | 17 | |||
18 | #ifdef __OpenBSD__ | 18 | #ifdef __OpenBSD__ | |
19 | @@ -3032,6 +3035,65 @@ static int drmParseSubsystemType(int maj | 19 | @@ -3499,6 +3502,65 @@ static int drmParseSubsystemType(int maj | |
20 | } | 20 | return DRM_BUS_VIRTIO; | |
21 | 21 | } | ||
22 | return -EINVAL; | 22 | return subsystem_type; | |
23 | +#elif defined(__NetBSD__) | 23 | +#elif defined(__NetBSD__) | |
24 | + int type, fd; | 24 | + int type, fd; | |
25 | + drmSetVersion sv; | 25 | + drmSetVersion sv; | |
26 | + char *buf; | 26 | + char *buf; | |
27 | + unsigned domain, bus, dev; | 27 | + unsigned domain, bus, dev; | |
28 | + int func; | 28 | + int func; | |
29 | + int ret; | 29 | + int ret; | |
30 | + | 30 | + | |
31 | + /* Get the type of device we're looking for to pick the right pathname. */ | 31 | + /* Get the type of device we're looking for to pick the right pathname. */ | |
32 | + type = drmGetMinorType(min); | 32 | + type = drmGetMinorType(maj, min); | |
33 | + if (type == -1) | 33 | + if (type == -1) | |
34 | + return -ENODEV; | 34 | + return -ENODEV; | |
35 | + | 35 | + | |
36 | + /* Open the device. Don't try to create it if it's not there. */ | 36 | + /* Open the device. Don't try to create it if it's not there. */ | |
37 | + fd = drmOpenMinor(min, 0, type); | 37 | + fd = drmOpenMinor(min, 0, type); | |
38 | + if (fd < 0) | 38 | + if (fd < 0) | |
39 | + return -errno; | 39 | + return -errno; | |
40 | + | 40 | + | |
41 | + /* | 41 | + /* | |
42 | + * Set the interface version to 1.4 or 1.1, which has the effect of | 42 | + * Set the interface version to 1.4 or 1.1, which has the effect of | |
43 | + * populating the bus id for us. | 43 | + * populating the bus id for us. | |
44 | + */ | 44 | + */ | |
45 | + sv.drm_di_major = 1; | 45 | + sv.drm_di_major = 1; | |
@@ -69,43 +69,43 @@ Implement drmParseSubsystemType, drmPars | @@ -69,43 +69,43 @@ Implement drmParseSubsystemType, drmPars | |||
69 | + if (buf == NULL) | 69 | + if (buf == NULL) | |
70 | + return -ENODEV; | 70 | + return -ENODEV; | |
71 | + | 71 | + | |
72 | + /* Find a string we know about; otherwise -EINVAL. */ | 72 | + /* Find a string we know about; otherwise -EINVAL. */ | |
73 | + ret = -EINVAL; | 73 | + ret = -EINVAL; | |
74 | + if (strncmp(buf, "pci:", 4) == 0) | 74 | + if (strncmp(buf, "pci:", 4) == 0) | |
75 | + ret = DRM_BUS_PCI; | 75 | + ret = DRM_BUS_PCI; | |
76 | + | 76 | + | |
77 | + /* We're done with the bus id. */ | 77 | + /* We're done with the bus id. */ | |
78 | + free(buf); | 78 | + free(buf); | |
79 | + | 79 | + | |
80 | + /* Success or not, we're done. */ | 80 | + /* Success or not, we're done. */ | |
81 | + return ret; | 81 | + return ret; | |
82 | #elif defined(__OpenBSD__) || defined(__DragonFly__) | 82 | #elif defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD__) | |
83 | return DRM_BUS_PCI; | 83 | return DRM_BUS_PCI; | |
84 | #else | 84 | #else | |
85 | @@ -3081,6 +3143,73 @@ static int drmParsePciBusInfo(int maj, i | 85 | @@ -3610,6 +3672,73 @@ static int drmParsePciBusInfo(int maj, i | |
86 | info->func = func; | 86 | info->func = func; | |
87 | 87 | |||
88 | return 0; | 88 | return 0; | |
89 | +#elif defined(__NetBSD__) | 89 | +#elif defined(__NetBSD__) | |
90 | + int type, fd; | 90 | + int type, fd; | |
91 | + drmSetVersion sv; | 91 | + drmSetVersion sv; | |
92 | + char *buf; | 92 | + char *buf; | |
93 | + unsigned domain, bus, dev; | 93 | + unsigned domain, bus, dev; | |
94 | + int func; | 94 | + int func; | |
95 | + int ret; | 95 | + int ret; | |
96 | + | 96 | + | |
97 | + /* Get the type of device we're looking for to pick the right pathname. */ | 97 | + /* Get the type of device we're looking for to pick the right pathname. */ | |
98 | + type = drmGetMinorType(min); | 98 | + type = drmGetMinorType(maj, min); | |
99 | + if (type == -1) | 99 | + if (type == -1) | |
100 | + return -ENODEV; | 100 | + return -ENODEV; | |
101 | + | 101 | + | |
102 | + /* Open the device. Don't try to create it if it's not there. */ | 102 | + /* Open the device. Don't try to create it if it's not there. */ | |
103 | + fd = drmOpenMinor(min, 0, type); | 103 | + fd = drmOpenMinor(min, 0, type); | |
104 | + if (fd < 0) | 104 | + if (fd < 0) | |
105 | + return -errno; | 105 | + return -errno; | |
106 | + | 106 | + | |
107 | + /* | 107 | + /* | |
108 | + * Set the interface version to 1.4 or 1.1, which has the effect of | 108 | + * Set the interface version to 1.4 or 1.1, which has the effect of | |
109 | + * populating the bus id for us. | 109 | + * populating the bus id for us. | |
110 | + */ | 110 | + */ | |
111 | + sv.drm_di_major = 1; | 111 | + sv.drm_di_major = 1; | |
@@ -146,27 +146,27 @@ Implement drmParseSubsystemType, drmPars | @@ -146,27 +146,27 @@ Implement drmParseSubsystemType, drmPars | |||
146 | + return -ENODEV; | 146 | + return -ENODEV; | |
147 | + | 147 | + | |
148 | + /* Populate the results. */ | 148 | + /* Populate the results. */ | |
149 | + info->domain = domain; | 149 | + info->domain = domain; | |
150 | + info->bus = bus; | 150 | + info->bus = bus; | |
151 | + info->dev = dev; | 151 | + info->dev = dev; | |
152 | + info->func = func; | 152 | + info->func = func; | |
153 | + | 153 | + | |
154 | + /* Success! */ | 154 | + /* Success! */ | |
155 | + return 0; | 155 | + return 0; | |
156 | #elif defined(__OpenBSD__) || defined(__DragonFly__) | 156 | #elif defined(__OpenBSD__) || defined(__DragonFly__) | |
157 | struct drm_pciinfo pinfo; | 157 | struct drm_pciinfo pinfo; | |
158 | int fd, type; | 158 | int fd, type; | |
159 | @@ -3247,6 +3376,48 @@ static int drmParsePciDeviceInfo(int maj | 159 | @@ -3778,6 +3907,48 @@ static int drmParsePciDeviceInfo(int maj | |
160 | return parse_config_sysfs_file(maj, min, device); | 160 | return parse_config_sysfs_file(maj, min, device); | |
161 | 161 | |||
162 | return 0; | 162 | return 0; | |
163 | +#elif defined(__NetBSD__) | 163 | +#elif defined(__NetBSD__) | |
164 | + drmPciBusInfo businfo; | 164 | + drmPciBusInfo businfo; | |
165 | + char fname[PATH_MAX]; | 165 | + char fname[PATH_MAX]; | |
166 | + int pcifd; | 166 | + int pcifd; | |
167 | + pcireg_t id, class, subsys; | 167 | + pcireg_t id, class, subsys; | |
168 | + int ret; | 168 | + int ret; | |
169 | + | 169 | + | |
170 | + /* Find where on the bus the device lives. */ | 170 | + /* Find where on the bus the device lives. */ | |
171 | + ret = drmParsePciBusInfo(maj, min, &businfo); | 171 | + ret = drmParsePciBusInfo(maj, min, &businfo); | |
172 | + if (ret) | 172 | + if (ret) |
@@ -1,76 +1,71 @@ | @@ -1,76 +1,71 @@ | |||
1 | $NetBSD: patch-xf86drmMode.c,v 1.5 2019/01/19 13:21:29 tnn Exp $ | 1 | $NetBSD: patch-xf86drmMode.c,v 1.6 2022/03/13 15:20:01 tnn Exp $ | |
2 | 2 | |||
3 | FreeBSD/DragonFly/NetBSD support. From FreeBSD ports and NetBSD xsrc | 3 | FreeBSD/DragonFly/NetBSD support. From FreeBSD ports and NetBSD xsrc | |
4 | 4 | |||
5 | --- xf86drmMode.c.orig 2018-10-16 14:49:03.000000000 +0000 | 5 | --- xf86drmMode.c.orig 2021-07-02 12:49:05.459105300 +0000 | |
6 | +++ xf86drmMode.c | 6 | +++ xf86drmMode.c | |
7 | @@ -43,6 +43,7 @@ | 7 | @@ -38,9 +38,7 @@ | |
8 | #include <stdlib.h> | 8 | #include <stdlib.h> | |
9 | #include <sys/ioctl.h> | 9 | #include <sys/ioctl.h> | |
10 | #ifdef HAVE_SYS_SYSCTL_H | 10 | #if HAVE_SYS_SYSCTL_H | |
11 | +#include <sys/types.h> | 11 | -#ifdef __FreeBSD__ | |
12 | #include <sys/types.h> | |||
13 | -#endif | |||
12 | #include <sys/sysctl.h> | 14 | #include <sys/sysctl.h> | |
13 | #endif | 15 | #endif | |
14 | #include <stdio.h> | 16 | #include <stdio.h> | |
15 | @@ -799,42 +800,60 @@ drm_public int drmCheckModesettingSuppor | 17 | @@ -808,34 +806,59 @@ drm_public int drmCheckModesettingSuppor | |
16 | closedir(sysdir); | 18 | closedir(sysdir); | |
17 | if (found) | 19 | if (found) | |
18 | return 0; | 20 | return 0; | |
19 | -#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) | 21 | -#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) | |
20 | - char kbusid[1024], sbusid[1024]; | 22 | - char sbusid[1024]; | |
21 | - char oid[128]; | 23 | - char oid[128]; | |
22 | - int domain, bus, dev, func; | |||
23 | - int i, modesetting, ret; | 24 | - int i, modesetting, ret; | |
24 | - size_t len; | 25 | - size_t len; | |
25 | +#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__DragonFly__) | 26 | - | |
27 | - /* How many GPUs do we expect in the machine ? */ | |||
28 | - for (i = 0; i < 10; i++) { | |||
29 | - snprintf(oid, sizeof(oid), "hw.dri.%d.busid", i); | |||
30 | - len = sizeof(sbusid); | |||
31 | - ret = sysctlbyname(oid, sbusid, &len, NULL, 0); | |||
32 | - if (ret == -1) { | |||
33 | - if (errno == ENOENT) | |||
34 | +#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__DragonFly__) | |||
26 | + #define bus_fmt "pci:%04x:%02x:%02x.%u" | 35 | + #define bus_fmt "pci:%04x:%02x:%02x.%u" | |
27 | + #define name_fmt "%*s %*s " bus_fmt | 36 | + #define name_fmt "%*s %*s " bus_fmt | |
28 | + unsigned int d1 = 0, b1 = 0, s1 = 0, f1 = 0; | 37 | + unsigned int d1 = 0, b1 = 0, s1 = 0, f1 = 0; | |
29 | + if (sscanf(busid, bus_fmt, &d1, &b1, &s1, &f1) != 4) | 38 | + if (sscanf(busid, bus_fmt, &d1, &b1, &s1, &f1) != 4) | |
30 | + return -EINVAL; | 39 | + return -EINVAL; | |
31 | + /* | 40 | + /* | |
32 | + * hw.dri.%i.bus is not always present and hw.dri.%i.name does not | 41 | + * hw.dri.%i.bus is not always present and hw.dri.%i.name does not | |
33 | + * always contain the busid, so try both for best chance of success | 42 | + * always contain the busid, so try both for best chance of success | |
34 | + */ | 43 | + */ | |
35 | + for (int i = 0; i < DRM_MAX_MINOR; ++i) { | 44 | + for (int i = 0; i < DRM_MAX_MINOR; ++i) { | |
36 | + char name[22], value[256]; | 45 | + char name[22], value[256]; | |
37 | + size_t length = sizeof(value); | 46 | + size_t length = sizeof(value); | |
38 | + snprintf(name, sizeof(name), "hw.dri.%i.name", i); | 47 | + snprintf(name, sizeof(name), "hw.dri.%i.name", i); | |
39 | + if (sysctlbyname(name, value, &length, NULL, 0)) | 48 | + if (sysctlbyname(name, value, &length, NULL, 0)) | |
40 | + continue; | 49 | + continue; | |
41 | 50 | + | ||
42 | - ret = sscanf(busid, "pci:%04x:%02x:%02x.%d", &domain, &bus, &dev, | |||
43 | - &func); | |||
44 | - if (ret != 4) | |||
45 | - return -EINVAL; | |||
46 | - snprintf(kbusid, sizeof(kbusid), "pci:%04x:%02x:%02x.%d", domain, bus, | |||
47 | - dev, func); | |||
48 | + value[length] = '\0'; | 51 | + value[length] = '\0'; | |
49 | + unsigned int d2 = 0, b2 = 0, s2 = 0, f2 = 0; | 52 | + unsigned int d2 = 0, b2 = 0, s2 = 0, f2 = 0; | |
50 | + switch (sscanf(value, name_fmt, &d2, &b2, &s2, &f2)) { | 53 | + switch (sscanf(value, name_fmt, &d2, &b2, &s2, &f2)) { | |
51 | + case 0: /* busid not in the name, try busid */ | 54 | + case 0: /* busid not in the name, try busid */ | |
52 | + length = sizeof(value); | 55 | + length = sizeof(value); | |
53 | + snprintf(name, sizeof(name), "hw.dri.%i.busid", i); | 56 | + snprintf(name, sizeof(name), "hw.dri.%i.busid", i); | |
54 | + if (sysctlbyname(name, value, &length, NULL, 0)) | 57 | + if (sysctlbyname(name, value, &length, NULL, 0)) | |
55 | + continue; | 58 | + continue; | |
56 | ||||
57 | - /* How many GPUs do we expect in the machine ? */ | |||
58 | - for (i = 0; i < 16; i++) { | |||
59 | - snprintf(oid, sizeof(oid), "hw.dri.%d.busid", i); | |||
60 | - len = sizeof(sbusid); | |||
61 | - ret = sysctlbyname(oid, sbusid, &len, NULL, 0); | |||
62 | - if (ret == -1) { | |||
63 | - if (errno == ENOENT) | |||
64 | + value[length] = '\0'; | 59 | + value[length] = '\0'; | |
65 | + if (sscanf(value, bus_fmt, &d2, &b2, &s2, &f2) != 4) | 60 | + if (sscanf(value, bus_fmt, &d2, &b2, &s2, &f2) != 4) | |
66 | continue; | 61 | continue; | |
67 | - return -EINVAL; | 62 | - return -EINVAL; | |
68 | + /* fall through after parsing busid */ | 63 | + /* fall through after parsing busid */ | |
69 | + | 64 | + | |
70 | + case 4: /* if we jumped here then busid was in the name */ | 65 | + case 4: /* if we jumped here then busid was in the name */ | |
71 | + if (d1 == d2 && b1 == b2 && s1 == s2 && f1 == f2) { | 66 | + if (d1 == d2 && b1 == b2 && s1 == s2 && f1 == f2) { | |
72 | + /* | 67 | + /* | |
73 | + * Confirm the drm driver for this device supports KMS, | 68 | + * Confirm the drm driver for this device supports KMS, | |
74 | + * except on DragonFly where all the drm drivers do so | 69 | + * except on DragonFly where all the drm drivers do so | |
75 | + * but only hw.dri.0.modesetting is present | 70 | + * but only hw.dri.0.modesetting is present | |
76 | + */ | 71 | + */ | |
@@ -78,38 +73,38 @@ FreeBSD/DragonFly/NetBSD support. From F | @@ -78,38 +73,38 @@ FreeBSD/DragonFly/NetBSD support. From F | |||
78 | + int modesetting = 0; | 73 | + int modesetting = 0; | |
79 | + length = sizeof(modesetting); | 74 | + length = sizeof(modesetting); | |
80 | + snprintf(name, sizeof(name), "hw.dri.%i.modesetting", i); | 75 | + snprintf(name, sizeof(name), "hw.dri.%i.modesetting", i); | |
81 | + if (sysctlbyname(name, &modesetting, &length, NULL, 0) | 76 | + if (sysctlbyname(name, &modesetting, &length, NULL, 0) | |
82 | + || length != sizeof(modesetting) || !modesetting) | 77 | + || length != sizeof(modesetting) || !modesetting) | |
83 | + return -ENOSYS; | 78 | + return -ENOSYS; | |
84 | + else | 79 | + else | |
85 | + #endif | 80 | + #endif | |
86 | + return 0; | 81 | + return 0; | |
87 | + } | 82 | + } | |
88 | + default: | 83 | + default: | |
89 | + break; | 84 | + break; | |
90 | } | 85 | } | |
91 | - if (strcmp(sbusid, kbusid) != 0) | 86 | - if (strcmp(sbusid, busid) != 0) | |
92 | - continue; | 87 | - continue; | |
93 | - snprintf(oid, sizeof(oid), "hw.dri.%d.modesetting", i); | 88 | - snprintf(oid, sizeof(oid), "hw.dri.%d.modesetting", i); | |
94 | - len = sizeof(modesetting); | 89 | - len = sizeof(modesetting); | |
95 | - ret = sysctlbyname(oid, &modesetting, &len, NULL, 0); | 90 | - ret = sysctlbyname(oid, &modesetting, &len, NULL, 0); | |
96 | - if (ret == -1 || len != sizeof(modesetting)) | 91 | - if (ret == -1 || len != sizeof(modesetting)) | |
97 | - return -EINVAL; | 92 | - return -EINVAL; | |
98 | - return (modesetting ? 0 : -ENOSYS); | 93 | - return (modesetting ? 0 : -ENOSYS); | |
99 | } | 94 | } | |
100 | -#elif defined(__DragonFly__) | 95 | -#elif defined(__DragonFly__) | |
101 | - return 0; | 96 | - return 0; | |
102 | -#elif defined(__OpenBSD__) | 97 | -#elif defined(__OpenBSD__) | |
103 | +#elif defined(__OpenBSD__) || defined(__NetBSD__) | 98 | +#elif defined(__OpenBSD__) || defined(__NetBSD__) | |
104 | int fd; | 99 | int fd; | |
105 | struct drm_mode_card_res res; | 100 | struct drm_mode_card_res res; | |
106 | drmModeResPtr r = 0; | 101 | drmModeResPtr r = 0; | |
107 | @@ -987,7 +1006,7 @@ drm_public int drmModePageFlipTarget(int | 102 | @@ -988,7 +1011,7 @@ drm_public int drmModePageFlipTarget(int | |
108 | 103 | |||
109 | drm_public int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id, | 104 | drm_public int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id, | |
110 | uint32_t fb_id, uint32_t flags, | 105 | uint32_t fb_id, uint32_t flags, | |
111 | - int32_t crtc_x, int32_t crtc_y, | 106 | - int32_t crtc_x, int32_t crtc_y, | |
112 | + uint32_t crtc_x, uint32_t crtc_y, | 107 | + uint32_t crtc_x, uint32_t crtc_y, | |
113 | uint32_t crtc_w, uint32_t crtc_h, | 108 | uint32_t crtc_w, uint32_t crtc_h, | |
114 | uint32_t src_x, uint32_t src_y, | 109 | uint32_t src_x, uint32_t src_y, | |
115 | uint32_t src_w, uint32_t src_h) | 110 | uint32_t src_w, uint32_t src_h) |