Skip to content

Commit 3898860

Browse files
klausz65gwr
authored andcommitted
12395 Update to libdrm >= 2.4.97
upgrade libdrm-2.4.75 to libdrm-2.4.109 Add back logic to deal with illumos clone-open devices and searching the devices tree in drmGetMinorNameForFD Move gen...table_fourcc.h so clean will not remove it
1 parent c95b31e commit 3898860

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3436
-532
lines changed

ISSUES

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Dec-30-2021 - Klaus Ziegler
3+
4+
Issues left over up from release 2.4.109:
5+
6+
1. This is just the upgrade from libdrm-2.4.75 to 2.4.109, no new functionality
7+
of libdrm-2.4.109 has been checked or reflected in any manifest file, this
8+
will be done in subsequent #PRs.
9+
10+
2. Implement dynamic creation of the new header file:
11+
12+
- generated_static_table_fourcc.h
13+
14+
into the build process of gfx-drm using Python, the regular build process
15+
of libdrm uses meson to build this header file. For the moment, the supplied
16+
header file was created using a regular meson build of the library on SPARC
17+
and Intel platforms to make sure there are no differences.
18+
19+
3. The creation of manual pages has been disabled in usr/src/man/Makefile
20+
for subdirectories man3 and man7, because illumos based distributions up to
21+
date don't include rst2man(1) command.
22+
23+
4. Get rid of 32bit support.

UPDATE_LIB

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
Dec-30-2021 - Klaus Ziegler
3+
4+
To upgrade libdrm:
5+
6+
change LIBDRM_VERS in
7+
usr/src/common/libdrm/Makefile
8+
usr/src/common/libdrm/Makefile.drm
9+
LIBDRM_HASH in
10+
usr/src/common/libdrm/Makefile
11+
12+
If the file extension of the file to be downloaded has changed, it must be
13+
changed in usr/src/pkg/manifests/x11-library-libdrm.mf and LIBDRM_ARCHIVE in
14+
usr/src/common/libdrm/Makefile must be modified accordingly.
15+
16+
# NOTE: if you want to contribute changes to this graphics/DRM gate,
17+
# please use your own fork of gfx-drm.git and substitute HTTPS/URL below,
18+
# to match your repository.
19+
20+
After you have setup a build environment as follows:
21+
git clone https://github.com/illumos/gfx-drm.git
22+
cd gfx-drm
23+
export BLDENV=tools/bldenv
24+
chmod 755 tools/bldenv
25+
26+
edit myenv.sh to suite your needs, and start the first build:
27+
/usr/bin/env -i $BLDENV myenv.sh "cd usr/src; make install"
28+
29+
most likely this first build will err'out right after unpacking
30+
the new library archive. At this stage the make target: check
31+
is run, which checks differences of gfx-drm headers and the
32+
new library supplied headers, these 5 headers will be checked:
33+
34+
drm.h drm_fourcc.h drm_mode.h drm_sarea.h i915_drm.h
35+
36+
To pass check target, generate patch files for these headers:
37+
cd usr/src/common/libdrm/libdrm-2.4.<new-version>/include/drm
38+
gdiff -u drm.h <WS>/usr/src/uts/common/drm/drm.h > /tmp/drm.h.patch
39+
and the others as well, then apply these patches to headers
40+
contained in usr/src/uts/common/drm and restart the build.

myenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"
6464
# export PKGPUBLISHER_REDIST='on-redist'
6565

6666
# Package manifest format version.
67-
export PKGFMT_OUTPUT='v1'
67+
export PKGFMT_OUTPUT='v2'
6868

6969
# Disable shadow compilation.
7070
export CW_NO_SHADOW='1'

tools/bldenv

100644100755
File mode changed.

usr/src/Makefile.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ ELFEDIT= /usr/bin/elfedit
179179
ELFSIGN= /usr/bin/elfsign
180180
DTRACE= /usr/sbin/dtrace -xnolibs
181181
UNIQ= /usr/bin/uniq
182-
TAR= /usr/bin/tar
182+
TAR= /usr/bin/gtar
183183
ASTBINDIR= /usr/ast/bin
184184
MSGCC= $(ASTBINDIR)/msgcc
185185
MSGFMT= /usr/bin/msgfmt -s
@@ -300,7 +300,7 @@ CCABS32= -Wc,-xcode=abs32
300300
#
301301
# generate v9 code which tolerates callers using the v7 ABI, for the sake of
302302
# system calls.
303-
CC32BITCALLERS= -_gcc=-massume-32bit-callers
303+
CC32BITCALLERS=
304304

305305
# GCC, especially, is increasingly beginning to auto-inline functions and
306306
# sadly does so separately not under the general -fno-inline-functions

usr/src/cmd/drm-tests/Run_all.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
# /opt/drm-tests/Run_all.sh > drm-tests.log
3030
#
3131

32-
# Leaving out random (takes a while)
32+
# Leaving out random (takes a while), and in the meantime has been removed.
3333
# Also updatedraw (broken at the moment)
34-
TESTS="drmdevice dristat drmstat drmsl hash"
34+
# Deleted dristat drmstat from list below, also gone.
35+
TESTS="drmdevice drmsl hash"
3536

3637
run_all() {
3738
for f in $TESTS ; do

usr/src/cmd/drm-tests/misc1/Makefile.com

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
PROG= \
1717
drmsl \
1818
hash \
19-
random \
2019
drmdevice
2120

2221
include ../../Makefile.drm

usr/src/cmd/drm-tests/modeprint/Makefile.com

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ include ../../Makefile.drm
2020

2121
SRCDIR= $(LIBDRM_CMN_DIR)/tests/modeprint
2222

23-
LDLIBS += -ldrm -lm
23+
LDLIBS += -ldrm -lm -lutil
2424

2525
LDLIBS32 += -L$(ROOT)/usr/lib/xorg \
26+
-L$(SRC)/cmd/drm-tests/util/$(MACH) \
2627
-R/usr/lib/xorg
2728
LDLIBS64 += -L$(ROOT)/usr/lib/xorg/$(MACH64) \
29+
-L$(SRC)/cmd/drm-tests/util/$(MACH64) \
2830
-R/usr/lib/xorg/$(MACH64)
2931

3032
all: $(PROG)

usr/src/common/libdrm/Check-patches

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
# One big patch might be easier than all this...
5353
# but for now the patches are split up as shown below.
5454

55-
ref=libdrm-2.4.75-ref
56-
dir=libdrm-2.4.75
55+
ref=libdrm-2.4.109-ref
56+
dir=libdrm-2.4.109
5757

5858
# You make this directory by hand. Not doing this automatically
5959
# because I want to make srue you to know it's being written into.
@@ -106,18 +106,12 @@ diff_ref libdrm_lists.h > $chk/libdrm-lists-h.patch
106106
echo patches/util-double-list-h.patch
107107
diff_ref util_double_list.h > $chk/util-double-list-h.patch
108108

109-
echo patches/util-math-h.patch
110-
diff_ref util_math.h > $chk/util-math-h.patch
111-
112109
echo patches/xf86drm-c.patch
113110
diff_ref xf86drm.c > $chk/xf86drm-c.patch
114111

115112
echo patches/xf86drm-h.patch
116113
( head -27 patches/xf86drm-h.patch ;
117114
diff_ref xf86drm.h ) > $chk/xf86drm-h.patch
118115

119-
echo patches/xf86drmMode-c.patch
120-
diff_ref xf86drmMode.c > $chk/xf86drmMode-c.patch
121-
122116

123-
diff -r patches $chk
117+
diff -r patches $chk

usr/src/common/libdrm/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ FETCH= $(PYTHON) $(SRC)/tools/userland-fetch
2323

2424
# See also: ./Makefile.drm LIBDRM_VERS and ./Check-patches
2525
# PLEASE RUN Check-patches after updating!
26-
LIBDRM_VERS=2.4.75
26+
LIBDRM_VERS=2.4.109
2727

2828
LIBDRM_DIR=libdrm-$(LIBDRM_VERS)
29-
LIBDRM_ARCHIVE=$(LIBDRM_DIR).tar.bz2
29+
LIBDRM_ARCHIVE=$(LIBDRM_DIR).tar.xz
3030
LIBDRM_URL=http://dri.freedesktop.org/libdrm/$(LIBDRM_ARCHIVE)
31-
LIBDRM_HASH=sha256:2d5a500eef412cc287d12268eed79d571e262d4957a2ec9258073f305985054f
31+
LIBDRM_HASH=sha256:629352e08c1fe84862ca046598d8a08ce14d26ab25ee1f4704f993d074cb7f26
3232

3333
def all install install_h: .patched check
3434

@@ -59,7 +59,7 @@ check: FRC
5959
touch $@
6060

6161
.unpacked: $(USERLAND_ARCHIVES)$(LIBDRM_ARCHIVE)
62-
tar xvfjo $(USERLAND_ARCHIVES)$(LIBDRM_ARCHIVE)
62+
gtar xvfJo $(USERLAND_ARCHIVES)$(LIBDRM_ARCHIVE)
6363
touch $@
6464

6565
$(USERLAND_ARCHIVES)$(LIBDRM_ARCHIVE) :

0 commit comments

Comments
 (0)