diff --git a/hw/xfree86/drivers/meson.build b/hw/xfree86/drivers/meson.build index 116c82e0d..9d993fbe2 100644 --- a/hw/xfree86/drivers/meson.build +++ b/hw/xfree86/drivers/meson.build @@ -1,2 +1,8 @@ subdir('input') subdir('video') + +if get_option('xf86-input-inputtest') + subdir('inputtest') +endif + +subdir('video') diff --git a/hw/xfree86/drivers/video/apm/man/apm.man b/hw/xfree86/drivers/video/apm/man/apm.man index ad167139f..bed0b1fc6 100644 --- a/hw/xfree86/drivers/video/apm/man/apm.man +++ b/hw/xfree86/drivers/video/apm/man/apm.man @@ -1,8 +1,8 @@ .\" shorthand for double quote that works everywhere. .ds q \N'34' -.TH APM __drivermansuffix__ 2010-06-04 __vendorversion__ +.TH APM @drivermansuffix@ 2010-06-04 @vendorversion@ .SH NAME -apm \- Alliance ProMotion video driver for Xorg +apm \- Alliance ProMotion video driver for Xlibre .SH SYNOPSIS .nf .B "Section \*qDevice\*q" @@ -13,7 +13,7 @@ apm \- Alliance ProMotion video driver for Xorg .fi .SH DESCRIPTION .B apm -is an Xorg driver for Alliance ProMotion video cards. +is an Xlibre driver for Alliance ProMotion video cards. The driver is accelerated for supported hardware/depth combinations. It supports framebuffer depths of 8, 15, 16, 24, and 32 bits. For 6420, 6422, AT24, AT3D, and AT25, diff --git a/hw/xfree86/drivers/video/apm/meson.build b/hw/xfree86/drivers/video/apm/meson.build new file mode 100644 index 000000000..8b3e5010b --- /dev/null +++ b/hw/xfree86/drivers/video/apm/meson.build @@ -0,0 +1,41 @@ +driver_video_apm_srcs = [ + 'src/apm_driver.c', + 'src/apm_cursor.c', + 'src/apm_dga.c', + 'src/apm_driver.c', + 'src/apm_i2c.c', +] + +shared_module( + 'apm_drv', + driver_video_apm_srcs, + name_prefix: '', + + include_directories: [inc, xorg_inc], + c_args: xorg_c_args, + dependencies: [ + common_dep, + ], + + install: true, + install_dir: join_paths(module_abi_dir, 'drivers'), +) + +# Test that we don't have any unresolved symbols from our module to Xorg. +xorg_build_root = join_paths(meson.project_build_root(), 'hw', 'xfree86') +symbol_test_args = [] +symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so') +symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so') +symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libglx.so') +symbol_test_args += join_paths(xorg_build_root, 'drivers', 'video-apm', 'apm_drv.so') + +install_man(configure_file( + input: 'man/apm.man', + output: 'apm.4', + configuration: manpage_config, +)) + +test('video-apm symbol test', + xorg_symbol_test, + args: symbol_test_args, +) diff --git a/hw/xfree86/drivers/video/apm/src/apm.h b/hw/xfree86/drivers/video/apm/src/apm.h index c94d26b44..3d30d9203 100644 --- a/hw/xfree86/drivers/video/apm/src/apm.h +++ b/hw/xfree86/drivers/video/apm/src/apm.h @@ -1,4 +1,6 @@ +typedef void *pointer; + #include "apm_pcirename.h" #include diff --git a/hw/xfree86/drivers/video/apm/src/apm_cursor.c b/hw/xfree86/drivers/video/apm/src/apm_cursor.c index 1b5d895c8..4af9ad454 100644 --- a/hw/xfree86/drivers/video/apm/src/apm_cursor.c +++ b/hw/xfree86/drivers/video/apm/src/apm_cursor.c @@ -1,7 +1,4 @@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include #include #include diff --git a/hw/xfree86/drivers/video/apm/src/apm_dga.c b/hw/xfree86/drivers/video/apm/src/apm_dga.c index 4a4fa961b..dafda2101 100644 --- a/hw/xfree86/drivers/video/apm/src/apm_dga.c +++ b/hw/xfree86/drivers/video/apm/src/apm_dga.c @@ -3,10 +3,7 @@ * ported from s3virge, ported from mga * */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include #include "xf86.h" #include "xf86_OSproc.h" diff --git a/hw/xfree86/drivers/video/apm/src/apm_driver.c b/hw/xfree86/drivers/video/apm/src/apm_driver.c index 1de80fcdc..a005d1865 100644 --- a/hw/xfree86/drivers/video/apm/src/apm_driver.c +++ b/hw/xfree86/drivers/video/apm/src/apm_driver.c @@ -1,7 +1,4 @@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include #include "apm.h" #include "xf86cmap.h" @@ -10,20 +7,14 @@ #include "vbe.h" #include "opaque.h" -#ifdef HAVE_XEXTPROTO_71 #include -#else -#define DPMS_SERVER -#include -#endif - #define APM_VERSION 4000 #define APM_NAME "APM" #define APM_DRIVER_NAME "apm" -#define APM_MAJOR_VERSION PACKAGE_VERSION_MAJOR -#define APM_MINOR_VERSION PACKAGE_VERSION_MINOR -#define APM_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL +#define APM_MAJOR_VERSION 1 +#define APM_MINOR_VERSION 0 +#define APM_PATCHLEVEL 1 #define PCI_VENDOR_ALLIANCE 0x1142 #define PCI_CHIP_AP6422 0x6422 diff --git a/hw/xfree86/drivers/video/apm/src/apm_i2c.c b/hw/xfree86/drivers/video/apm/src/apm_i2c.c index b0691a1eb..d3a20f9f3 100644 --- a/hw/xfree86/drivers/video/apm/src/apm_i2c.c +++ b/hw/xfree86/drivers/video/apm/src/apm_i2c.c @@ -1,7 +1,4 @@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include #include "apm.h" #include "apm_regs.h" diff --git a/hw/xfree86/drivers/video/meson.build b/hw/xfree86/drivers/video/meson.build index 08ce60b6c..25f1a622b 100644 --- a/hw/xfree86/drivers/video/meson.build +++ b/hw/xfree86/drivers/video/meson.build @@ -1,3 +1,7 @@ if build_modesetting subdir('modesetting') endif + +if get_option('xf86-video-apm') + subdir('apm') +endif diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 5b1e51dbd..57a575d59 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -14,6 +14,7 @@ xorg_inc = include_directories( 'parser', 'ramdac', 'vgahw', + 'shadowfb' ) xorg_c_args = [] diff --git a/meson_options.txt b/meson_options.txt index 7b3c42318..40b751ce8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -119,8 +119,13 @@ option('agp', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'AGP support') option('sha1', type: 'combo', choices: ['libc', 'CommonCrypto', 'CryptoAPI', 'libmd', 'libsha1', 'libnettle', 'libgcrypt', 'libcrypto', 'auto'], value: 'auto', description: 'SHA1 implementation') + +# xfree86 DDX drivers option('xf86-input-inputtest', type: 'boolean', value: true, description: 'Test input driver support on Xorg') +option('xf86-video-apm', type: 'boolean', value: true, + description: 'xf86 video driver for APM graphics chips') + option('tests', type: 'boolean', value: true, description: 'Build tests for the X server on platforms that support it')