From 54397ea7d9ad6c58c82f219fde5717dcd2b62eda Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 21 Jul 2025 19:04:05 +0200 Subject: [PATCH] xfree86: drivers: dummy: add the driver to the build Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/drivers/video/dummy/meson.build | 32 +++++++++++++++++++ .../drivers/video/dummy/src/dummy_cursor.c | 4 +-- .../drivers/video/dummy/src/dummy_driver.c | 18 ++++------- hw/xfree86/drivers/video/meson.build | 4 +++ meson_options.txt | 2 ++ 5 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 hw/xfree86/drivers/video/dummy/meson.build diff --git a/hw/xfree86/drivers/video/dummy/meson.build b/hw/xfree86/drivers/video/dummy/meson.build new file mode 100644 index 0000000000..3c4ca0bd95 --- /dev/null +++ b/hw/xfree86/drivers/video/dummy/meson.build @@ -0,0 +1,32 @@ +driver_video_dummy_srcs = [ + 'src/dummy_cursor.c', + 'src/dummy_driver.c', +] + +shared_module( + 'dummy_drv', + driver_video_dummy_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-dummy', 'dummy_drv.so') + +test('video-dummy symbol test', + xorg_symbol_test, + args: symbol_test_args, +) diff --git a/hw/xfree86/drivers/video/dummy/src/dummy_cursor.c b/hw/xfree86/drivers/video/dummy/src/dummy_cursor.c index d7c67c6962..8a25167048 100644 --- a/hw/xfree86/drivers/video/dummy/src/dummy_cursor.c +++ b/hw/xfree86/drivers/video/dummy/src/dummy_cursor.c @@ -1,6 +1,4 @@ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include /* All drivers should typically include these */ #include "xf86.h" diff --git a/hw/xfree86/drivers/video/dummy/src/dummy_driver.c b/hw/xfree86/drivers/video/dummy/src/dummy_driver.c index 0f517a1be3..8ecf5bfded 100644 --- a/hw/xfree86/drivers/video/dummy/src/dummy_driver.c +++ b/hw/xfree86/drivers/video/dummy/src/dummy_driver.c @@ -1,11 +1,7 @@ - /* * Copyright 2002, SuSE Linux AG, Author: Egbert Eich */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include /* All drivers should typically include these */ #include "xf86.h" @@ -42,6 +38,8 @@ #include "scrnintstr.h" #include "servermd.h" +typedef void *pointer; + /* Mandatory functions */ static const OptionInfoRec * DUMMYAvailableOptions(int chipid, int busid); static void DUMMYIdentify(int flags); @@ -69,9 +67,9 @@ static Bool dummyDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, #define DUMMY_NAME "DUMMY" #define DUMMY_DRIVER_NAME "dummy" -#define DUMMY_MAJOR_VERSION PACKAGE_VERSION_MAJOR -#define DUMMY_MINOR_VERSION PACKAGE_VERSION_MINOR -#define DUMMY_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL +#define DUMMY_MAJOR_VERSION 0 +#define DUMMY_MINOR_VERSION 4 +#define DUMMY_PATCHLEVEL 1 #define DUMMY_MAX_WIDTH 32767 #define DUMMY_MAX_HEIGHT 32767 @@ -120,8 +118,6 @@ static const OptionInfoRec DUMMYOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -#ifdef XFree86LOADER - static MODULESETUPPROTO(dummySetup); static XF86ModuleVersionInfo dummyVersRec = @@ -435,8 +431,6 @@ dummySetup(pointer module, pointer opts, int *errmaj, int *errmin) } } -#endif /* XFree86LOADER */ - static Bool DUMMYGetRec(ScrnInfoPtr pScrn) { diff --git a/hw/xfree86/drivers/video/meson.build b/hw/xfree86/drivers/video/meson.build index 79f6bcda99..5551765aff 100644 --- a/hw/xfree86/drivers/video/meson.build +++ b/hw/xfree86/drivers/video/meson.build @@ -21,3 +21,7 @@ endif if get_option('xf86-video-cirrus') subdir('cirrus') endif + +if get_option('xf86-video-dummy') + subdir('dummy') +endif diff --git a/meson_options.txt b/meson_options.txt index d93c918413..49ad38faf2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -133,6 +133,8 @@ option('xf86-video-chips', type: 'boolean', value: true, description: 'xf86 video driver for CHIPS graphics chips') option('xf86-video-cirrus', type: 'boolean', value: true, description: 'xf86 video driver for CIRRUS graphics chips') +option('xf86-video-dummy', type: 'boolean', value: true, + description: 'xf86 video driver DUMMY') option('tests', type: 'boolean', value: true, description: 'Build tests for the X server on platforms that support it')