Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/16] meson.build: fix missing Xv dependencies
       [not found] <20250304155809.30399-1-info@metux.net>
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-21 21:56   ` Ville Syrjälä
  2025-03-04 15:57 ` [PATCH 02/16] sna: stop using obsolete type aliases Enrico Weigelt, metux IT consult
                   ` (15 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

libXv needs be be explicitly linked, otherwise getting error:

  FAILED: xvmc/libIntelXvMC.so.1.0.0
  cc  -o xvmc/libIntelXvMC.so.1.0.0 xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc_dump.c.o xvmc/libIntelXvMC.so.1.0.0.p/i915_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/i965_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/xvmc_vld.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_batchbuffer.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libIntelXvMC.so.1 -pthread /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXvMC.so /usr/lib/x86_64-linux-gnu/libX11-xcb.so /usr/lib/x86_64-linux-gnu/libxcb.so /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-dri2.so /usr/lib/x86_64-linux-gnu/libdrm_intel.so /usr/lib/x86_64-linux-gnu/libdrm.so -Wl,--end-group
  /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCCreateSurface':
  /home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:432: undefined reference to `XvCreateImage'
  /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCPutSurface':
  /home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:666: undefined reference to `XvPutImage'
  collect2: error: ld returned 1 exit status

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/legacy/i810/xvmc/meson.build | 1 +
 xvmc/meson.build                 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/legacy/i810/xvmc/meson.build b/src/legacy/i810/xvmc/meson.build
index cd05f3ef..3505f15b 100644
--- a/src/legacy/i810/xvmc/meson.build
+++ b/src/legacy/i810/xvmc/meson.build
@@ -4,6 +4,7 @@ shared_library('I810XvMC',
 	       sources : 'I810XvMC.c',
 	       dependencies : [
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('libdrm', required : true),
diff --git a/xvmc/meson.build b/xvmc/meson.build
index 0ecc51e5..eeba2b66 100644
--- a/xvmc/meson.build
+++ b/xvmc/meson.build
@@ -14,6 +14,7 @@ shared_library('IntelXvMC',
 	       dependencies : [
 		 dependency('threads', required : true),
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('x11-xcb', required : true),
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/16] sna: stop using obsolete type aliases
       [not found] <20250304155809.30399-1-info@metux.net>
  2025-03-04 15:57 ` [PATCH 01/16] meson.build: fix missing Xv dependencies Enrico Weigelt, metux IT consult
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-21 21:57   ` Ville Syrjälä
  2025-03-04 15:57 ` [PATCH 03/16] tools: fix FTBS on FreeBSD Enrico Weigelt, metux IT consult
                   ` (14 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

The Xserver has been moved to using pixman for all matrix operations, back in
2008, but left some #define's so drivers still compile. Since 1.5 decades have
passed now, it's time to fix remaining drivers still using the old name, so
we can drop these #define's from the Xserver includes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index d4fa7b0b..d33a88af 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -208,7 +208,7 @@ struct sna_crtc {
 	bool hwcursor;
 	bool flip_pending;

-	struct pict_f_transform cursor_to_fb, fb_to_cursor;
+	struct pixman_f_transform cursor_to_fb, fb_to_cursor;

 	RegionRec crtc_damage;
 	uint16_t shadow_bo_width, shadow_bo_height;
@@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
 {
 	RRTransformPtr transform;
 	PictTransform crtc_to_fb;
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	unsigned pitch_limit;
 	BoxRec b;

@@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
 static void sna_crtc_randr(xf86CrtcPtr crtc)
 {
 	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	PictTransform crtc_to_fb;
 	PictFilterPtr filter;
 	xFixed *params;
@@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
 		if (crtc->transform_in_use) {
 			int xhot = sna->cursor.ref->bits->xhot;
 			int yhot = sna->cursor.ref->bits->yhot;
-			struct pict_f_vector v, hot;
+			struct pixman_f_vector v, hot;

 			v.v[0] = x + xhot + .5;
 			v.v[1] = y + yhot + .5;
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/16] tools: fix FTBS on FreeBSD
       [not found] <20250304155809.30399-1-info@metux.net>
  2025-03-04 15:57 ` [PATCH 01/16] meson.build: fix missing Xv dependencies Enrico Weigelt, metux IT consult
  2025-03-04 15:57 ` [PATCH 02/16] sna: stop using obsolete type aliases Enrico Weigelt, metux IT consult
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:57 ` [PATCH 04/16] backlight: use system() instead of System() Enrico Weigelt, metux IT consult
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

ETIME seems to be missing, so just alias it to ETIMEDOUT
It's just used by internal functions of the tools.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 tools/virtual.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/virtual.c b/tools/virtual.c
index 010a3aab..9a4dde8e 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -69,6 +69,11 @@
 #include <fcntl.h>
 #include <assert.h>

+// for FreeBSD
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
+
 #define FORCE_FULL_REDRAW 0
 #define FORCE_16BIT_XFER 0

--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/16] backlight: use system() instead of System()
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (2 preceding siblings ...)
  2025-03-04 15:57 ` [PATCH 03/16] tools: fix FTBS on FreeBSD Enrico Weigelt, metux IT consult
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:49   ` Ville Syrjälä
  2025-03-04 15:57 ` [PATCH 05/16] sna: use GCPtr instead of GC * Enrico Weigelt, metux IT consult
                   ` (12 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

The Xserver's System() function is a special wrapper for calling a program
(xkbcomp) as an unprivileged user, when the Xserver is running as suid-root.
(which today only needed on a few platforms, eg. Solaris). Therefore it's
not suited for being called by arbitrary drivers.

In this specific context it doesn't even much sense, since it's just used
for checking whether pkexec command is present at all (and just should be
used), while the actual exec'ing of the helper is done directly by fork()
and exec() syscalls.

Thus we can safely use standard system() call instead - clearing the road
for dropping System() from Xserver's public/driver API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backlight.c b/src/backlight.c
index fcbb279f..f416f2a4 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -366,7 +366,7 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
 		return 0;

 	if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
-		if (System("pkexec --version"))
+		if (system("pkexec --version"))
 			return 0;

 		use_pkexec = 1;
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/16] sna: use GCPtr instead of GC *
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (3 preceding siblings ...)
  2025-03-04 15:57 ` [PATCH 04/16] backlight: use system() instead of System() Enrico Weigelt, metux IT consult
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:05   ` Ville Syrjälä
  2025-03-04 15:57 ` [PATCH 06/16] gitlab CI: common scripts for driver builds Enrico Weigelt, metux IT consult
                   ` (11 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Xserver includes have explicit pointer types for quite all kind of structs
(at least those used by drivers), which are used all over the Xserver.
Thus it's much cleaner to use those everywhere.

This commit also clears the road to fix a horrible nightmare of hacks just
needed to circumvent naming clashes between Xserver and Xlib (affecting all
DDXes that are painting on another Xserver): we can simply rename Xserver's
own "GC" type to "GCRec" (the usual naming convention here) and so no trouble
with Xlib's "GC" type anymore. Once this has landed, we're free to do that
without breaking this driver.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_accel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 89b82afa..90a61ab3 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -14300,7 +14300,7 @@ static void
 sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
 				       struct kgem_bo *bo,
 				       uint32_t br00, uint32_t br13,
-				       const GC *gc,
+				       const GCPtr gc,
 				       const BoxRec *box,
 				       const DDXPointRec *origin)
 {
@@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
 				  struct kgem_bo *bo,
 				  struct kgem_bo **tile,
 				  uint32_t br00, uint32_t br13,
-				  const GC *gc,
+				  const GCPtr gc,
 				  const BoxRec *box,
 				  const DDXPointRec *origin)
 {
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/16] gitlab CI: common scripts for driver builds
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (4 preceding siblings ...)
  2025-03-04 15:57 ` [PATCH 05/16] sna: use GCPtr instead of GC * Enrico Weigelt, metux IT consult
@ 2025-03-04 15:57 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:58 ` [PATCH 07/16] gitlab CI: add pipeline for building against various Xserver releases Enrico Weigelt, metux IT consult
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Adding a bunch of common scripts for building xorg drivers on different
platforms (for now Debian and FreeBSD) against different server versions.

Also designed to be executed locally (eg. within a VM), so one doesn't
always have to employ f.d.o gitlab.

For now, these are synced manually across various driver repos, until we've
found a viable solution for a central place.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 .gitlab-ci/common/README.md                   |  20 ++
 .gitlab-ci/common/build-driver.sh             |  61 +++++
 .gitlab-ci/common/build-xserver.sh            |  71 ++++++
 .gitlab-ci/common/debian/image-install.sh     |  91 ++++++++
 .gitlab-ci/common/freebsd/FreeBSD.conf        |   8 +
 .gitlab-ci/common/freebsd/image-install.sh    |  59 +++++
 .../common/freebsd/libdrm-2.4.116.patch       | 109 +++++++++
 .gitlab-ci/common/xorg-driver.yml             | 216 ++++++++++++++++++
 8 files changed, 635 insertions(+)
 create mode 100644 .gitlab-ci/common/README.md
 create mode 100755 .gitlab-ci/common/build-driver.sh
 create mode 100755 .gitlab-ci/common/build-xserver.sh
 create mode 100755 .gitlab-ci/common/debian/image-install.sh
 create mode 100644 .gitlab-ci/common/freebsd/FreeBSD.conf
 create mode 100755 .gitlab-ci/common/freebsd/image-install.sh
 create mode 100644 .gitlab-ci/common/freebsd/libdrm-2.4.116.patch
 create mode 100644 .gitlab-ci/common/xorg-driver.yml

diff --git a/.gitlab-ci/common/README.md b/.gitlab-ci/common/README.md
new file mode 100644
index 00000000..1f2dbd87
--- /dev/null
+++ b/.gitlab-ci/common/README.md
@@ -0,0 +1,20 @@
+common CI stuff - supposed to be synced across all drivers
+
+moving this to a dedicated CI component is left for a later exercise.
+
+Some scripts can also be used locally, eg. in a VM:
+
+Prepare the image:
+
+    .gitlab-ci/common/debian/image-install.sh
+    .gitlab-ci/common/freebsd/image-install.sh
+
+Build the xserver + driver:
+
+    .gitlab-ci/common/build-driver.sh debian <xserver git ref>
+    .gitlab-ci/common/build-driver.sh freebsd <xserver git ref>
+
+Build just the xserver:
+
+    .gitlab-ci/common/build-xserver.sh debian <xserver git ref>
+    .gitlab-ci/common/build-xserver.sh freebsd <xserver git ref>
diff --git a/.gitlab-ci/common/build-driver.sh b/.gitlab-ci/common/build-driver.sh
new file mode 100755
index 00000000..384d7636
--- /dev/null
+++ b/.gitlab-ci/common/build-driver.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+
+set -e
+
+PLATFORM="$1"
+XSERVER_REF="$2"
+
+if [ ! "$PLATFORM" ]; then
+    echo "missing PLATFORM" >&2
+    exit 1
+fi
+
+if [ ! "$XSERVER_REF" ]; then
+    echo "missing XSERVER_REF" >&2
+    exit 1
+fi
+
+.gitlab-ci/common/build-xserver.sh "$PLATFORM" "$XSERVER_REF"
+
+MACH=`gcc -dumpmachine`
+echo "Building on machine $MACH"
+
+case "$PLATFORM" in
+    freebsd)
+        export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig"
+        export ACLOCAL_PATH="/usr/share/aclocal:/usr/local/share/aclocal"
+        export CFLAGS="$CFLAGS -I/usr/local/include"
+        export UDEV_CFLAGS=" "
+        export UDEV_LIBS=" "
+    ;;
+    debian)
+        export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig"
+    ;;
+    *)
+        echo "unknown platform $PLATFORM" >&2
+    ;;
+esac
+
+if [ -f autogen.sh ]; then
+    (
+        echo "building driver via autotools"
+        rm -Rf _builddir
+        mkdir -p _builddir
+        cd _builddir
+        ../autogen.sh --disable-silent-rules
+        make
+        make check
+        make distcheck
+    )
+elif [ -f meson.build ]; then
+    (
+        echo "building driver via meson"
+        meson setup _build
+        cd _build
+        meson compile
+        meson install
+    )
+else
+    echo "failed detecting build system"
+    exit 1
+fi
diff --git a/.gitlab-ci/common/build-xserver.sh b/.gitlab-ci/common/build-xserver.sh
new file mode 100755
index 00000000..7e21580e
--- /dev/null
+++ b/.gitlab-ci/common/build-xserver.sh
@@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+
+set -e
+set -x
+
+PLATFORM="$1"
+XSERVER_REF="$2"
+
+if [ ! "$XSERVER_REF" ]; then
+    echo "missing XSERVER_REF variable" >&2
+    exit 1
+fi
+
+XSERVER_CLONE=/tmp/xserver
+XSERVER_BUILD=$XSERVER_CLONE/_builddir
+XSERVER_REPO=https://gitlab.freedesktop.org/xorg/xserver.git
+
+MACH=`gcc -dumpmachine`
+
+export PKG_CONFIG_PATH="/usr/lib/$MACH/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
+export PKG_CONFIG_PATH="/usr/local/lib/$MACH/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH"
+
+echo "cloning xserver"
+rm -Rf $XSERVER_CLONE
+git clone --depth=1 -b $XSERVER_REF $XSERVER_REPO $XSERVER_CLONE
+
+echo "checking platform: $PLATFORM"
+case "$PLATFORM" in
+    freebsd)
+        echo "Building on FreeBSD"
+        XSERVER_OS_AUTOCONF_FLAGS="--without-dtrace"
+        XSERVER_MESON_DISABLE="glx udev udev_kms"
+    ;;
+    debian)
+        echo "Building on Debian"
+    ;;
+    *)
+        echo "unknown platform $PLATFORM" >&2
+        exit 1
+    ;;
+esac
+
+if [ -f $XSERVER_CLONE/meson.build ]; then
+    (
+        echo "Building Xserver via meson"
+        for opt in $XSERVER_MESON_DISABLE ; do
+            if grep "'$opt'" $XSERVER_CLONE/meson_options.txt ; then
+                echo "disable $opt"
+                XSERVER_MESON_FLAGS="$XSERVER_MESON_FLAGS -D$opt=false"
+            else
+                echo "no option $opt"
+            fi
+        done
+        mkdir -p $XSERVER_BUILD
+        cd $XSERVER_BUILD
+        meson setup --prefix=/usr $XSERVER_MESON_FLAGS
+        meson compile
+        meson install
+    )
+else
+    (
+        echo "Building Xserver via autotools"
+        cd $XSERVER_CLONE
+        # Workaround glvnd having reset the version in gl.pc from what Mesa used
+        # similar to xserver commit e6ef2b12404dfec7f23592a3524d2a63d9d25802
+        sed -i -e 's/gl >= [79].[12].0/gl >= 1.2/' configure.ac
+        ./autogen.sh --prefix=/usr $XSERVER_AUTOCONF_FLAGS $XSERVER_OS_AUTOCONF_FLAGS
+        make -j`nproc`
+        make -j`nproc` install
+    )
+fi
diff --git a/.gitlab-ci/common/debian/image-install.sh b/.gitlab-ci/common/debian/image-install.sh
new file mode 100755
index 00000000..f0e98f0c
--- /dev/null
+++ b/.gitlab-ci/common/debian/image-install.sh
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+echo 'deb-src https://deb.debian.org/debian bullseye main' >>/etc/apt/sources.list.d/deb-src.list
+echo 'deb-src https://deb.debian.org/debian bullseye-updates main' >>/etc/apt/sources.list.d/deb-src.list
+echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list
+
+apt-get update
+
+apt-get autoremove -y --purge
+
+apt-get install -y --no-remove \
+	autoconf \
+	automake \
+	build-essential \
+	libtool \
+	pkg-config \
+	ca-certificates \
+	git \
+	debian-archive-keyring \
+	python3 python3-setuptools libxshmfence-dev \
+	clang \
+	libxcb-icccm4-dev libxcb-xkb-dev \
+	libxvmc-dev libxcb1-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-util-dev \
+	libxfixes-dev libxcb-xfixes0-dev libxrender-dev libxdamage-dev libxrandr-dev \
+	libxcursor-dev libxss-dev libxinerama-dev libxtst-dev libpng-dev libssl-dev \
+	libxcb-dri3-dev libxxf86vm-dev libxfont-dev libxkbfile-dev libdrm-dev \
+	libgbm-dev libgl1-mesa-dev libpciaccess-dev libpixman-1-dev libudev-dev \
+	libgcrypt-dev libepoxy-dev libevdev-dev libmtdev-dev libinput-dev \
+	mesa-common-dev libspice-protocol-dev libspice-server-dev \
+	meson/bullseye-backports \
+	nettle-dev \
+	pkg-config \
+	valgrind \
+	x11-xkb-utils xfonts-utils xutils-dev x11proto-dev
+
+build_autoconf() {
+    local subdir="$1"
+    shift
+    (
+        cd $subdir
+        ./autogen.sh "$@"
+        make -j${FDO_CI_CONCURRENT:-4}
+        make -j${FDO_CI_CONCURRENT:-4} install
+    )
+}
+
+build_meson() {
+    local subdir="$1"
+    shift
+    (
+        cd $subdir
+        meson _build -Dprefix=/usr "$@"
+        ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
+    )
+}
+
+do_clone() {
+    git clone "$1" --depth 1 --branch="$2"
+}
+
+mkdir -p /tmp/build-deps
+cd /tmp/build-deps
+
+# xserver 1.18 and older branches require libXfont 1.5 instead of 2.0
+echo "Installing libXfont 1.5"
+do_clone https://gitlab.freedesktop.org/xorg/lib/libXfont.git libXfont-1.5-branch
+build_autoconf libXfont
+
+echo "Installing font-util"
+do_clone https://gitlab.freedesktop.org/xorg/font/util.git font-util-1.4.1
+build_autoconf util --prefix=/usr
+
+echo "Installing libxcvt"
+do_clone https://gitlab.freedesktop.org/xorg/lib/libxcvt.git libxcvt-0.1.0
+build_meson libxcvt
+
+# xserver requires xorgproto >= 2024.1 for XWAYLAND
+echo "Installing xorgproto"
+do_clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git xorgproto-2024.1
+build_autoconf xorgproto
+
+# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
+# xf86-video-freedreno and xf86-video-omap need extra features
+echo "Installing libdrm"
+do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
+build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
+
+rm -Rf /tmp/build-deps
diff --git a/.gitlab-ci/common/freebsd/FreeBSD.conf b/.gitlab-ci/common/freebsd/FreeBSD.conf
new file mode 100644
index 00000000..50a9bce1
--- /dev/null
+++ b/.gitlab-ci/common/freebsd/FreeBSD.conf
@@ -0,0 +1,8 @@
+# using the latest branch
+FreeBSD: {
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
+  mirror_type: "srv",
+  signature_type: "fingerprints",
+  fingerprints: "/usr/share/keys/pkg",
+  enabled: yes
+}
diff --git a/.gitlab-ci/common/freebsd/image-install.sh b/.gitlab-ci/common/freebsd/image-install.sh
new file mode 100755
index 00000000..758e90fc
--- /dev/null
+++ b/.gitlab-ci/common/freebsd/image-install.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+
+set -e
+
+# note: really wanna install to /usr/local, since that's explicitly searched first,
+# so we always catch the locally installed before any system/ports provided one
+# otherwise we might run into trouble like trying to use outdated xorgproto
+build_autoconf() {
+    local subdir="$1"
+    shift
+    (
+        cd $subdir
+        ./autogen.sh --prefix=/usr/local "$@"
+        make -j${FDO_CI_CONCURRENT:-4}
+        make -j${FDO_CI_CONCURRENT:-4} install
+    )
+}
+
+build_meson() {
+    local subdir="$1"
+    shift
+    (
+        cd $subdir
+        meson _build -Dprefix=/usr/local "$@"
+        ninja -C _build -j${FDO_CI_CONCURRENT:-4} install
+    )
+}
+
+do_clone() {
+    git clone "$1" --depth 1 --branch="$2"
+}
+
+cp .gitlab-ci/common/freebsd/FreeBSD.conf /etc/pkg
+
+pkg upgrade -f -y
+
+pkg install -y \
+    git gcc pkgconf autoconf automake libtool xorg-macros xorgproto meson \
+    ninja pixman xtrans libXau libXdmcp libXfont libXfont2 libxkbfile libxcvt \
+    libpciaccess font-util libepoll-shim libdrm mesa-libs libdrm libglu mesa-dri \
+    libepoxy nettle xkbcomp libXvMC xcb-util valgrind libXcursor libXScrnSaver \
+    libXinerama libXtst evdev-proto libevdev libmtdev libinput spice-protocol \
+    libspice-server xcb-util xcb-util-wm
+
+[ -f /bin/bash ] || ln -sf /usr/local/bin/bash /bin/bash
+
+# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
+# xf86-video-freedreno and xf86-video-omap need extra features
+echo "Installing libdrm"
+do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
+(
+    cd drm
+    git config user.email "buildbot@freebsd"
+    git config user.name "FreeBSD build bot"
+    git am ../.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
+)
+build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
+
+echo "=== post-install script END"
diff --git a/.gitlab-ci/common/freebsd/libdrm-2.4.116.patch b/.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
new file mode 100644
index 00000000..820ea279
--- /dev/null
+++ b/.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
@@ -0,0 +1,109 @@
+From a87432dbb281ddf1c50a5e78091d38f0dac79416 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <info@metux.net>
+Date: Fri, 7 Jun 2024 15:18:47 +0200
+Subject: [PATCH 1/2] fix FTBS on FreeBSD (or non-Linux in general)
+
+Several drivers still including <linux/stddef.h>, but not using anything
+from it, thus breaking build on non-Linux platforms (eg. FreeBSD).
+Since not needed at all, just stop including it.
+
+Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
+---
+ etnaviv/etnaviv_device.c          | 1 -
+ exynos/exynos_drm.c               | 1 -
+ exynos/exynos_fimg2d.c            | 1 -
+ omap/omap_drm.c                   | 1 -
+ tests/exynos/exynos_fimg2d_test.c | 1 -
+ 5 files changed, 5 deletions(-)
+
+diff --git a/etnaviv/etnaviv_device.c b/etnaviv/etnaviv_device.c
+index 699df256..a63bd15d 100644
+--- a/etnaviv/etnaviv_device.c
++++ b/etnaviv/etnaviv_device.c
+@@ -25,7 +25,6 @@
+  */
+
+ #include <stdlib.h>
+-#include <linux/stddef.h>
+ #include <linux/types.h>
+ #include <errno.h>
+ #include <sys/mman.h>
+diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
+index 3e322a17..fb4cd8de 100644
+--- a/exynos/exynos_drm.c
++++ b/exynos/exynos_drm.c
+@@ -31,7 +31,6 @@
+ #include <unistd.h>
+
+ #include <sys/mman.h>
+-#include <linux/stddef.h>
+
+ #include <xf86drm.h>
+
+diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
+index ac6fa687..f0aee962 100644
+--- a/exynos/exynos_fimg2d.c
++++ b/exynos/exynos_fimg2d.c
+@@ -30,7 +30,6 @@
+ #include <assert.h>
+
+ #include <sys/mman.h>
+-#include <linux/stddef.h>
+
+ #include <xf86drm.h>
+
+diff --git a/omap/omap_drm.c b/omap/omap_drm.c
+index aa273660..42d35ef7 100644
+--- a/omap/omap_drm.c
++++ b/omap/omap_drm.c
+@@ -27,7 +27,6 @@
+  */
+
+ #include <stdlib.h>
+-#include <linux/stddef.h>
+ #include <linux/types.h>
+ #include <errno.h>
+ #include <sys/mman.h>
+diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
+index d85e2f6b..b1baa503 100644
+--- a/tests/exynos/exynos_fimg2d_test.c
++++ b/tests/exynos/exynos_fimg2d_test.c
+@@ -31,7 +31,6 @@
+ #include <unistd.h>
+
+ #include <sys/mman.h>
+-#include <linux/stddef.h>
+
+ #include <xf86drm.h>
+ #include <xf86drmMode.h>
+--
+2.39.2
+
+From 79123db12c6c5f42747fae02068b482055e8c376 Mon Sep 17 00:00:00 2001
+From: "Enrico Weigelt, metux IT consult" <info@metux.net>
+Date: Fri, 7 Jun 2024 15:43:13 +0200
+Subject: [PATCH 2/2] omap: fix FTBS on FreeBSD and drop unneeded include
+
+No need to explicitly include <linux/types.h>, since drm.h already does that,
+but conditionally only Linux only.
+
+Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
+---
+ omap/omap_drm.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/omap/omap_drm.c b/omap/omap_drm.c
+index 42d35ef7..93d2207f 100644
+--- a/omap/omap_drm.c
++++ b/omap/omap_drm.c
+@@ -27,7 +27,6 @@
+  */
+
+ #include <stdlib.h>
+-#include <linux/types.h>
+ #include <errno.h>
+ #include <sys/mman.h>
+ #include <fcntl.h>
+--
+2.39.2
+
diff --git a/.gitlab-ci/common/xorg-driver.yml b/.gitlab-ci/common/xorg-driver.yml
new file mode 100644
index 00000000..3e63bc48
--- /dev/null
+++ b/.gitlab-ci/common/xorg-driver.yml
@@ -0,0 +1,216 @@
+# version 0.1.19
+variables:
+    DEBIAN_VERSION:   'bullseye-slim'
+    DEBIAN_TAG:       "2024-10-01.03"
+    DEBIAN_EXEC:      'bash .gitlab-ci/common/debian/image-install.sh'
+    DEBIAN_SKIP:      "false" # to enable, it has to be litterally "true"
+
+    FREEBSD_TAG:      '2024-10-01.01'
+    FREEBSD_VERSION:  '14.0'
+# image is yet too small for that - need a more complicated way :(
+#    FREEBSD_EXEC:     "bash .gitlab-ci/common/freebsd/image-install.sh"
+    FREEBSD_SKIP:     "false" # to enable, it has to be litterally "true"
+
+.templates_sha: &template_sha bc70242ffb8402243e934659ecc1a2d1c89eca2b # see https://docs.gitlab.com/ee/ci/yaml/#includefile
+
+include:
+    - project:  'freedesktop/ci-templates'
+      ref:      *template_sha
+      file:     '/templates/debian.yml'
+    - project:  'freedesktop/ci-templates'
+      ref:      *template_sha
+      file:     '/templates/freebsd.yml'
+    - project:  'freedesktop/ci-templates'
+      ref:      *template_sha
+      file:     '/templates/ci-fairy.yml'
+    - template: Security/SAST.gitlab-ci.yml
+
+stages:
+    - images
+    - build
+    - test
+
+# standard commits quality check
+check-commits:
+    extends:
+        - .fdo.ci-fairy
+    stage: test
+    script:
+        - ci-fairy check-commits --junit-xml=results.xml
+    except:
+        - master@$FDO_UPSTREAM_REPO
+    variables:
+        GIT_DEPTH: 100
+    artifacts:
+        reports:
+            junit: results.xml
+    allow_failure: true
+    needs:
+
+# standard merge request quality checks
+check-merge-request:
+    extends:
+      - .fdo.ci-fairy
+    stage: test
+    script:
+      - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
+    artifacts:
+        when: on_failure
+        reports:
+            junit: results.xml
+    allow_failure: true
+    needs:
+
+# create debian build image
+image@debian@amd64:
+    extends:
+        - .xorg.distro@debian@amd64
+        - .fdo.container-build@debian
+    stage: images
+    variables:
+        GIT_STRATEGY: none
+    rules:
+        - if: $DEBIAN_SKIP != "true"
+          when: always
+    needs:
+
+image@debian@i386:
+    extends:
+        - .xorg.distro@debian@i386
+        - .fdo.container-build@debian
+    stage: images
+    variables:
+        GIT_STRATEGY: none
+    rules:
+        - if: $DEBIAN_SKIP != "true"
+          when: always
+    needs:
+
+# inherit this to define FDO_DISTRIBUTION_* variables for Debian
+.xorg.distro@debian@amd64:
+    variables:
+        FDO_DISTRIBUTION_VERSION:   "$DEBIAN_VERSION"
+        FDO_DISTRIBUTION_EXEC:      "$DEBIAN_EXEC"
+        FDO_DISTRIBUTION_TAG:       "amd64-$DEBIAN_TAG"
+        FDO_BASE_IMAGE:             "amd64/debian:$DEBIAN_VERSION"
+
+.xorg.distro@debian@i386:
+    variables:
+        FDO_DISTRIBUTION_VERSION:   "$DEBIAN_VERSION"
+        FDO_DISTRIBUTION_EXEC:      "$DEBIAN_EXEC"
+        FDO_DISTRIBUTION_TAG:       "i386-$DEBIAN_TAG"
+        FDO_BASE_IMAGE:             "i386/debian:$DEBIAN_VERSION"
+
+# overwrite this one if another matrix is needed
+.xorg.driver_matrix@debian:
+    parallel:
+        matrix:
+            - CC:           [ "gcc", "clang" ]
+              XSERVER_REF:  [
+# these break on Debian
+#                "xorg-server-1.18.4",
+#                "xorg-server-1.19.7",
+                "xorg-server-1.20.14",
+                "xorg-server-21.1.13",
+                "master"
+              ]
+
+# default build with meson on Debian
+.xorg.driver_common@debian:
+    needs:
+        - image@debian@i386
+        - image@debian@amd64
+    extends:
+        - .fdo.distribution-image@debian
+    stage: build
+    script:
+        - .gitlab-ci/common/build-driver.sh "debian" "$XSERVER_REF"
+    variables:
+        CFLAGS: "-pipe -g -O2"
+    rules:
+        - if: $DEBIAN_SKIP != "true"
+          when: always
+
+# overwrite this when you need some special Debian build
+build@debian@amd64:
+    extends:
+        - .xorg.driver_matrix@debian
+        - .xorg.driver_common@debian
+        - .xorg.distro@debian@amd64
+
+build@debian@i386:
+    extends:
+        - .xorg.driver_matrix@debian
+        - .xorg.driver_common@debian
+        - .xorg.distro@debian@i386
+
+# inherit this to define FDO_DISTRIBUTION_* variables for FreeBSD
+.xorg.distro@freebsd:
+    variables:
+        FDO_DISTRIBUTION_VERSION:   "$FREEBSD_VERSION"
+        FDO_DISTRIBUTION_EXEC:      "$FREEBSD_EXEC"
+        FDO_DISTRIBUTION_TAG:       "$FREEBSD_TAG"
+
+# create base image for FreeBSD
+image@freebsd:
+    extends:
+        - .xorg.distro@freebsd
+        - .fdo.qemu-build@freebsd@x86_64
+    stage: images
+    variables:
+        GIT_STRATEGY: none
+    rules:
+        - if: $FREEBSD_SKIP != "true"
+          when: always
+
+# inherit this to get the default build matrix
+.xorg.driver_matrix@freebsd:
+    parallel:
+        matrix:
+            - CC:           [ "gcc", "clang" ]
+              XSERVER_REF:  [
+#                "xorg-server-1.18.4", # this breaks due name clash on "bool"
+#                "xorg-server-1.19.7",
+#                "xorg-server-1.20.14", # breaks meson ... see: 331850ce6f0c48a1cfc489da2a27ca0220997a2f -- server-1.20-branch
+                "xorg-server-21.0.99.1",
+                "xorg-server-21.1.13",
+                "master"
+              ]
+
+# common build for driver on FreeBSD. meson and autoconf are both handled by this
+.xorg.driver_common@freebsd:
+    needs:
+        - image@freebsd
+    stage: build
+    extends:
+        - .fdo.distribution-image@freebsd
+        - .xorg.distro@freebsd
+    script:
+        # FIXME: increasing image and running image-install.sh should be done
+        # at container image build time, but would have to replicate too much
+        # of the cbuild script here. better wait until CI folks have increased
+        # the image size or provide hooks for that
+        - xz -d -T0 /app/image.raw.xz
+        - rm -f /app/image.raw.xz
+        - truncate -s +5G /app/image.raw
+        - /app/vmctl start
+        - set +e
+        - /app/vmctl exec "service growfs onestart"
+        - scp -r $PWD "vm:"
+        - /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/freebsd/image-install.sh"
+        - /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/build-driver.sh freebsd $XSERVER_REF" && touch .success
+        # copy any test results from the VM to our container so we can
+        # save them as artifacts
+        - scp -r vm:$CI_PROJECT_NAME/test-results.xml . || true # this is allowed to fail
+        - /app/vmctl stop
+        - set -e
+        - test -e .success || exit 1
+    rules:
+        - if: $FREEBSD_SKIP != "true"
+          when: always
+
+# overwrite this if you need some special FreeBSD build
+build@freebsd:
+    extends:
+        - .xorg.driver_matrix@freebsd
+        - .xorg.driver_common@freebsd
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/16] gitlab CI: add pipeline for building against various Xserver releases
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (5 preceding siblings ...)
  2025-03-04 15:57 ` [PATCH 06/16] gitlab CI: common scripts for driver builds Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:58 ` [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO() Enrico Weigelt, metux IT consult
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Adding a gitlab pipeline building this driver against Xserver major releases
since 1.18, including current master branch, on Debian as well as FreeBSD.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 .gitlab-ci.yml | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..5521ff67
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,5 @@
+variables:
+    FDO_UPSTREAM_REPO:  'xorg/driver/xf86-video-intel'
+
+include:
+    - local:    '.gitlab-ci/common/xorg-driver.yml'
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO()
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (6 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 07/16] gitlab CI: add pipeline for building against various Xserver releases Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:07   ` Ville Syrjälä
  2025-03-04 15:58 ` [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors() Enrico Weigelt, metux IT consult
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

These are just wrappers for calling input_lock()/input_unlock() and marked
deprecated for quite a while now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_display.c  | 5 +++--
 src/uxa/intel_driver.c | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index d33a88af..d4adf34f 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1161,11 +1161,12 @@ static inline void sigio_unblock(int was_blocked)
 #include <xf86_OSproc.h>
 static inline int sigio_block(void)
 {
-	return xf86BlockSIGIO();
+	input_lock();
+	return 0;
 }
 static inline void sigio_unblock(int was_blocked)
 {
-	xf86UnblockSIGIO(was_blocked);
+	input_unlock();
 }
 #endif

diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index 9c3fe85f..79105b89 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -641,10 +641,10 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
         intel_flush(intel);
 	if (!intel->has_prime_vmap_flush) {
 		drm_intel_bo *bo = intel_uxa_get_pixmap_bo(PixmapDirtyPrimary(dirty));
-		was_blocked = xf86BlockSIGIO();
+		input_lock();
 		drm_intel_bo_map(bo, FALSE);
 		drm_intel_bo_unmap(bo);
-		xf86UnblockSIGIO(was_blocked);
+		input_unlock();
 	}

 	DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors()
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (7 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO() Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:49   ` Ville Syrjälä
  2025-03-04 15:58 ` [PATCH 10/16] use XNFalloc() instead of xnfalloc Enrico Weigelt, metux IT consult
                   ` (7 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

the function has become a no-op, it's former duties are done automatically.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/uxa/intel_display.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index 409cbbcf..2a544779 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -394,9 +394,6 @@ intel_crtc_apply(xf86CrtcPtr crtc)
 		}
 	}

-	if (scrn->pScreen)
-		xf86_reload_cursors(scrn->pScreen);
-
 done:
 	free(output_ids);
 	return ret;
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/16] use XNFalloc() instead of xnfalloc
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (8 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors() Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:58 ` [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro Enrico Weigelt, metux IT consult
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

xnfalloc is just an alias for XNFalloc() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_video_overlay.c   | 2 +-
 src/sna/sna_video_sprite.c    | 2 +-
 src/sna/sna_video_textured.c  | 2 +-
 src/uxa/intel_uxa_video.c     | 2 +-
 src/uxa/intel_video_overlay.c | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index 07964871..5989b261 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -723,7 +723,7 @@ void sna_video_overlay_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Video Overlay";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index db3865b9..2d012b95 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -854,7 +854,7 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Video Sprite";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 6e30461d..0b3330f2 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -414,7 +414,7 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Textured Video";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
diff --git a/src/uxa/intel_uxa_video.c b/src/uxa/intel_uxa_video.c
index 8287be4b..8e0eb4a2 100644
--- a/src/uxa/intel_uxa_video.c
+++ b/src/uxa/intel_uxa_video.c
@@ -339,7 +339,7 @@ XF86VideoAdaptorPtr intel_uxa_video_setup_image_textured(ScreenPtr screen)
 	adapt->flags = 0;
 	adapt->name = "Intel(R) Textured Video";
 	adapt->nEncodings = 1;
-	adapt->pEncodings = xnfalloc(sizeof(intel_xv_dummy_encoding));
+	adapt->pEncodings = XNFalloc(sizeof(intel_xv_dummy_encoding));
 	memcpy(adapt->pEncodings, intel_xv_dummy_encoding, sizeof(intel_xv_dummy_encoding));
 	adapt->nFormats = NUM_FORMATS;
 	adapt->pFormats = intel_xv_formats;
diff --git a/src/uxa/intel_video_overlay.c b/src/uxa/intel_video_overlay.c
index 8e0eb7af..35f615c2 100644
--- a/src/uxa/intel_video_overlay.c
+++ b/src/uxa/intel_video_overlay.c
@@ -465,7 +465,7 @@ XF86VideoAdaptorPtr intel_video_overlay_setup_image(ScreenPtr screen)
 	adapt->flags = VIDEO_OVERLAID_IMAGES /*| VIDEO_CLIP_TO_VIEWPORT */ ;
 	adapt->name = "Intel(R) Video Overlay";
 	adapt->nEncodings = 1;
-	adapt->pEncodings = xnfalloc(sizeof(intel_xv_dummy_encoding));
+	adapt->pEncodings = XNFalloc(sizeof(intel_xv_dummy_encoding));
 	memcpy(adapt->pEncodings, intel_xv_dummy_encoding, sizeof(intel_xv_dummy_encoding));
 	if (IS_845G(intel) || IS_I830(intel)) {
 		adapt->pEncodings->width = IMAGE_MAX_WIDTH_LEGACY;
@@ -483,7 +483,7 @@ XF86VideoAdaptorPtr intel_video_overlay_setup_image(ScreenPtr screen)
 	if (INTEL_INFO(intel)->gen >= 030)
 		adapt->nAttributes += GAMMA_ATTRIBUTES;	/* has gamma */
 	adapt->pAttributes =
-	    xnfalloc(sizeof(XF86AttributeRec) * adapt->nAttributes);
+	    XNFalloc(sizeof(XF86AttributeRec) * adapt->nAttributes);
 	/* Now copy the attributes */
 	att = adapt->pAttributes;
 	memcpy((char *)att, (char *)intel_xv_attributes,
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (9 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 10/16] use XNFalloc() instead of xnfalloc Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:08   ` Ville Syrjälä
  2025-03-04 15:58 ` [PATCH 12/16] sna: use xserver's bswap_32() Enrico Weigelt, metux IT consult
                   ` (5 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/legacy/i810/i810_driver.c | 4 ++--
 src/legacy/i810/i810_xaa.c    | 4 ++--
 src/uxa/intel_driver.c        | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/legacy/i810/i810_driver.c b/src/legacy/i810/i810_driver.c
index 778b1a41..e24d3f8b 100644
--- a/src/legacy/i810/i810_driver.c
+++ b/src/legacy/i810/i810_driver.c
@@ -155,7 +155,7 @@ I810GetRec(ScrnInfoPtr scrn)
    if (((uintptr_t)scrn->driverPrivate & 3) == 0)
       return TRUE;

-   scrn->driverPrivate = xnfcalloc(sizeof(I810Rec), 1);
+   scrn->driverPrivate = XNFcallocarray(sizeof(I810Rec), 1);
    return TRUE;
 }

@@ -503,7 +503,7 @@ I810PreInit(ScrnInfoPtr scrn, int flags)
 	 pI810->MaxClock = 86000;
       }
    }
-   clockRanges = xnfcalloc(sizeof(ClockRange), 1);
+   clockRanges = XNFcallocarray(sizeof(ClockRange), 1);
    clockRanges->next = NULL;
    /* 9.4MHz appears to be the smallest that works. */
    clockRanges->minClock = 9500;
diff --git a/src/legacy/i810/i810_xaa.c b/src/legacy/i810/i810_xaa.c
index ea03441b..1e0a8527 100644
--- a/src/legacy/i810/i810_xaa.c
+++ b/src/legacy/i810/i810_xaa.c
@@ -284,7 +284,7 @@ I810AccelInit(ScreenPtr pScreen)

       pI810->NumScanlineColorExpandBuffers = nr_buffers;
       pI810->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(nr_buffers, sizeof(unsigned char *));
+	    XNFcallocarray(nr_buffers, sizeof(unsigned char *));

       for (i = 0; i < nr_buffers; i++, ptr += width)
 	 pI810->ScanlineColorExpandBuffers[i] = ptr;
@@ -295,7 +295,7 @@ I810AccelInit(ScreenPtr pScreen)
 							  | 0);

       infoPtr->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(1, sizeof(unsigned char *));
+	    XNFcallocarray(1, sizeof(unsigned char *));
       infoPtr->NumScanlineColorExpandBuffers = 1;

       infoPtr->ScanlineColorExpandBuffers[0] =
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index 79105b89..24783492 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -460,7 +460,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 		return TRUE;

 	if (((uintptr_t)scrn->driverPrivate) & 3) {
-		intel = xnfcalloc(sizeof(*intel), 1);
+		intel = XNFcallocarray(sizeof(*intel), 1);
 		if (intel == NULL)
 			return FALSE;

--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 12/16] sna: use xserver's bswap_32()
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (10 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:58 ` [PATCH 13/16] meson.build: increase required version Enrico Weigelt, metux IT consult
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Some (non-BSD) platforms don't have <byteswap.h>, so better use the
Xserver's bswap_32() implementation here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index b7aa6624..9217a42f 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -68,7 +68,8 @@
 #define bswap_32 bswap32
 #endif
 #else
-#include <byteswap.h>
+/* use Xserver's implementation */
+#include "misc.h"
 #endif

 #ifdef SNA_XVMC
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 13/16] meson.build: increase required version
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (11 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 12/16] sna: use xserver's bswap_32() Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:13   ` Ville Syrjälä
  2025-03-04 15:58 ` [PATCH 14/16] Define __container_of only if not defined yet Enrico Weigelt, metux IT consult
                   ` (3 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.41.0': capture arg in configure_file.
377tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.50.0': install arg in configure_file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 227ca2eb..fa861401 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('xf86-video-intel', 'c',
 	  'c_std=gnu99',
 	],
 	license : 'MIT',
-	meson_version : '>0.40.0')
+	meson_version : '>=0.50.0')

 config = configuration_data()

--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 14/16] Define __container_of only if not defined yet.
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (12 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 13/16] meson.build: increase required version Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-21 22:19   ` Ville Syrjälä
  2025-03-04 15:58 ` [PATCH 15/16] use dixDestroyPixmap() instead of direct driver call Enrico Weigelt, metux IT consult
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Silence warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 benchmarks/dri3-swap.c | 2 ++
 src/intel_list.h       | 3 +++
 test/present-speed.c   | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/benchmarks/dri3-swap.c b/benchmarks/dri3-swap.c
index 4dd423b3..fa8ec34e 100644
--- a/benchmarks/dri3-swap.c
+++ b/benchmarks/dri3-swap.c
@@ -110,8 +110,10 @@ list_move(struct list *list, struct list *head)
 	}
 }

+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif

 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\
diff --git a/src/intel_list.h b/src/intel_list.h
index c8a3187a..f0fe7af9 100644
--- a/src/intel_list.h
+++ b/src/intel_list.h
@@ -305,8 +305,11 @@ list_is_empty(const struct list *head)
 #define list_last_entry(ptr, type, member) \
     list_entry((ptr)->prev, type, member)

+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
 /**
  * Loop through the list given by head and set pos to struct in the list.
  *
diff --git a/test/present-speed.c b/test/present-speed.c
index eccde931..7765aa94 100644
--- a/test/present-speed.c
+++ b/test/present-speed.c
@@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
 	}
 }

+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif

 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 15/16] use dixDestroyPixmap() instead of direct driver call
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (13 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 14/16] Define __container_of only if not defined yet Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-04 15:58 ` [PATCH 16/16] use xf86NameCmp() instead of xf86nameCompare() Enrico Weigelt, metux IT consult
  2025-03-04 18:35 ` ✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies Patchwork
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/sna/sna_accel.c        |  8 ++++----
 src/sna/sna_display.c      |  6 +++---
 src/sna/sna_display_fake.c |  2 +-
 src/sna/sna_dri2.c         |  2 +-
 src/sna/sna_dri3.c         |  2 +-
 src/sna/sna_driver.c       |  4 ++--
 src/sna/sna_glyphs.c       |  2 +-
 src/sna/sna_render.c       | 14 +++++++-------
 src/sna/sna_video_sprite.c |  4 ++--
 src/uxa/i915_video.c       |  4 ++--
 src/uxa/intel_display.c    | 10 +++++-----
 src/uxa/intel_dri.c        | 14 +++++++-------
 src/uxa/intel_uxa.c        | 10 +++++-----
 src/uxa/uxa-glyphs.c       | 12 ++++++------
 src/uxa/uxa-render.c       | 24 ++++++++++++------------
 src/uxa/uxa.c              |  5 ++---
 16 files changed, 61 insertions(+), 62 deletions(-)

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 90a61ab3..e3c57edd 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -982,7 +982,7 @@ fallback:

 		if (!screen->ModifyPixmapHeader(pixmap, width, height, depth,
 						bpp, pitch, addr)) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return NULL;
 		}

@@ -6871,10 +6871,10 @@ discard_cow:
 						    box, n, 0)) {
 				DBG(("%s: fallback - accelerated copy boxes failed\n",
 				     __FUNCTION__));
-				tmp->drawable.pScreen->DestroyPixmap(tmp);
+				dixDestroyPixmap(tmp, 0);
 				goto fallback;
 			}
-			tmp->drawable.pScreen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);

 			if (damage)
 				sna_damage_add_to_pixmap(damage, region, dst_pixmap);
@@ -18011,7 +18011,7 @@ sna_set_screen_pixmap(PixmapPtr pixmap)
 	pixmap->refcnt++;

 	if (old_front)
-		screen->DestroyPixmap(old_front);
+		dixDestroyPixmap(old_front, 0);
 }

 static Bool
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index d4adf34f..33a7e70f 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6046,7 +6046,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
 	screen->SetScreenPixmap(new_front);
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(sna->front == new_front);
-	screen->DestroyPixmap(new_front); /* owned by screen now */
+	dixDestroyPixmap(new_front, 0); /* owned by screen now */

 	scrn->virtualX = width;
 	scrn->virtualY = height;
@@ -8918,7 +8918,7 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 free_src:
 	FreePicture(src, None);
 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 }

 static void
@@ -9028,7 +9028,7 @@ sna_crtc_redisplay__composite(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 free_src:
 	FreePicture(src, None);
 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 }

 static void
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index 401e9a06..ed26199c 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -215,7 +215,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(to_sna_from_screen(screen)->front == new_front);

-	screen->DestroyPixmap(new_front);
+	dixDestroyPixmap(new_front, 0);

 	return TRUE;
 }
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index ee4b89db..f5f47554 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -934,7 +934,7 @@ static void _sna_dri2_destroy_buffer(struct sna *sna,
 		sna_watch_flush(sna, -1);

 		sna_pixmap_set_buffer(pixmap, NULL);
-		pixmap->drawable.pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 	}

 	sna_dri2_cache_bo(sna, draw,
diff --git a/src/sna/sna_dri3.c b/src/sna/sna_dri3.c
index ce4970ae..cea1efc7 100644
--- a/src/sna/sna_dri3.c
+++ b/src/sna/sna_dri3.c
@@ -284,7 +284,7 @@ static PixmapPtr sna_dri3_pixmap_from_fd(ScreenPtr screen,
 	return pixmap;

 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 free_bo:
 	kgem_bo_destroy(&sna->kgem, bo);
 	return NULL;
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 137f29e8..66e8731e 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -266,7 +266,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
 	screen->SetScreenPixmap(new_front);
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(sna->front == new_front);
-	screen->DestroyPixmap(new_front); /* transfer ownership to screen */
+	dixDestroyPixmap(new_front, 0); /* transfer ownership to screen */

 	sna_mode_set_primary(sna);

@@ -1011,7 +1011,7 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL)
 	}

 	if (sna->front) {
-		screen->DestroyPixmap(sna->front);
+		dixDestroyPixmap(sna->front, 0);
 		sna->front = NULL;
 	}

diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index ebc061b5..a3894518 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -260,7 +260,7 @@ bool sna_glyphs_create(struct sna *sna)
 						serverClient, &error);
 		}

-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		if (!picture)
 			goto bail;

diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 904d4400..a0fdabcb 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -875,7 +875,7 @@ cleanup_src:
 cleanup_dst:
 	FreePicture(tmp_dst, 0);
 cleanup_tmp:
-	screen->DestroyPixmap(tmp);
+	dixDestroyPixmap(tmp, 0);
 	return ret;
 }

@@ -1348,7 +1348,7 @@ sna_render_picture_convolve(struct sna *sna,
 		tmp = CreatePicture(0, &pixmap->drawable,
 				PictureMatchFormat(screen, depth, channel->pict_format),
 				0, NULL, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (tmp == NULL)
 		return -1;

@@ -1429,7 +1429,7 @@ sna_render_picture_flatten(struct sna *sna,
 	tmp = CreatePicture(0, &pixmap->drawable,
 			    PictureMatchFormat(screen, 32, PICT_a8r8g8b8),
 			    0, NULL, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (tmp == NULL)
 		return false;

@@ -1811,7 +1811,7 @@ sna_render_picture_convert(struct sna *sna,
 						       channel->pict_format),
 				    0, NULL, serverClient, &error);
 		if (dst == NULL) {
-			screen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);
 			return 0;
 		}

@@ -1822,7 +1822,7 @@ sna_render_picture_convert(struct sna *sna,
 				    0, NULL, serverClient, &error);
 		if (src == NULL) {
 			FreePicture(dst, 0);
-			screen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);
 			return 0;
 		}

@@ -1839,7 +1839,7 @@ sna_render_picture_convert(struct sna *sna,

 		channel->bo = __sna_pixmap_get_bo(tmp);
 		kgem_bo_reference(channel->bo);
-		screen->DestroyPixmap(tmp);
+		dixDestroyPixmap(tmp, 0);
 	} else {
 		pixman_image_t *src, *dst;
 		void *ptr;
@@ -2173,7 +2173,7 @@ copy_overlap(struct sna *sna, uint8_t alu,
 				      draw, bo, dst_dx, dst_dy,
 				      box, n, 0));

-	screen->DestroyPixmap(tmp);
+	dixDestroyPixmap(tmp, 0);
 	return ret;
 }
 bool
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index 2d012b95..7d9a13e1 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -666,7 +666,7 @@ off:
 			}

 			if (!sna->render.video(sna, video, &frame, &r, scaled)) {
-				screen->DestroyPixmap(scaled);
+				dixDestroyPixmap(scaled, 0);
 				ret = BadAlloc;
 				goto err;
 			}
@@ -685,7 +685,7 @@ off:
 			frame.height = frame.image.y2;
 			frame.pitch[0] = frame.bo->pitch;

-			screen->DestroyPixmap(scaled);
+			dixDestroyPixmap(scaled, 0);
 			cache_bo = false;
 		}

diff --git a/src/uxa/i915_video.c b/src/uxa/i915_video.c
index a2fb50cf..6f7ae91e 100644
--- a/src/uxa/i915_video.c
+++ b/src/uxa/i915_video.c
@@ -79,7 +79,7 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn,
 			return;

 		if (intel_uxa_get_pixmap_bo(target) == NULL) {
-			screen->DestroyPixmap(target);
+			dixDestroyPixmap(target, 0);
 			return;
 		}

@@ -485,7 +485,7 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn,
 			FreeScratchGC(gc);
 		}

-		target->drawable.pScreen->DestroyPixmap(target);
+		dixDestroyPixmap(target, 0);
 	}

 	intel_uxa_debug_flush(scrn);
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index 2a544779..17198ffc 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -563,7 +563,7 @@ intel_create_pixmap_header(ScreenPtr pScreen, int width, int height, int depth,
                 {
                         return pixmap;
                 }
-                (*pScreen->DestroyPixmap) (pixmap);
+                dixDestroyPixmap(pixmap, 0);
         }
         return NullPixmap;
 }
@@ -620,7 +620,7 @@ intel_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)

 	if (rotate_pixmap) {
                 intel_set_pixmap_bo(rotate_pixmap, NULL);
-                rotate_pixmap->drawable.pScreen->DestroyPixmap(rotate_pixmap);
+                dixDestroyPixmap(rotate_pixmap, 0);
 	}

 	if (data) {
@@ -2408,7 +2408,7 @@ intel_create_pixmap_for_bo(ScreenPtr pScreen, dri_bo *bo,
 					 width, height,
 					 depth, bpp,
 					 pitch, NULL)) {
-		pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return NullPixmap;
 	}

@@ -2515,9 +2515,9 @@ void intel_copy_fb(ScrnInfoPtr scrn)
 #endif

 cleanup_dst:
-	(*pScreen->DestroyPixmap)(dst);
+	dixDestroyPixmap(dst, 0);
 cleanup_src:
-	(*pScreen->DestroyPixmap)(src);
+	dixDestroyPixmap(src, 0);
 }

 void
diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c
index d91ed295..ddce265c 100644
--- a/src/uxa/intel_dri.c
+++ b/src/uxa/intel_dri.c
@@ -210,7 +210,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
 			    intel_get_pixmap_bo(pixmap) == NULL)
 			{
 				if (pixmap)
-					screen->DestroyPixmap(pixmap);
+					dixDestroyPixmap(pixmap, 0);
 				goto unwind;
 			}
 		}
@@ -228,7 +228,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,

 		if ((buffers[i].name = pixmap_flink(pixmap)) == 0) {
 			/* failed to name buffer */
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			goto unwind;
 		}
 	}
@@ -237,7 +237,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,

 unwind:
 	while (i--)
-		screen->DestroyPixmap(privates[i].pixmap);
+		dixDestroyPixmap(privates[i].pixmap, 0);
 	free(privates);
 	free(buffers);
 	return NULL;
@@ -252,7 +252,7 @@ I830DRI2DestroyBuffers(DrawablePtr drawable, DRI2BufferPtr buffers, int count)

 	for (i = 0; i < count; i++) {
 		private = buffers[i].driverPrivate;
-		screen->DestroyPixmap(private->pixmap);
+		dixDestroyPixmap(private->pixmap, 0);
 	}

 	if (buffers) {
@@ -353,7 +353,7 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 					      hint);
 		if (pixmap == NULL || intel_get_pixmap_bo(pixmap) == NULL) {
 			if (pixmap)
-				screen->DestroyPixmap(pixmap);
+				dixDestroyPixmap(pixmap, 0);
 			free(privates);
 			free(buffer);
 			return NULL;
@@ -371,7 +371,7 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,

 	if ((buffer->name = pixmap_flink(pixmap)) == 0) {
 		/* failed to name buffer */
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		free(privates);
 		free(buffer);
 		return NULL;
@@ -386,7 +386,7 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer)
 		I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
 		if (--private->refcnt == 0) {
 			ScreenPtr screen = private->pixmap->drawable.pScreen;
-			screen->DestroyPixmap(private->pixmap);
+			dixDestroyPixmap(private->pixmap, 0);

 			free(private);
 			free(buffer);
diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c
index ec32a723..3ab70a30 100644
--- a/src/uxa/intel_uxa.c
+++ b/src/uxa/intel_uxa.c
@@ -811,7 +811,7 @@ static Bool intel_uxa_put_image(PixmapPtr pixmap,
 				return FALSE;

 			if (!intel_uxa_pixmap_is_offscreen(scratch)) {
-				screen->DestroyPixmap(scratch);
+				dixDestroyPixmap(scratch, 0);
 				return FALSE;
 			}

@@ -830,7 +830,7 @@ static Bool intel_uxa_put_image(PixmapPtr pixmap,
 					ret = FALSE;
 			}

-			(*screen->DestroyPixmap)(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return ret;
 		}
 	}
@@ -896,13 +896,13 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
 			return FALSE;

 		if (!intel_uxa_pixmap_is_offscreen(scratch)) {
-			screen->DestroyPixmap(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return FALSE;
 		}

 		gc = GetScratchGC(pixmap->drawable.depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return FALSE;
 		}

@@ -923,7 +923,7 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
 	ret = intel_uxa_pixmap_get_image(pixmap, x, y, w, h, dst, dst_pitch);

 	if (scratch)
-		scratch->drawable.pScreen->DestroyPixmap(scratch);
+		dixDestroyPixmap(scratch, 0);

 	return ret;
 }
diff --git a/src/uxa/uxa-glyphs.c b/src/uxa/uxa-glyphs.c
index d24ba518..ac33178d 100644
--- a/src/uxa/uxa-glyphs.c
+++ b/src/uxa/uxa-glyphs.c
@@ -172,7 +172,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
 			goto bail;
 		if (!uxa_pixmap_is_offscreen(pixmap)) {
 			/* Presume shadow is in-effect */
-			pScreen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			uxa_unrealize_glyph_caches(pScreen);
 			return TRUE;
 		}
@@ -182,7 +182,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
 					CPComponentAlpha, &component_alpha,
 					serverClient, &error);

-		pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);

 		if (!picture)
 			goto bail;
@@ -293,7 +293,7 @@ uxa_glyph_cache_upload_glyph(ScreenPtr screen,
 		      x, y);

 	if (scratch != pGlyphPixmap)
-		screen->DestroyPixmap(scratch);
+		dixDestroyPixmap(scratch, 0);

 	FreeScratchGC(gc);
 }
@@ -769,7 +769,7 @@ uxa_glyphs_via_mask(CARD8 op,
 		return 1;

 	if (!uxa_pixmap_is_offscreen(pixmap)) {
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return -1;
 	}

@@ -780,7 +780,7 @@ uxa_glyphs_via_mask(CARD8 op,
 	if (!white_pixmap) {
 		if (white)
 			FreePicture(white, 0);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return -1;
 	}

@@ -790,7 +790,7 @@ uxa_glyphs_via_mask(CARD8 op,
 	mask = CreatePicture(0, &pixmap->drawable,
 			      maskFormat, CPComponentAlpha,
 			      &component_alpha, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);

 	if (!mask) {
 		FreePicture(white, 0);
diff --git a/src/uxa/uxa-render.c b/src/uxa/uxa-render.c
index 0c3e8560..ea3e9d4a 100644
--- a/src/uxa/uxa-render.c
+++ b/src/uxa/uxa-render.c
@@ -479,7 +479,7 @@ uxa_picture_for_pixman_format(ScreenPtr screen,
 		return 0;

 	if (!uxa_pixmap_is_offscreen(pixmap)) {
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return 0;
 	}

@@ -488,7 +488,7 @@ uxa_picture_for_pixman_format(ScreenPtr screen,
 						   PIXMAN_FORMAT_DEPTH(format),
 						   format),
 				0, 0, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (!picture)
 		return 0;

@@ -592,7 +592,7 @@ uxa_create_solid(ScreenPtr screen, uint32_t color)
 		return 0;

 	if (!uxa_prepare_access((DrawablePtr)pixmap, UXA_ACCESS_RW)) {
-		(*screen->DestroyPixmap)(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return 0;
 	}
 	*((uint32_t *)pixmap->devPrivate.ptr) = color;
@@ -601,7 +601,7 @@ uxa_create_solid(ScreenPtr screen, uint32_t color)
 	picture = CreatePicture(0, &pixmap->drawable,
 				PictureMatchFormat(screen, 32, PICT_a8r8g8b8),
 				CPRepeat, &repeat, serverClient, &error);
-	(*screen->DestroyPixmap)(pixmap);
+	dixDestroyPixmap(pixmap, 0);

 	return picture;
 }
@@ -828,13 +828,13 @@ uxa_acquire_drawable(ScreenPtr pScreen,

 	/* Skip the copy if the result remains in memory and not a bo */
 	if (!uxa_pixmap_is_offscreen(pPixmap)) {
-		pScreen->DestroyPixmap(pPixmap);
+		dixDestroyPixmap(pPixmap, 0);
 		return 0;
 	}

 	pGC = GetScratchGC(depth, pScreen);
 	if (!pGC) {
-		pScreen->DestroyPixmap(pPixmap);
+		dixDestroyPixmap(pPixmap, 0);
 		return 0;
 	}

@@ -846,7 +846,7 @@ uxa_acquire_drawable(ScreenPtr pScreen,
 	pDst = CreatePicture(0, &pPixmap->drawable,
 			     PictureMatchFormat(pScreen, depth, pSrc->format),
 			     0, 0, serverClient, &error);
-	pScreen->DestroyPixmap(pPixmap);
+	dixDestroyPixmap(pPixmap, 0);
 	if (!pDst)
 		return 0;

@@ -978,7 +978,7 @@ uxa_try_driver_composite(CARD8 op,

 		gc = GetScratchGC(depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return 0;
 		}

@@ -993,7 +993,7 @@ uxa_try_driver_composite(CARD8 op,
 		localDst = CreatePicture(0, &pixmap->drawable,
 					 PictureMatchFormat(screen, depth, pDst->format),
 					 0, 0, serverClient, &error);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);

 		if (!localDst)
 			return 0;
@@ -1238,7 +1238,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op,

 		gc = GetScratchGC(depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return 0;
 		}

@@ -1253,7 +1253,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op,
 		localDst = CreatePicture(0, &pixmap->drawable,
 					 PictureMatchFormat(screen, depth, pDst->format),
 					 0, 0, serverClient, &error);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);

 		if (!localDst)
 			return 0;
@@ -1574,7 +1574,7 @@ uxa_create_alpha_picture(ScreenPtr pScreen,
 		return 0;
 	pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
 				 0, 0, serverClient, &error);
-	(*pScreen->DestroyPixmap) (pPixmap);
+	dixDestroyPixmap(pPixmap, 0);
 	return pPicture;
 }

diff --git a/src/uxa/uxa.c b/src/uxa/uxa.c
index b682dfd9..125dc0c4 100644
--- a/src/uxa/uxa.c
+++ b/src/uxa/uxa.c
@@ -191,7 +191,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)

 #ifdef FB_24_32BIT
 	if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) {
-		(*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC));
+		dixDestroyPixmap(fbGetRotatedPixmap(pGC), 0);
 		fbGetRotatedPixmap(pGC) = 0;
 	}

@@ -205,8 +205,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 			    pNewTile->drawable.bitsPerPixel !=
 			    pDrawable->bitsPerPixel) {
 				if (pNewTile)
-					(*pGC->pScreen->
-					 DestroyPixmap) (pNewTile);
+					dixDestroyPixmap(pNewTile, 0);
 				/* fb24_32ReformatTile will do direct access
 				 * of a newly-allocated pixmap.  This isn't a
 				 * problem yet, since we don't put pixmaps in
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 16/16] use xf86NameCmp() instead of xf86nameCompare()
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (14 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 15/16] use dixDestroyPixmap() instead of direct driver call Enrico Weigelt, metux IT consult
@ 2025-03-04 15:58 ` Enrico Weigelt, metux IT consult
  2025-03-04 18:35 ` ✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies Patchwork
  16 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-03-04 15:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala

This driver is the only one still using xf86nameCompare() and so
blocking it's removal from Xserver module ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 src/intel_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel_module.c b/src/intel_module.c
index 7ea0f5d3..f90b3cea 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -654,7 +654,7 @@ static XF86ConfDevicePtr
 _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
 {
 	while (p) {
-		if (p->dev_driver && xf86nameCompare(ident, p->dev_driver) == 0)
+		if (p->dev_driver && xf86NameCmp(ident, p->dev_driver) == 0)
 			return p;

 		p = p->list.next;
--
2.39.5


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* ✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies
       [not found] <20250304155809.30399-1-info@metux.net>
                   ` (15 preceding siblings ...)
  2025-03-04 15:58 ` [PATCH 16/16] use xf86NameCmp() instead of xf86nameCompare() Enrico Weigelt, metux IT consult
@ 2025-03-04 18:35 ` Patchwork
  16 siblings, 0 replies; 28+ messages in thread
From: Patchwork @ 2025-03-04 18:35 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/16] meson.build: fix missing Xv dependencies
URL   : https://patchwork.freedesktop.org/series/145783/
State : failure

== Summary ==

Address 'info@metux.net' is not on the allowlist!
Exception occurred during validation, bailing out!



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/16] meson.build: fix missing Xv dependencies
  2025-03-04 15:57 ` [PATCH 01/16] meson.build: fix missing Xv dependencies Enrico Weigelt, metux IT consult
@ 2025-03-21 21:56   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 21:56 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:57:54PM +0100, Enrico Weigelt, metux IT consult wrote:
> libXv needs be be explicitly linked, otherwise getting error:
> 
>   FAILED: xvmc/libIntelXvMC.so.1.0.0
>   cc  -o xvmc/libIntelXvMC.so.1.0.0 xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc_dump.c.o xvmc/libIntelXvMC.so.1.0.0.p/i915_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/i965_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/xvmc_vld.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_batchbuffer.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libIntelXvMC.so.1 -pthread /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXvMC.so /usr/lib/x86_64-linux-gnu/libX11-xcb.so /usr/lib/x86_64-linux-gnu/libxcb.so /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-dri2.so /usr/lib/x86_64-linux-gnu/libdrm_intel.so /usr/lib/x86_64-linux-gnu/libdrm.so -Wl,--end-group
>   /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCCreateSurface':
>   /home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:432: undefined reference to `XvCreateImage'
>   /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCPutSurface':
>   /home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:666: undefined reference to `XvPutImage'
>   collect2: error: ld returned 1 exit status
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

This one was already fixed with
commit e6a4c4740c15 ("meson: Add dependency on xv")

> ---
>  src/legacy/i810/xvmc/meson.build | 1 +
>  xvmc/meson.build                 | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/legacy/i810/xvmc/meson.build b/src/legacy/i810/xvmc/meson.build
> index cd05f3ef..3505f15b 100644
> --- a/src/legacy/i810/xvmc/meson.build
> +++ b/src/legacy/i810/xvmc/meson.build
> @@ -4,6 +4,7 @@ shared_library('I810XvMC',
>  	       sources : 'I810XvMC.c',
>  	       dependencies : [
>  		 dependency('x11', required : true),
> +		 dependency('xv', required : true),
>  		 dependency('xvmc', required : true),
>  		 dependency('xorg-server', required : true),
>  		 dependency('libdrm', required : true),
> diff --git a/xvmc/meson.build b/xvmc/meson.build
> index 0ecc51e5..eeba2b66 100644
> --- a/xvmc/meson.build
> +++ b/xvmc/meson.build
> @@ -14,6 +14,7 @@ shared_library('IntelXvMC',
>  	       dependencies : [
>  		 dependency('threads', required : true),
>  		 dependency('x11', required : true),
> +		 dependency('xv', required : true),
>  		 dependency('xvmc', required : true),
>  		 dependency('xorg-server', required : true),
>  		 dependency('x11-xcb', required : true),
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 02/16] sna: stop using obsolete type aliases
  2025-03-04 15:57 ` [PATCH 02/16] sna: stop using obsolete type aliases Enrico Weigelt, metux IT consult
@ 2025-03-21 21:57   ` Ville Syrjälä
  2025-04-09 14:44     ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 21:57 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:57:55PM +0100, Enrico Weigelt, metux IT consult wrote:
> The Xserver has been moved to using pixman for all matrix operations, back in
> 2008, but left some #define's so drivers still compile. Since 1.5 decades have
> passed now, it's time to fix remaining drivers still using the old name, so
> we can drop these #define's from the Xserver includes.

Can you list the relevant xserver commit(s) here?

> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/sna/sna_display.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
> index d4fa7b0b..d33a88af 100644
> --- a/src/sna/sna_display.c
> +++ b/src/sna/sna_display.c
> @@ -208,7 +208,7 @@ struct sna_crtc {
>  	bool hwcursor;
>  	bool flip_pending;
> 
> -	struct pict_f_transform cursor_to_fb, fb_to_cursor;
> +	struct pixman_f_transform cursor_to_fb, fb_to_cursor;
> 
>  	RegionRec crtc_damage;
>  	uint16_t shadow_bo_width, shadow_bo_height;
> @@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
>  {
>  	RRTransformPtr transform;
>  	PictTransform crtc_to_fb;
> -	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
> +	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
>  	unsigned pitch_limit;
>  	BoxRec b;
> 
> @@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
>  static void sna_crtc_randr(xf86CrtcPtr crtc)
>  {
>  	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
> -	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
> +	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
>  	PictTransform crtc_to_fb;
>  	PictFilterPtr filter;
>  	xFixed *params;
> @@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
>  		if (crtc->transform_in_use) {
>  			int xhot = sna->cursor.ref->bits->xhot;
>  			int yhot = sna->cursor.ref->bits->yhot;
> -			struct pict_f_vector v, hot;
> +			struct pixman_f_vector v, hot;
> 
>  			v.v[0] = x + xhot + .5;
>  			v.v[1] = y + yhot + .5;
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/16] sna: use GCPtr instead of GC *
  2025-03-04 15:57 ` [PATCH 05/16] sna: use GCPtr instead of GC * Enrico Weigelt, metux IT consult
@ 2025-03-21 22:05   ` Ville Syrjälä
  2025-04-09 14:48     ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:05 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:57:58PM +0100, Enrico Weigelt, metux IT consult wrote:
> Xserver includes have explicit pointer types for quite all kind of structs
> (at least those used by drivers), which are used all over the Xserver.
> Thus it's much cleaner to use those everywhere.
> 
> This commit also clears the road to fix a horrible nightmare of hacks just
> needed to circumvent naming clashes between Xserver and Xlib (affecting all
> DDXes that are painting on another Xserver): we can simply rename Xserver's
> own "GC" type to "GCRec" (the usual naming convention here) and so no trouble
> with Xlib's "GC" type anymore. Once this has landed, we're free to do that
> without breaking this driver.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/sna/sna_accel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
> index 89b82afa..90a61ab3 100644
> --- a/src/sna/sna_accel.c
> +++ b/src/sna/sna_accel.c
> @@ -14300,7 +14300,7 @@ static void
>  sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
>  				       struct kgem_bo *bo,
>  				       uint32_t br00, uint32_t br13,
> -				       const GC *gc,
> +				       const GCPtr gc,

These two are not the same. One is a non-const pointer to a
const GC, the other is a const pointer to a non-const GC.

>  				       const BoxRec *box,
>  				       const DDXPointRec *origin)
>  {
> @@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
>  				  struct kgem_bo *bo,
>  				  struct kgem_bo **tile,
>  				  uint32_t br00, uint32_t br13,
> -				  const GC *gc,
> +				  const GCPtr gc,
>  				  const BoxRec *box,
>  				  const DDXPointRec *origin)
>  {
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO()
  2025-03-04 15:58 ` [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO() Enrico Weigelt, metux IT consult
@ 2025-03-21 22:07   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:07 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:58:01PM +0100, Enrico Weigelt, metux IT consult wrote:
> These are just wrappers for calling input_lock()/input_unlock() and marked
> deprecated for quite a while now.

Listing the relevant xserver commit(s) would be nice here too.

> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/sna/sna_display.c  | 5 +++--
>  src/uxa/intel_driver.c | 4 ++--
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
> index d33a88af..d4adf34f 100644
> --- a/src/sna/sna_display.c
> +++ b/src/sna/sna_display.c
> @@ -1161,11 +1161,12 @@ static inline void sigio_unblock(int was_blocked)
>  #include <xf86_OSproc.h>
>  static inline int sigio_block(void)
>  {
> -	return xf86BlockSIGIO();
> +	input_lock();
> +	return 0;
>  }
>  static inline void sigio_unblock(int was_blocked)
>  {
> -	xf86UnblockSIGIO(was_blocked);
> +	input_unlock();
>  }
>  #endif
> 
> diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
> index 9c3fe85f..79105b89 100644
> --- a/src/uxa/intel_driver.c
> +++ b/src/uxa/intel_driver.c
> @@ -641,10 +641,10 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
>          intel_flush(intel);
>  	if (!intel->has_prime_vmap_flush) {
>  		drm_intel_bo *bo = intel_uxa_get_pixmap_bo(PixmapDirtyPrimary(dirty));
> -		was_blocked = xf86BlockSIGIO();
> +		input_lock();
>  		drm_intel_bo_map(bo, FALSE);
>  		drm_intel_bo_unmap(bo);
> -		xf86UnblockSIGIO(was_blocked);
> +		input_unlock();
>  	}
> 
>  	DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro
  2025-03-04 15:58 ` [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro Enrico Weigelt, metux IT consult
@ 2025-03-21 22:08   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:08 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:58:04PM +0100, Enrico Weigelt, metux IT consult wrote:
> xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
> any practical purpose, so it can go away once all drivers stopped using it.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/legacy/i810/i810_driver.c | 4 ++--
>  src/legacy/i810/i810_xaa.c    | 4 ++--
>  src/uxa/intel_driver.c        | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/legacy/i810/i810_driver.c b/src/legacy/i810/i810_driver.c
> index 778b1a41..e24d3f8b 100644
> --- a/src/legacy/i810/i810_driver.c
> +++ b/src/legacy/i810/i810_driver.c
> @@ -155,7 +155,7 @@ I810GetRec(ScrnInfoPtr scrn)
>     if (((uintptr_t)scrn->driverPrivate & 3) == 0)
>        return TRUE;
> 
> -   scrn->driverPrivate = xnfcalloc(sizeof(I810Rec), 1);
> +   scrn->driverPrivate = XNFcallocarray(sizeof(I810Rec), 1);

Hmm. These have transposed arguments as well. I just fixed the 
normal calloc()s because the compiler was unhappy:

commit fc07603ee033 ("Fix transposed calloc() arguments")

>     return TRUE;
>  }
> 
> @@ -503,7 +503,7 @@ I810PreInit(ScrnInfoPtr scrn, int flags)
>  	 pI810->MaxClock = 86000;
>        }
>     }
> -   clockRanges = xnfcalloc(sizeof(ClockRange), 1);
> +   clockRanges = XNFcallocarray(sizeof(ClockRange), 1);
>     clockRanges->next = NULL;
>     /* 9.4MHz appears to be the smallest that works. */
>     clockRanges->minClock = 9500;
> diff --git a/src/legacy/i810/i810_xaa.c b/src/legacy/i810/i810_xaa.c
> index ea03441b..1e0a8527 100644
> --- a/src/legacy/i810/i810_xaa.c
> +++ b/src/legacy/i810/i810_xaa.c
> @@ -284,7 +284,7 @@ I810AccelInit(ScreenPtr pScreen)
> 
>        pI810->NumScanlineColorExpandBuffers = nr_buffers;
>        pI810->ScanlineColorExpandBuffers = (unsigned char **)
> -	    xnfcalloc(nr_buffers, sizeof(unsigned char *));
> +	    XNFcallocarray(nr_buffers, sizeof(unsigned char *));
> 
>        for (i = 0; i < nr_buffers; i++, ptr += width)
>  	 pI810->ScanlineColorExpandBuffers[i] = ptr;
> @@ -295,7 +295,7 @@ I810AccelInit(ScreenPtr pScreen)
>  							  | 0);
> 
>        infoPtr->ScanlineColorExpandBuffers = (unsigned char **)
> -	    xnfcalloc(1, sizeof(unsigned char *));
> +	    XNFcallocarray(1, sizeof(unsigned char *));
>        infoPtr->NumScanlineColorExpandBuffers = 1;
> 
>        infoPtr->ScanlineColorExpandBuffers[0] =
> diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
> index 79105b89..24783492 100644
> --- a/src/uxa/intel_driver.c
> +++ b/src/uxa/intel_driver.c
> @@ -460,7 +460,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
>  		return TRUE;
> 
>  	if (((uintptr_t)scrn->driverPrivate) & 3) {
> -		intel = xnfcalloc(sizeof(*intel), 1);
> +		intel = XNFcallocarray(sizeof(*intel), 1);
>  		if (intel == NULL)
>  			return FALSE;
> 
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 13/16] meson.build: increase required version
  2025-03-04 15:58 ` [PATCH 13/16] meson.build: increase required version Enrico Weigelt, metux IT consult
@ 2025-03-21 22:13   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:13 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:58:06PM +0100, Enrico Weigelt, metux IT consult wrote:
> tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.41.0': capture arg in configure_file.
> 377tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.50.0': install arg in configure_file.

I have a feeling meson itself might be confused as to when things
got added. I'm pretty sure I just used whatever meson version
I had at the time and it hasn't been touched since.

But whatever, >=0.50 seems reasonable enough.

> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 227ca2eb..fa861401 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -5,7 +5,7 @@ project('xf86-video-intel', 'c',
>  	  'c_std=gnu99',
>  	],
>  	license : 'MIT',
> -	meson_version : '>0.40.0')
> +	meson_version : '>=0.50.0')
> 
>  config = configuration_data()
> 
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 14/16] Define __container_of only if not defined yet.
  2025-03-04 15:58 ` [PATCH 14/16] Define __container_of only if not defined yet Enrico Weigelt, metux IT consult
@ 2025-03-21 22:19   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:19 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:58:07PM +0100, Enrico Weigelt, metux IT consult wrote:
> Silence warnings.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  benchmarks/dri3-swap.c | 2 ++
>  src/intel_list.h       | 3 +++
>  test/present-speed.c   | 2 ++

Looks like I never added the benchmarks and tests to the meson
build. So that could partially explain why I'm not seeing this.
But intel_list.h is used for real so I'm confused as to why
you are seeing some issues that I can't see.

Who is defining this in your case?

>  3 files changed, 7 insertions(+)
> 
> diff --git a/benchmarks/dri3-swap.c b/benchmarks/dri3-swap.c
> index 4dd423b3..fa8ec34e 100644
> --- a/benchmarks/dri3-swap.c
> +++ b/benchmarks/dri3-swap.c
> @@ -110,8 +110,10 @@ list_move(struct list *list, struct list *head)
>  	}
>  }
> 
> +#ifndef __container_of
>  #define __container_of(ptr, sample, member)				\
>      (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
> 
>  #define list_for_each_entry(pos, head, member)				\
>      for (pos = __container_of((head)->next, pos, member);		\
> diff --git a/src/intel_list.h b/src/intel_list.h
> index c8a3187a..f0fe7af9 100644
> --- a/src/intel_list.h
> +++ b/src/intel_list.h
> @@ -305,8 +305,11 @@ list_is_empty(const struct list *head)
>  #define list_last_entry(ptr, type, member) \
>      list_entry((ptr)->prev, type, member)
> 
> +#ifndef __container_of
>  #define __container_of(ptr, sample, member)				\
>      (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
> +
>  /**
>   * Loop through the list given by head and set pos to struct in the list.
>   *
> diff --git a/test/present-speed.c b/test/present-speed.c
> index eccde931..7765aa94 100644
> --- a/test/present-speed.c
> +++ b/test/present-speed.c
> @@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
>  	}
>  }
> 
> +#ifndef __container_of
>  #define __container_of(ptr, sample, member)				\
>      (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
> +#endif
> 
>  #define list_for_each_entry(pos, head, member)				\
>      for (pos = __container_of((head)->next, pos, member);		\
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 04/16] backlight: use system() instead of System()
  2025-03-04 15:57 ` [PATCH 04/16] backlight: use system() instead of System() Enrico Weigelt, metux IT consult
@ 2025-03-21 22:49   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:49 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx, Hans de Goede

On Tue, Mar 04, 2025 at 04:57:57PM +0100, Enrico Weigelt, metux IT consult wrote:
> The Xserver's System() function is a special wrapper for calling a program
> (xkbcomp) as an unprivileged user, when the Xserver is running as suid-root.
> (which today only needed on a few platforms, eg. Solaris). Therefore it's
> not suited for being called by arbitrary drivers.
> 
> In this specific context it doesn't even much sense, since it's just used
> for checking whether pkexec command is present at all (and just should be
> used), while the actual exec'ing of the helper is done directly by fork()
> and exec() syscalls.
> 
> Thus we can safely use standard system() call instead - clearing the road
> for dropping System() from Xserver's public/driver API.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/backlight.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/backlight.c b/src/backlight.c
> index fcbb279f..f416f2a4 100644
> --- a/src/backlight.c
> +++ b/src/backlight.c
> @@ -366,7 +366,7 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
>  		return 0;
> 
>  	if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
> -		if (System("pkexec --version"))
> +		if (system("pkexec --version"))

The exact opposite was done by Hans in commit 27a9dc4ce8fa ("backlight:
Use System instead of system when checking for pkexec"). The commit
msg isn't super helpful but I assume it was just to avoid running
random stuff as root.

I guess one option would be to hand roll the whole
fork()+drop_privs+exec() for this early pkexec check as well.

>  			return 0;
> 
>  		use_pkexec = 1;
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors()
  2025-03-04 15:58 ` [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors() Enrico Weigelt, metux IT consult
@ 2025-03-21 22:49   ` Ville Syrjälä
  0 siblings, 0 replies; 28+ messages in thread
From: Ville Syrjälä @ 2025-03-21 22:49 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On Tue, Mar 04, 2025 at 04:58:02PM +0100, Enrico Weigelt, metux IT consult wrote:
> the function has become a no-op, it's former duties are done automatically.

s/the function/xf86_reload_cursors()/

Could use xserver commit references as well.

> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  src/uxa/intel_display.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
> index 409cbbcf..2a544779 100644
> --- a/src/uxa/intel_display.c
> +++ b/src/uxa/intel_display.c
> @@ -394,9 +394,6 @@ intel_crtc_apply(xf86CrtcPtr crtc)
>  		}
>  	}
> 
> -	if (scrn->pScreen)
> -		xf86_reload_cursors(scrn->pScreen);
> -
>  done:
>  	free(output_ids);
>  	return ret;
> --
> 2.39.5

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 02/16] sna: stop using obsolete type aliases
  2025-03-21 21:57   ` Ville Syrjälä
@ 2025-04-09 14:44     ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-04-09 14:44 UTC (permalink / raw)
  To: Ville Syrjälä, Enrico Weigelt, metux IT consult; +Cc: intel-gfx



On 21.03.25 22:57, Ville Syrjälä wrote:
> On Tue, Mar 04, 2025 at 04:57:55PM +0100, Enrico Weigelt, metux IT consult wrote:
>> The Xserver has been moved to using pixman for all matrix operations, back in
>> 2008, but left some #define's so drivers still compile. Since 1.5 decades have
>> passed now, it's time to fix remaining drivers still using the old name, so
>> we can drop these #define's from the Xserver includes.
>
> Can you list the relevant xserver commit(s) here?

10a803186567308ceaed5760d092edd508bb157c



>
>>
>> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
>> ---
>>   src/sna/sna_display.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
>> index d4fa7b0b..d33a88af 100644
>> --- a/src/sna/sna_display.c
>> +++ b/src/sna/sna_display.c
>> @@ -208,7 +208,7 @@ struct sna_crtc {
>>   	bool hwcursor;
>>   	bool flip_pending;
>>
>> -	struct pict_f_transform cursor_to_fb, fb_to_cursor;
>> +	struct pixman_f_transform cursor_to_fb, fb_to_cursor;
>>
>>   	RegionRec crtc_damage;
>>   	uint16_t shadow_bo_width, shadow_bo_height;
>> @@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
>>   {
>>   	RRTransformPtr transform;
>>   	PictTransform crtc_to_fb;
>> -	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
>> +	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
>>   	unsigned pitch_limit;
>>   	BoxRec b;
>>
>> @@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
>>   static void sna_crtc_randr(xf86CrtcPtr crtc)
>>   {
>>   	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
>> -	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
>> +	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
>>   	PictTransform crtc_to_fb;
>>   	PictFilterPtr filter;
>>   	xFixed *params;
>> @@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
>>   		if (crtc->transform_in_use) {
>>   			int xhot = sna->cursor.ref->bits->xhot;
>>   			int yhot = sna->cursor.ref->bits->yhot;
>> -			struct pict_f_vector v, hot;
>> +			struct pixman_f_vector v, hot;
>>
>>   			v.v[0] = x + xhot + .5;
>>   			v.v[1] = y + yhot + .5;
>> --
>> 2.39.5
>

--
---
All racism is bad. All lives matter.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 05/16] sna: use GCPtr instead of GC *
  2025-03-21 22:05   ` Ville Syrjälä
@ 2025-04-09 14:48     ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 28+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2025-04-09 14:48 UTC (permalink / raw)
  To: Ville Syrjälä, Enrico Weigelt, metux IT consult; +Cc: intel-gfx

On 21.03.25 23:05, Ville Syrjälä wrote:

>>   				       struct kgem_bo *bo,
>>   				       uint32_t br00, uint32_t br13,
>> -				       const GC *gc,
>> +				       const GCPtr gc,
>
> These two are not the same. One is a non-const pointer to a
> const GC, the other is a const pointer to a non-const GC.

Feel free to change it as you wish - we just need to change to GCPtr in
order to rename GC to GCRec, in order to get rid of some really ugly
hacks in Xnest (because Xlib also an entirely different type named "GC")

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1393




>
>>   				       const BoxRec *box,
>>   				       const DDXPointRec *origin)
>>   {
>> @@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
>>   				  struct kgem_bo *bo,
>>   				  struct kgem_bo **tile,
>>   				  uint32_t br00, uint32_t br13,
>> -				  const GC *gc,
>> +				  const GCPtr gc,
>>   				  const BoxRec *box,
>>   				  const DDXPointRec *origin)
>>   {
>> --
>> 2.39.5
>

--
---
All racism is bad. All lives matter.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-04-09 14:51 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250304155809.30399-1-info@metux.net>
2025-03-04 15:57 ` [PATCH 01/16] meson.build: fix missing Xv dependencies Enrico Weigelt, metux IT consult
2025-03-21 21:56   ` Ville Syrjälä
2025-03-04 15:57 ` [PATCH 02/16] sna: stop using obsolete type aliases Enrico Weigelt, metux IT consult
2025-03-21 21:57   ` Ville Syrjälä
2025-04-09 14:44     ` Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 03/16] tools: fix FTBS on FreeBSD Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 04/16] backlight: use system() instead of System() Enrico Weigelt, metux IT consult
2025-03-21 22:49   ` Ville Syrjälä
2025-03-04 15:57 ` [PATCH 05/16] sna: use GCPtr instead of GC * Enrico Weigelt, metux IT consult
2025-03-21 22:05   ` Ville Syrjälä
2025-04-09 14:48     ` Enrico Weigelt, metux IT consult
2025-03-04 15:57 ` [PATCH 06/16] gitlab CI: common scripts for driver builds Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 07/16] gitlab CI: add pipeline for building against various Xserver releases Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO() Enrico Weigelt, metux IT consult
2025-03-21 22:07   ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors() Enrico Weigelt, metux IT consult
2025-03-21 22:49   ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 10/16] use XNFalloc() instead of xnfalloc Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro Enrico Weigelt, metux IT consult
2025-03-21 22:08   ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 12/16] sna: use xserver's bswap_32() Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 13/16] meson.build: increase required version Enrico Weigelt, metux IT consult
2025-03-21 22:13   ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 14/16] Define __container_of only if not defined yet Enrico Weigelt, metux IT consult
2025-03-21 22:19   ` Ville Syrjälä
2025-03-04 15:58 ` [PATCH 15/16] use dixDestroyPixmap() instead of direct driver call Enrico Weigelt, metux IT consult
2025-03-04 15:58 ` [PATCH 16/16] use xf86NameCmp() instead of xf86nameCompare() Enrico Weigelt, metux IT consult
2025-03-04 18:35 ` ✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox