diff --git a/hw/xfree86/drivers/video/fbdev/man/fbdev.man b/hw/xfree86/drivers/video/fbdev/man/fbdev.man index ee3f55c37c..e8824f98f1 100644 --- a/hw/xfree86/drivers/video/fbdev/man/fbdev.man +++ b/hw/xfree86/drivers/video/fbdev/man/fbdev.man @@ -1,6 +1,6 @@ .\" shorthand for double quote that works everywhere. .ds q \N'34' -.TH FBDEV __drivermansuffix__ __vendorversion__ +.TH FBDEV @drivermansuffix@ @vendorversion@ .SH NAME fbdev \- video driver for framebuffer device .SH SYNOPSIS @@ -15,7 +15,7 @@ fbdev \- video driver for framebuffer device .SH DESCRIPTION .B fbdev is an -.B __xservername__ +.B @xservername@ driver for framebuffer devices. This is a non-accelerated driver, the following framebuffer depths are supported: 8, 15, 16, 24. @@ -27,12 +27,12 @@ The .B fbdev driver supports all hardware where a framebuffer driver is available. fbdev uses the os-specific submodule -.BR fbdevhw (__drivermansuffix__) +.BR fbdevhw (@drivermansuffix@) to talk to the kernel device driver. Currently a fbdevhw module is available for Linux. .SH CONFIGURATION DETAILS Please refer to -.BR __xconfigfile__ (__filemansuffix__) +.BR @xconfigfile@ (@filemansuffix@) for general configuration details. This section only covers configuration details specific to this driver. .PP @@ -68,10 +68,10 @@ Implies use of the shadow framebuffer layer. Disabled for 24bpp framebuffers. Default: off. .SH "SEE ALSO" -.BR __xservername__ (__appmansuffix__), -.BR __xconfigfile__ (__filemansuffix__), -.BR Xserver (__appmansuffix__), -.BR X (__miscmansuffix__), -.BR fbdevhw (__drivermansuffix__) +.BR @xservername@ (@appmansuffix@), +.BR @xconfigfile@ (@filemansuffix@), +.BR Xserver (@appmansuffix@), +.BR X (@miscmansuffix@), +.BR fbdevhw (@drivermansuffix@) .SH AUTHORS Authors include: Gerd Knorr, Michel D\(:anzer, Geert Uytterhoeven diff --git a/hw/xfree86/drivers/video/fbdev/meson.build b/hw/xfree86/drivers/video/fbdev/meson.build new file mode 100644 index 0000000000..f839731446 --- /dev/null +++ b/hw/xfree86/drivers/video/fbdev/meson.build @@ -0,0 +1,35 @@ +shared_module( + 'fbdev_drv', + [ + 'src/fbdev.c' + ], + 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-fbdev', 'fbdev_drv.so') + +test('video-fbdev symbol test', + xorg_symbol_test, + args: symbol_test_args, +) + +install_man(configure_file( + input: 'man/fbdev.man', + output: 'fbdev.4', + configuration: manpage_config, +)) diff --git a/hw/xfree86/drivers/video/fbdev/src/fbdev.c b/hw/xfree86/drivers/video/fbdev/src/fbdev.c index 939c5b8361..5ec2b3ae5f 100644 --- a/hw/xfree86/drivers/video/fbdev/src/fbdev.c +++ b/hw/xfree86/drivers/video/fbdev/src/fbdev.c @@ -2,10 +2,7 @@ * Authors: Alan Hourihane, * Michel Dänzer, */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include #include @@ -38,6 +35,12 @@ #define HAVE_SHADOW_3224 #endif +#define PACKAGE_VERSION_MAJOR 0 +#define PACKAGE_VERSION_MINOR 5 +#define PACKAGE_VERSION_PATCHLEVEL 1 + +typedef void *pointer; + static Bool debug = 0; #define TRACE_ENTER(str) \ @@ -267,11 +270,10 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num, pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, NULL, NULL, NULL, NULL, NULL); if (pScrn) { - char *device; GDevPtr devSection = xf86GetDevFromEntity(pScrn->entityList[0], pScrn->entityInstanceList[0]); - device = xf86FindOptionValue(devSection->options, "fbdev"); + const char *device = xf86FindOptionValue(devSection->options, "fbdev"); if (fbdevHWProbe(dev, device, NULL)) { pScrn->driverVersion = FBDEV_VERSION; pScrn->driverName = FBDEV_DRIVER_NAME; @@ -311,7 +313,6 @@ FBDevProbe(DriverPtr drv, int flags) #ifndef XSERVER_LIBPCIACCESS int bus,device,func; #endif - char *dev; Bool foundScreen = FALSE; TRACE("probe start"); @@ -329,7 +330,7 @@ FBDevProbe(DriverPtr drv, int flags) for (i = 0; i < numDevSections; i++) { Bool isPci = FALSE; - dev = xf86FindOptionValue(devSections[i]->options,"fbdev"); + const char *dev = xf86FindOptionValue(devSections[i]->options,"fbdev"); if (devSections[i]->busID) { #ifndef XSERVER_LIBPCIACCESS if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device, diff --git a/hw/xfree86/drivers/video/meson.build b/hw/xfree86/drivers/video/meson.build index 65922d213f..7e9b564166 100644 --- a/hw/xfree86/drivers/video/meson.build +++ b/hw/xfree86/drivers/video/meson.build @@ -25,3 +25,7 @@ endif if get_option('xf86-video-dummy') subdir('dummy') endif + +if get_option('xf86-video-fbdev') + subdir('fbdev') +endif diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index 57a575d59a..b41bf1f6f5 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -5,6 +5,7 @@ xorg_inc = include_directories( 'common', 'ddc', 'dri2', + 'fbdevhw', 'i2c', 'int10', 'loader', diff --git a/meson_options.txt b/meson_options.txt index 49ad38faf2..357800ecf0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -135,6 +135,8 @@ 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('xf86-video-fbdev', type: 'boolean', value: true, + description: 'xf86 video driver for /dev/fb*') option('tests', type: 'boolean', value: true, description: 'Build tests for the X server on platforms that support it')