modesetting: Connect the driver to the build.
v2: Fix libdrm version check, and use XORG_VERSION_* instead of a static 1.0.0 version for the driver module. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
6d6aa8ab6b
commit
2feda3b6b5
10
configure.ac
10
configure.ac
|
@ -863,6 +863,7 @@ fi
|
|||
PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
|
||||
if test "x$CONFIG_UDEV" = xauto; then
|
||||
CONFIG_UDEV="$HAVE_LIBUDEV"
|
||||
AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.])
|
||||
fi
|
||||
AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes])
|
||||
if test "x$CONFIG_UDEV" = xyes; then
|
||||
|
@ -2039,6 +2040,12 @@ if test "x$XORG" = xyes; then
|
|||
XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
if test "x$DRM" = xyes; then
|
||||
dnl 2.4.46 is required for cursor hotspot support.
|
||||
PKG_CHECK_EXISTS(libdrm >= 2.4.46)
|
||||
XORG_DRIVER_MODESETTING=yes
|
||||
fi
|
||||
|
||||
AC_SUBST([XORG_LIBS])
|
||||
AC_SUBST([XORG_SYS_LIBS])
|
||||
AC_SUBST([XORG_INCS])
|
||||
|
@ -2109,6 +2116,7 @@ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
|
|||
AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
|
||||
AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes])
|
||||
AM_CONDITIONAL([XORG_DRIVER_MODESETTING], [test "x$XORG_DRIVER_MODESETTING" = xyes])
|
||||
|
||||
dnl glamor
|
||||
AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes])
|
||||
|
@ -2554,6 +2562,8 @@ hw/xfree86/dixmods/Makefile
|
|||
hw/xfree86/doc/Makefile
|
||||
hw/xfree86/dri/Makefile
|
||||
hw/xfree86/dri2/Makefile
|
||||
hw/xfree86/drivers/Makefile
|
||||
hw/xfree86/drivers/modesetting/Makefile
|
||||
hw/xfree86/exa/Makefile
|
||||
hw/xfree86/exa/man/Makefile
|
||||
hw/xfree86/fbdevhw/Makefile
|
||||
|
|
|
@ -38,7 +38,7 @@ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
|
|||
ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
|
||||
$(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \
|
||||
fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
|
||||
$(GLAMOR_EGL_SUBDIR)
|
||||
$(GLAMOR_EGL_SUBDIR) drivers
|
||||
|
||||
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
|
||||
parser ramdac shadowfb vbe vgahw \
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
SUBDIRS =
|
||||
|
||||
if XORG_DRIVER_MODESETTING
|
||||
SUBDIRS += modesetting
|
||||
endif
|
|
@ -24,11 +24,20 @@
|
|||
# _ladir passes a dummy rpath to libtool so the thing will actually link
|
||||
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
|
||||
|
||||
AM_CFLAGS = $(XORG_CFLAGS) $(DRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS)
|
||||
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(LIBDRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(XORG_INCS) \
|
||||
-I$(srcdir)/../../ddc \
|
||||
-I$(srcdir)/../../i2c \
|
||||
-I$(srcdir)/../../modes \
|
||||
-I$(srcdir)/../../parser \
|
||||
-I$(srcdir)/../../ramdac \
|
||||
$(NULL)
|
||||
|
||||
modesetting_drv_la_LTLIBRARIES = modesetting_drv.la
|
||||
modesetting_drv_la_LDFLAGS = -module -avoid-version
|
||||
modesetting_drv_la_LIBADD = @UDEV_LIBS@ @DRM_LIBS@
|
||||
modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS)
|
||||
modesetting_drv_ladir = @moduledir@/drivers
|
||||
|
||||
modesetting_drv_la_SOURCES = \
|
||||
|
@ -37,3 +46,17 @@ modesetting_drv_la_SOURCES = \
|
|||
driver.h \
|
||||
drmmode_display.c \
|
||||
drmmode_display.h
|
||||
|
||||
drivermandir = $(DRIVER_MAN_DIR)
|
||||
driverman_PRE = modesetting.man
|
||||
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = modesetting.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) < $< > $@
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include "dix-config.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -51,7 +51,7 @@
|
|||
#include "shadow.h"
|
||||
#include "xf86xv.h"
|
||||
#include <X11/extensions/Xv.h>
|
||||
#include <xorg-server.h>
|
||||
#include <xorg-config.h>
|
||||
#ifdef XSERVER_PLATFORM_BUS
|
||||
#include "xf86platformBus.h"
|
||||
#endif
|
||||
|
@ -144,7 +144,9 @@ static XF86ModuleVersionInfo VersRec = {
|
|||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
|
||||
XORG_VERSION_MAJOR,
|
||||
XORG_VERSION_MINOR,
|
||||
XORG_VERSION_PATCH,
|
||||
ABI_CLASS_VIDEODRV,
|
||||
ABI_VIDEODRV_VERSION,
|
||||
MOD_CLASS_VIDEODRV,
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include "dix-config.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
|
Loading…
Reference in New Issue