xf86-video-amdgpu: Branch 'master' - 4 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 15 23:41:54 UTC 2025


 .gitlab-ci.yml               |   10 -
 Makefile.am                  |   34 ----
 autogen.sh                   |   17 --
 conf/Makefile.am             |   24 ---
 conf/meson.build             |    1 
 configure.ac                 |  301 -------------------------------------------
 m4/.gitignore                |    5 
 man/Makefile.am              |   41 -----
 man/amdgpu.man               |    2 
 man/meson.build              |   17 ++
 meson.build                  |   92 +++++++++++++
 meson_options.txt            |    4 
 src/Makefile.am              |   71 ----------
 src/amdgpu_bo_helper.c       |    1 
 src/amdgpu_drv.h             |    1 
 src/amdgpu_glamor.c          |    2 
 src/amdgpu_glamor.h          |    1 
 src/amdgpu_glamor_wrappers.c |    1 
 src/amdgpu_kms.c             |    1 
 src/amdgpu_pixmap.c          |    1 
 src/amdgpu_video.c           |    1 
 src/drmmode_display.c        |    1 
 src/meson.build              |   43 ++++++
 23 files changed, 170 insertions(+), 502 deletions(-)

New commits:
commit b696afac63a62afa43b54cb395f897d4a583fa18
Author: Mario Limonciello <mario.limonciello at amd.com>
Date:   Wed Jun 25 22:41:45 2025 -0500

    Drop support for autotools build system

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index d14ed8f..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-#  Copyright 2005 Adam Jackson.
-#
-#  Permission is hereby granted, free of charge, to any person obtaining a
-#  copy of this software and associated documentation files (the "Software"),
-#  to deal in the Software without restriction, including without limitation
-#  on the rights to use, copy, modify, merge, publish, distribute, sub
-#  license, and/or sell copies of the Software, and to permit persons to whom
-#  the Software is furnished to do so, subject to the following conditions:
-#
-#  The above copyright notice and this permission notice (including the next
-#  paragraph) shall be included in all copies or substantial portions of the
-#  Software.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-SUBDIRS = src man conf
-MAINTAINERCLEANFILES = ChangeLog INSTALL
-
-ACLOCAL_AMFLAGS = -I m4
-
-.PHONY: ChangeLog INSTALL
-
-INSTALL:
-	$(INSTALL_CMD)
-
-ChangeLog:
-	$(CHANGELOG_CMD)
-
-EXTRA_DIST = ChangeLog INSTALL README.md
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 683b323..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname "$0"`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd "$srcdir"
-
-autoreconf -f -v --install || exit 1
-cd "$ORIGDIR" || exit $?
-
-git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
-    git config --local format.subjectPrefix "PATCH xf86-video-amdgpu"
-
-if test -z "$NOCONFIGURE"; then
-    exec "$srcdir"/configure "$@"
-fi
diff --git a/conf/Makefile.am b/conf/Makefile.am
deleted file mode 100644
index 7ab1586..0000000
--- a/conf/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-#  Copyright 2015 Advanced Micro Devices, Inc.
-#
-#  Permission is hereby granted, free of charge, to any person obtaining a
-#  copy of this software and associated documentation files (the "Software"),
-#  to deal in the Software without restriction, including without limitation
-#  on the rights to use, copy, modify, merge, publish, distribute, sub
-#  license, and/or sell copies of the Software, and to permit persons to whom
-#  the Software is furnished to do so, subject to the following conditions:
-#
-#  The above copyright notice and this permission notice (including the next
-#  paragraph) shall be included in all copies or substantial portions of the
-#  Software.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-if HAS_XORG_CONF_DIR
-dist_config_DATA = 10-amdgpu.conf
-endif
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index b449b19..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,301 +0,0 @@
-#  Copyright 2005 Adam Jackson.
-#
-#  Permission is hereby granted, free of charge, to any person obtaining a
-#  copy of this software and associated documentation files (the "Software"),
-#  to deal in the Software without restriction, including without limitation
-#  on the rights to use, copy, modify, merge, publish, distribute, sub
-#  license, and/or sell copies of the Software, and to permit persons to whom
-#  the Software is furnished to do so, subject to the following conditions:
-#
-#  The above copyright notice and this permission notice (including the next
-#  paragraph) shall be included in all copies or substantial portions of the
-#  Software.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Process this file with autoconf to produce a configure script
-
-# Initialize Autoconf
-AC_PREREQ([2.60])
-AC_INIT([xf86-video-amdgpu],
-        [23.0.0],
-        [https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues],
-        [xf86-video-amdgpu])
-
-AC_CONFIG_SRCDIR([Makefile.am])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_CONFIG_AUX_DIR(.)
-
-# Initialize Automake
-AM_INIT_AUTOMAKE([foreign dist-xz])
-AC_SYS_LARGEFILE
-
-# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
-m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.8)
-XORG_DEFAULT_OPTIONS
-
-# Initialize libtool
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
-
-# Checks for programs.
-AM_PROG_CC_C_O
-
-if test "x$GCC" = "xyes"; then
-	CPPFLAGS="$CPPFLAGS -Wall"
-fi
-
-AH_TOP([#include "xorg-server.h"])
-
-# Define a configure option for an alternate module directory
-AC_ARG_WITH(xorg-module-dir,
-            AS_HELP_STRING([--with-xorg-module-dir=DIR],
-                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
-            [moduledir="$withval"],
-            [moduledir="$libdir/xorg/modules"])
-
-# Store the list of server defined optional extensions in REQUIRED_MODULES
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
-XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
-XORG_DRIVER_CHECK_EXT(XV, videoproto)
-XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
-
-# Checks for libraries.
-PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.121])
-PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu >= 2.4.121])
-PKG_CHECK_MODULES(GBM, [gbm])
-
-# Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto xf86driproto $REQUIRED_MODULES])
-PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
-                  HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
-                  HAVE_XEXTPROTO_71="no")
-AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
-
-# Section "OutputClass" is only supported as of xserver 1.16
-PKG_CHECK_EXISTS([xorg-server >= 1.16],
-		 [sysconfigdir=`$PKG_CONFIG --variable=sysconfigdir xorg-server`],
-		 [sysconfigdir=""])
-AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$sysconfigdir" != "x"])
-
-# Define a configure option for an alternate X Server configuration directory
-AC_ARG_WITH(xorg-conf-dir,
-            AS_HELP_STRING([--with-xorg-conf-dir=DIR],
-                           [Default xorg.conf.d directory [[default=${prefix}/share/X11/xorg.conf.d]]]),
-            [configdir="$withval"],
-            [configdir='${prefix}/share/X11/xorg.conf.d'])
-AC_SUBST(configdir)
-
-AC_ARG_ENABLE([udev],
-		AS_HELP_STRING([--disable-udev], [Disable libudev support [default=auto]]),
-		[enable_udev="$enableval"],
-		[enable_udev=auto])
-if test "x$enable_udev" != "xno"; then
-	PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no])
-	if test "x$LIBUDEV" = xyes; then
-		AC_DEFINE(HAVE_LIBUDEV, 1,[libudev support])
-	elif test "x$enable_udev" != "xauto"; then
-		AC_MSG_ERROR([Building with udev requested but libudev not found])
-	fi
-fi
-AM_CONDITIONAL(LIBUDEV, test x$LIBUDEV = xyes)
-
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $XORG_CFLAGS $GBM_CFLAGS"
-
-AC_MSG_CHECKING([whether to include GLAMOR support])
-AC_ARG_ENABLE(glamor,
-	      AS_HELP_STRING([--disable-glamor],
-			     [Disable glamor, a new GL-based acceleration [default=enabled]]),
-	      [GLAMOR="$enableval"],
-	      [GLAMOR=yes])
-
-if test "x$GLAMOR" != "xno"; then
-	AC_CHECK_HEADERS([glamor.h], [GLAMOR_H="yes"], [GLAMOR_H="no"], [#include "xorg-server.h"])
-
-	if test "x$GLAMOR_H" = xyes; then
-		AC_CHECK_DECL(GLAMOR_NO_DRI3,
-			      [GLAMOR_XSERVER="yes"], [GLAMOR_XSERVER="no"],
-			      [#include "xorg-server.h"
-			       #include "glamor.h"])
-
-		AC_CHECK_DECL(glamor_glyphs_init,
-			      [AC_DEFINE(HAVE_GLAMOR_GLYPHS_INIT, 1,
-					 [Have glamor_glyphs_init API])], [],
-			      [#include "xorg-server.h"
-			       #include "glamor.h"])
-
-		AC_CHECK_DECL(glamor_egl_destroy_textured_pixmap,
-			      [AC_DEFINE(HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP, 1,
-					 [Have glamor_egl_destroy_textured_pixmap API])], [],
-			      [#include "xorg-server.h"
-			       #include "glamor.h"])
-
-		AC_CHECK_DECL(glamor_finish,
-			      [AC_DEFINE(HAVE_GLAMOR_FINISH, 1,
-					 [Have glamor_finish API])],
-					 [PKG_CHECK_MODULES(LIBGL, [gl])],
-			      [#include "xorg-server.h"
-			       #include "glamor.h"])
-	fi
-
-	if test "x$GLAMOR_XSERVER" != xyes; then
-		PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0])
-		PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
-	fi
-	AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
-else
-	AC_MSG_RESULT([$GLAMOR])
-fi
-AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
-
-AC_CHECK_DECL(RegionDuplicate,
-	      [AC_DEFINE(HAVE_REGIONDUPLICATE, 1,
-	      [Have RegionDuplicate API])], [],
-	      [#include <xorg-server.h>
-	       #include <regionstr.h>])
-
-AC_CHECK_DECL(fbGlyphs,
-	      [AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [],
-	      [#include <X11/Xmd.h>
-	       #include <X11/Xfuncproto.h>
-	       #include <X11/extensions/renderproto.h>
-	       #include <xorg-server.h>
-	       #include <picture.h>
-	       #include <glyphstr.h>
-	       #include <fbpict.h>])
-
-AC_CHECK_DECL(xf86CursorResetCursor,
-	      [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1,
-	      [Have xf86CursorResetCursor API])], [],
-	      [#include <xorg-server.h>
-	       #include <xf86Cursor.h>])
-
-AC_CHECK_DECL(GBM_BO_USE_LINEAR,
-	      [AC_DEFINE(HAVE_GBM_BO_USE_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], [],
-	      [#include <stdlib.h>
-	       #include <gbm.h>])
-
-AC_CHECK_DECL(GBM_BO_USE_FRONT_RENDERING,
-	      [AC_DEFINE(HAVE_GBM_BO_USE_FRONT_RENDERING, 1, [Have GBM_BO_USE_FRONT_RENDERING])], [],
-	      [#include <stdlib.h>
-	       #include <gbm.h>])
-
-AC_CHECK_HEADERS([misyncshm.h], [], [],
-                 [#include <X11/Xdefs.h>
-	          #include <X11/Xfuncproto.h>
-	          #include <xorg-server.h>
-		  #include <screenint.h>])
-
-AC_CHECK_HEADERS([present.h], [], [],
-		 [#include <X11/Xmd.h>
-		 #include <X11/Xproto.h>
-		 #include "xorg-server.h"
-		 #include <X11/X.h>])
-
-AC_CHECK_HEADERS([dri3.h], [], [],
-		 [#include <X11/Xmd.h>
-		 #include <xorg-server.h>])
-
-CPPFLAGS="$SAVE_CPPFLAGS"
-
-# Checks for headers/macros for byte swapping
-# Known variants:
-#	<byteswap.h> bswap_16, bswap_32, bswap_64  (glibc)
-#	<sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
-#	<sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
-#	and a fallback to local macros if none of the above are found
-
-# if <byteswap.h> is found, assume it's the correct version
-AC_CHECK_HEADERS([byteswap.h])
-
-# if <sys/endian.h> is found, have to check which version
-AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"])
-
-if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then
-	AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros])
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([
-#include <sys/types.h>
-#include <sys/endian.h>
- ], [
-int a = 1, b;
-b = __swap16(a);
- ])
-], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
-	AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
-
-	AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
-	AC_LINK_IFELSE([AC_LANG_PROGRAM([
-#include <sys/types.h>
-#include <sys/endian.h>
- ], [
-int a = 1, b;
-b = bswap16(a);
- ])
-], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
-	AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
-
-    	if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
-		USE_SYS_ENDIAN_H=yes
-		BSWAP=bswap
-	else	
-	    	if test "$SYS_ENDIAN__SWAP" = "yes" ; then
-			USE_SYS_ENDIAN_H=yes
-			BSWAP=__swap
-		else
-			USE_SYS_ENDIAN_H=no
-		fi
-	fi
-
-	if test "$USE_SYS_ENDIAN_H" = "yes" ; then
-	    AC_DEFINE([USE_SYS_ENDIAN_H], 1, 
-		[Define to use byteswap macros from <sys/endian.h>])
-	    AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, 
-			[Define to 16-bit byteswap macro])
-	    AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, 
-			[Define to 32-bit byteswap macro])
-	    AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, 
-			[Define to 64-bit byteswap macro])
-	fi
-fi
-
-AC_SUBST([moduledir])
-
-DRIVER_NAME=amdgpu
-AC_SUBST([DRIVER_NAME])
-
-AC_CONFIG_FILES([
-                Makefile
-                src/Makefile
-                man/Makefile
-                conf/Makefile
-])
-AC_OUTPUT
-
-dnl
-dnl Output some configuration info for the user
-dnl
-echo ""
-echo "        prefix:              $prefix"
-echo "        exec_prefix:         $exec_prefix"
-echo "        libdir:              $libdir"
-echo "        includedir:          $includedir"
-echo "        configdir:           $configdir"
-
-echo ""
-echo "        CFLAGS:              $CFLAGS"
-echo "        CXXFLAGS:            $CXXFLAGS"
-echo "        Macros:              $DEFINES"
-
-echo ""
-echo "        Run '${MAKE-make}' to build xf86-video-amdgpu"
-echo ""
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 464ba5c..0000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-libtool.m4
-lt~obsolete.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index b3688ce..0000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-# 
-
-drivermandir = $(DRIVER_MAN_DIR)
-
-driverman_PRE = @DRIVER_NAME at .man
-
-driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
-
-EXTRA_DIST = @DRIVER_NAME at .man
-
-CLEANFILES = $(driverman_DATA)
-
-
-# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
-
-
-SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
-
-.man.$(DRIVER_MAN_SUFFIX):
-	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index c23c87d..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
-#  Copyright 2005 Adam Jackson.
-#  Copyright 2005 Red Hat, Inc.
-#
-#  Permission is hereby granted, free of charge, to any person obtaining a
-#  copy of this software and associated documentation files (the "Software"),
-#  to deal in the Software without restriction, including without limitation
-#  on the rights to use, copy, modify, merge, publish, distribute, sub
-#  license, and/or sell copies of the Software, and to permit persons to whom
-#  the Software is furnished to do so, subject to the following conditions:
-#
-#  The above copyright notice and this permission notice (including the next
-#  paragraph) shall be included in all copies or substantial portions of the
-#  Software.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
-#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-# this is obnoxious:
-# -module lets us name the module exactly how we want
-# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
-# _ladir passes a dummy rpath to libtool so the thing will actually link
-# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-
-amdgpu_drv_la_LIBADD = $(LIBDRM_AMDGPU_LIBS) $(GBM_LIBS)
-
-AMDGPU_KMS_SRCS=amdgpu_bo_helper.c amdgpu_dri2.c amdgpu_dri3.c amdgpu_drm_queue.c \
-	amdgpu_kms.c amdgpu_present.c amdgpu_sync.c drmmode_display.c
-
-AM_CFLAGS = \
-            @GBM_CFLAGS@ \
-            @LIBDRM_AMDGPU_CFLAGS@ \
-            @XORG_CFLAGS@ \
-            @LIBUDEV_CFLAGS@
-
-if LIBUDEV
-amdgpu_drv_la_LIBADD += $(LIBUDEV_LIBS)
-endif
-
-amdgpu_drv_la_LTLIBRARIES = amdgpu_drv.la
-amdgpu_drv_la_LDFLAGS = -module -avoid-version
-amdgpu_drv_ladir = @moduledir@/drivers
-amdgpu_drv_la_SOURCES = \
-	amdgpu_video.c \
-	amdgpu_misc.c amdgpu_probe.c \
-	$(AMDGPU_KMS_SRCS)
-
-AM_CFLAGS += @LIBGLAMOR_CFLAGS@
-amdgpu_drv_la_LIBADD += @LIBGLAMOR_LIBS@
-amdgpu_drv_la_SOURCES += \
-	amdgpu_glamor.c \
-	amdgpu_glamor_wrappers.c \
-	amdgpu_pixmap.c
-
-EXTRA_DIST = \
-	compat-api.h \
-	amdgpu_bo_helper.h \
-	amdgpu_drm_queue.h \
-	amdgpu_glamor.h \
-	amdgpu_drv.h \
-	amdgpu_pixmap.h \
-	amdgpu_probe.h \
-	amdgpu_version.h \
-	amdgpu_video.h \
-	simple_list.h \
-	amdgpu_dri2.h \
-	drmmode_display.h
commit 8d335c1f7cd70ef92bb264889995af7618a728f3
Author: Mario Limonciello <mario.limonciello at amd.com>
Date:   Wed Jun 25 22:39:22 2025 -0500

    Migrate CI over to meson

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3ca4055..f379eff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,8 +27,8 @@ stages:
   variables:
     FDO_DISTRIBUTION_VERSION: bookworm-slim
     FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh'
-    FDO_DISTRIBUTION_PACKAGES: 'ca-certificates'
-    FDO_DISTRIBUTION_TAG: "2024-07-12-ci-deb-repo"
+    FDO_DISTRIBUTION_PACKAGES: 'ca-certificates meson'
+    FDO_DISTRIBUTION_TAG: "2025-06-25"
     PKG_REPO_REV: "bca9635d"
 
 container-build:
@@ -44,10 +44,8 @@ container-build:
     - .fdo.distribution-image at debian
   stage: build
   script:
-  - ./autogen.sh
-  - make -j$(nproc) check V=1
-  - make install V=1
-  - make -j$(nproc) distcheck
+  - meson build
+  - ninja -C build install
   variables:
     CFLAGS: "-pipe -g -O2 -Werror"
     ACLOCAL_PATH: /usr/local/xserver-$XSERVER_VERSION/share/aclocal
commit c98eb1336c34399f271dbeb6e66cedec49193d45
Author: Mario Limonciello <mario.limonciello at amd.com>
Date:   Wed Jun 25 22:32:43 2025 -0500

    Add support for the meson build system

diff --git a/conf/meson.build b/conf/meson.build
new file mode 100644
index 0000000..5379fdd
--- /dev/null
+++ b/conf/meson.build
@@ -0,0 +1 @@
+install_data('10-amdgpu.conf', install_dir: configdir)
\ No newline at end of file
diff --git a/man/amdgpu.man b/man/amdgpu.man
index fc704c8..2cdbb4f 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -1,5 +1,5 @@
 .ds q \N'34'
-.TH AMDGPU 4 2023-09-07 __vendorversion__
+.TH AMDGPU 4 @vendorversion@
 .SH NAME
 amdgpu \- AMD RADEON GPU video driver
 .SH SYNOPSIS
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000..c4a2ecc
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,17 @@
+driver_name = 'amdgpu'
+driver_man_suffix = '4'
+input_name = '@0 at .man'.format(driver_name)
+output_name = '@0 at .@1@'.format(driver_name, driver_man_suffix)
+driverman_pre = '@0 at .man'.format(driver_name)
+
+man_data = configuration_data()
+man_data.set('drivermansuffix', driver_man_suffix)
+man_data.set('vendorversion', '@0@ @1@'.format(meson.project_name(), meson.project_version()))
+
+configure_file(
+  input: input_name,
+  output: output_name,
+  configuration: man_data,
+  install: true,
+  install_dir: join_paths(get_option('mandir'), 'man' + driver_man_suffix),
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..bd0a8d5
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,92 @@
+project(
+  'xf86-video-amdgpu',
+  'c',
+  version: '23.0.0',
+  license: 'MIT',
+  meson_version: '>=0.59.0',
+  default_options: ['warning_level=1']
+)
+
+# Dependencies
+xorg_dep = dependency('xorg-server', version: '>=1.18', required: true)
+xproto_dep = dependency('xproto', required: true)
+fontsproto_dep = dependency('fontsproto', required: true)
+xf86driproto_dep = dependency('xf86driproto', required: true)
+randrproto_dep = dependency('randrproto', required: true)
+renderproto_dep = dependency('renderproto', required: true)
+videoproto_dep = dependency('videoproto', required: true)
+xextproto_dep = dependency('xextproto', version: '>=7.0.99.1', required: true)
+libdrm_dep = dependency('libdrm', version: '>=2.4.121', required: true)
+libdrm_amdgpu_dep = dependency('libdrm_amdgpu', version: '>=2.4.121', required: true)
+gbm_dep = dependency('gbm', required: true)
+
+# Optional dependencies
+libudev_dep = dependency('libudev', required: get_option('udev'))
+libgl_dep = dependency('gl', required: get_option('glamor'))
+
+# Configurable directories
+moduledir = join_paths(get_option('libdir'), get_option('moduledir'))
+configdir = join_paths(get_option('prefix'), get_option('configdir'))
+
+# Preprocessor definitions
+add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
+
+cc = meson.get_compiler('c')
+have_gbm_bo_use_linear = cc.has_header_symbol('gbm.h', 'GBM_BO_USE_LINEAR')
+have_gbm_bo_use_front_rendering = cc.has_header_symbol('gbm.h', 'GBM_BO_USE_FRONT_RENDERING')
+have_byteswap = cc.has_header('byteswap.h')
+xorg_include = xorg_dep.get_variable(pkgconfig: 'sdkdir')
+have_fbGlyphs = cc.has_header('fbpict.h', args: ['-I' + xorg_include])
+have_dri3_h = cc.has_header('dri3.h', args: ['-I' + xorg_include])
+have_present_h = cc.has_header('present.h', args: ['-I' + xorg_include])
+have_regionduplicate = cc.has_header('regionstr.h', args: ['-I' + xorg_include])
+have_xf86CursorResetCursor = cc.has_header('xf86Cursor.h', args: ['-I' + xorg_include])
+have_misyncshm = cc.has_header('misyncshm.h', args: ['-I' + xorg_include])
+have_glamor = cc.has_header('glamor.h', args: ['-I' + xorg_include])
+
+# Config header
+version = meson.project_version()
+varr = version.split('.')
+major_version = varr[0]
+minor_version = varr[1]
+micro_version = varr[2]
+config_h = configuration_data()
+config_h.set('HAVE_DRI3_H', have_dri3_h ? 1 : 0)
+config_h.set('HAVE_PRESENT_H', have_present_h ? 1 : 0)
+config_h.set('HAVE_MISYNCSHM_H', have_misyncshm ? 1 : 0)
+config_h.set('HAVE_FBGLYPHS', have_fbGlyphs ? 1 : 0)
+config_h.set('HAVE_GBM_BO_USE_FRONT_RENDERING', have_gbm_bo_use_front_rendering ? 1 : 0)
+config_h.set('HAVE_GBM_BO_USE_LINEAR', have_gbm_bo_use_linear ? 1 : 0)
+config_h.set('HAVE_BYTESWAP_H', have_byteswap ? 1 : 0)
+config_h.set('HAVE_GLAMOR_H', have_glamor ? 1 : 0)
+config_h.set('HAVE_GLAMOR_FINISH', have_glamor ? 1 : 0)
+config_h.set('USE_GLAMOR', get_option('glamor').allowed() ? 1 : 0)
+config_h.set('HAVE_LIBUDEV', libudev_dep.found() ? 1 : 0)
+config_h.set('HAVE_REGIONDUPLICATE', have_regionduplicate ? 1 : 0)
+config_h.set('HAVE_XF86_CURSOR_RESET_CURSOR', have_xf86CursorResetCursor ? 1 : 0)
+config_h.set('HAVE_XEXTPROTO_71', xextproto_dep.found() ? 1 : 0)
+config_h.set('PACKAGE_NAME', meson.project_name())
+config_h.set('PACKAGE_VERSION', version)
+config_h.set('PACKAGE_VERSION_MAJOR', major_version)
+config_h.set('PACKAGE_VERSION_MINOR', minor_version)
+config_h.set('PACKAGE_VERSION_PATCHLEVEL', micro_version)
+configure_file(
+  output: 'config.h',
+  configuration: config_h
+)
+
+subdir('src')
+subdir('man')
+subdir('conf')
+
+summary({
+  'prefix': get_option('prefix'),
+  'exec_prefix': get_option('prefix'),
+  'libdir': get_option('libdir'),
+  'includedir': get_option('includedir'),
+  'configdir': configdir,
+  'moduledir': moduledir,
+  'CFLAGS': meson.get_compiler('c').get_supported_arguments(['-Wall']),
+  'GLAMOR': get_option('glamor'),
+  'LIBUDEV': libudev_dep,
+}, section: 'Configuration')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..4fa573a
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,4 @@
+option('udev', type: 'feature', description: 'Enable libudev support')
+option('glamor', type: 'feature', description: 'Enable glamor acceleration')
+option('moduledir', type: 'string', value: 'xorg/modules', description: 'Xorg module directory')
+option('configdir', type: 'string', value: 'share/X11/xorg.conf.d', description: 'Xorg.conf.d directory')
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..6270b83
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,43 @@
+srcs = [
+  'amdgpu_bo_helper.c',
+  'amdgpu_dri2.c',
+  'amdgpu_dri3.c',
+  'amdgpu_drm_queue.c',
+  'amdgpu_glamor.c',
+  'amdgpu_glamor_wrappers.c',
+  'amdgpu_kms.c',
+  'amdgpu_misc.c',
+  'amdgpu_pixmap.c',
+  'amdgpu_probe.c',
+  'amdgpu_present.c',
+  'amdgpu_sync.c',
+  'amdgpu_video.c',
+  'drmmode_display.c',
+]
+
+amdgpu_drv_libs = [
+  fontsproto_dep,
+  gbm_dep,
+  libdrm_amdgpu_dep,
+  libdrm_dep,
+  randrproto_dep,
+  renderproto_dep,
+  videoproto_dep,
+  xextproto_dep,
+  xf86driproto_dep,
+  xorg_dep,
+  xproto_dep
+]
+if libudev_dep.found()
+  amdgpu_drv_libs += libudev_dep
+endif
+
+shared_module(
+  'amdgpu_drv',
+  srcs,
+  include_directories: include_directories('..'),
+  dependencies: amdgpu_drv_libs,
+  install: true,
+  install_dir: join_paths(moduledir, 'drivers'),
+  name_prefix: '',
+)
commit e94cadafa575cce3e05ab78fda94a547dd371a29
Author: Mario Limonciello <mario.limonciello at amd.com>
Date:   Wed Jun 25 22:23:39 2025 -0500

    Add missing xorg-server.h header
    
    This should be added by the source file, not the build system.

diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 647a951..23bb60c 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -23,6 +23,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <xorg-server.h>
 #include <sys/mman.h>
 #include <gbm.h>
 #include "amdgpu_drv.h"
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index fbedaaa..4f6d0dd 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -40,6 +40,7 @@
 #include <stdlib.h>		/* For abs() */
 #include <unistd.h>		/* For usleep() */
 #include <sys/time.h>		/* For gettimeofday() */
+#include <xorg-server.h>
 
 #include "config.h"
 
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 4ecc335..e4962dd 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -29,7 +29,7 @@
 #endif
 
 #ifdef USE_GLAMOR
-
+#include <xorg-server.h>
 #include <xf86.h>
 
 #include "amdgpu_bo_helper.h"
diff --git a/src/amdgpu_glamor.h b/src/amdgpu_glamor.h
index b629985..ac60832 100644
--- a/src/amdgpu_glamor.h
+++ b/src/amdgpu_glamor.h
@@ -27,6 +27,7 @@
 #ifndef AMDGPU_GLAMOR_H
 #define AMDGPU_GLAMOR_H
 
+#include <xorg-server.h>
 #include "xf86xv.h"
 
 #ifdef USE_GLAMOR
diff --git a/src/amdgpu_glamor_wrappers.c b/src/amdgpu_glamor_wrappers.c
index d44eec9..cdcd49b 100644
--- a/src/amdgpu_glamor_wrappers.c
+++ b/src/amdgpu_glamor_wrappers.c
@@ -33,7 +33,6 @@
 #endif
 
 #ifdef USE_GLAMOR
-
 #include "amdgpu_drv.h"
 #include "amdgpu_glamor.h"
 #include "amdgpu_pixmap.h"
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 0b898b9..6aecae6 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -30,6 +30,7 @@
 
 #include <errno.h>
 #include <sys/ioctl.h>
+#include <xorg-server.h>
 /* Driver data structures */
 #include "amdgpu_drv.h"
 #include "amdgpu_bo_helper.h"
diff --git a/src/amdgpu_pixmap.c b/src/amdgpu_pixmap.c
index 18bdf4a..28827d4 100644
--- a/src/amdgpu_pixmap.c
+++ b/src/amdgpu_pixmap.c
@@ -26,6 +26,7 @@
 #include "config.h"
 #endif
 
+#include <xorg-server.h>
 #include <xf86.h>
 #include "amdgpu_pixmap.h"
 #include "amdgpu_bo_helper.h"
diff --git a/src/amdgpu_video.c b/src/amdgpu_video.c
index 9ce8267..cf6c261 100644
--- a/src/amdgpu_video.c
+++ b/src/amdgpu_video.c
@@ -7,6 +7,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <math.h>
+#include <xorg-server.h>
 
 #include "amdgpu_drv.h"
 #include "amdgpu_glamor.h"
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 15df881..622bcef 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -32,6 +32,7 @@
 #include <errno.h>
 #include <sys/ioctl.h>
 #include <time.h>
+#include <xorg-server.h>
 #include "cursorstr.h"
 #include "damagestr.h"
 #include "inputstr.h"


More information about the xorg-commit mailing list