xfree86: drivers: apm: add the driver to the build

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-21 14:49:45 +02:00
parent 0a5c649bbe
commit 1eaa6556ec
11 changed files with 69 additions and 28 deletions

View File

@@ -1,2 +1,8 @@
subdir('input')
subdir('video')
if get_option('xf86-input-inputtest')
subdir('inputtest')
endif
subdir('video')

View File

@@ -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,

View File

@@ -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,
)

View File

@@ -1,4 +1,6 @@
typedef void *pointer;
#include "apm_pcirename.h"
#include <string.h>

View File

@@ -1,7 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dix-config.h>
#include <X11/X.h>
#include <X11/Xproto.h>

View File

@@ -3,10 +3,7 @@
* ported from s3virge, ported from mga
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dix-config.h>
#include "xf86.h"
#include "xf86_OSproc.h"

View File

@@ -1,7 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dix-config.h>
#include "apm.h"
#include "xf86cmap.h"
@@ -10,20 +7,14 @@
#include "vbe.h"
#include "opaque.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#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

View File

@@ -1,7 +1,4 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <dix-config.h>
#include "apm.h"
#include "apm_regs.h"

View File

@@ -1,3 +1,7 @@
if build_modesetting
subdir('modesetting')
endif
if get_option('xf86-video-apm')
subdir('apm')
endif

View File

@@ -14,6 +14,7 @@ xorg_inc = include_directories(
'parser',
'ramdac',
'vgahw',
'shadowfb'
)
xorg_c_args = []

View File

@@ -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')