Commit Graph

88 Commits

Author SHA1 Message Date
Michel Dänzer
add3df2001 Consolidate fourcc.h
Move the copy in hw/xfree86/common to include/, and remove the one in
hw/kdrive/src/.

Fixes DIX glamor code including an xfree86 DDX header.
2020-09-15 11:43:16 +02:00
Jon Turney
b4ed20c4f1 Promote file containing date & time build was configured to top-level
Promote the generated file containing the date & time build was
configured to top-level.

Rename it from xf86Build.h to buildDateTIme.h.

Use it as well in XQuartz, stringize BUILD_DATE when needed.
2019-05-02 15:42:58 +00:00
Karol Kosik
5d3b6cc221 xfree86: Improved autoconfig drivers matching
Implementation of new drivers matching algorithm. New approach
doesn't add duplicate drivers and ease drivers matching phase.

v2: Re-commit the patch reverted in
    2388f5e583, with Aaron Plattner's
    fix squashed in (by anholt).

Signed-off-by: Karol Kosik <kkosik@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com> (v1)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v1)
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Eric Anholt <eric@anholt.net>
2017-05-09 17:36:05 -07:00
Eric Anholt
2388f5e583 Revert "xfree86: Improved autoconfig drivers matching"
This reverts commit 112d0d7d01.

It broke Xorg for Adam, Peter, and myself, by failing hard when a
module load failed.

Signed-off-by: Eric Anholt <eric@anholt.net>
2017-05-09 15:02:30 -07:00
Karol Kosik
112d0d7d01 xfree86: Improved autoconfig drivers matching
Implementation of new drivers matching algorithm. New approach
doesn't add duplicate drivers and ease drivers matching phase.

Signed-off-by: Karol Kosik <kkosik@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-04-27 15:10:56 -04:00
Adam Jackson
744c292ae4 vidmode: Remove stray vidmodeproc.h from EXTRA_DIST
Was removed from the tree in:

    commit f175cf45ae
    Author: Olivier Fourdan <ofourdan@redhat.com>
    Date:   Wed Feb 10 09:34:34 2016 +0100

        vidmode: move to a separate library of its own

but not removed from the Makefile, which broke 'make dist'.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-11 13:50:32 -05:00
Olivier Fourdan
f175cf45ae vidmode: move to a separate library of its own
XVidMode extension might be useful to non hardware servers as well (e.g.
Xwayand) so that applications that rely on it (e.g. lot of older games)
can at least have read access to XVidMode.

But the implementation is very XFree86 centric, so the idea is to add
a bunch of vfunc that other non-XFree86 servers can hook up into to
provide a similar functionality.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2016-02-29 16:29:01 -05:00
Adam Jackson
4da66d9e03 vidmode: Hide implementation details
Also remove vidmodeproc.h from the SDK since no drivers are using it.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:58 -04:00
Peter Hutterer
adee4f239b xfree86: drop double-typedef of DBusConnection
Just include dbus.h, it's been typedef'd there since 2003.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Jon TURNEY
1d9fd7ffb0 Fix compilation of Xorg DDX without XF86VIDMODE
Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting
xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally
taken out of.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2012-10-11 12:54:11 +01:00
Daniel Stone
e191e296e6 Remove XAA
Commit 0c6987df in June 2008 disabled XAA offscreen pixmaps per default,
as they were broken, leaving XAA only able to accelerate operations
directly on the screen pixmap and nowhere else, eliminating acceleration
for basically every modern toolkit, and any composited environment.

So, it hasn't worked for over four years.  No-one's even come close to
fixing it.

RIP.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-07-10 00:41:57 -07:00
Daniel Stone
9a953e0e9d Move DRI2 from external module to built-in
Instead of keeping a tiny amount of code in an external module, just man
up and build it into the core server.

v2: Fix test/Makefile.am to only link libdri2.la if DRI2 is set

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:01 -07:00
Daniel Stone
6e74fdda42 Move XFree86-VidMode from extmod to built-in
As with DGA, move VidMode from being part of extmod to a built-in part
of the server, if compiled as such.  This is initialised from
xf86ExtensionInit rather than miinitext because it's wholly dependent on
the Xorg DDX.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-10 00:00:58 -07:00
Daniel Stone
7a5880bc3b Move DGA from extmod to built-in
Rather than leave DGA languishing in extmod, move it to be a built-in
extension.  As it's quite specific to the Xorg DDX, just move it
sideways to the rest of the DGA code in hw/xfree86/common, and
initialise it from xf86ExtensionInit, rather than miinitext.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Acked-by:  Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:37:09 -07:00
Daniel Stone
d35884da2f Add xf86ExtensionInit for DDX extension configuration
xf86ExtensionInit is called after configuration file parsing, so it can
perform the two parts of extension initialisation currently done by
extmod: enabling and disabling of extensions through an 'omit' option,
and SELinux configuration.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Daniel Stone
a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Dave Airlie
cf66471353 xfree86: use udev to provide device enumeration for kms devices (v10)
On Linux in order for future hotplug work, we are required to interface
to udev to detect device creation/removal. In order to try and get
some earlier testing on this, this patch adds the ability to use
udev for device enumeration on Linux.

At startup the list of drm/kms devices is probed and this info is
used to load drivers.

A new driver probing method is introduced that passes the udev
device info to the driver for probing.

The probing integrates with the pci probing code and will fallback
to the pci probe and old school probe functions in turn.

The flags parameter to the probe function will be used later
to provide hotplug and gpu screen flags for the driver to behave
in a different way.

This patch changes the driver ABI, all drivers should at least
be set with a NULL udev probe function after this commit.

v2: rename to platform bus, now with 100% less udev specific,

this version passes config_odev_attribs around which are an array
of id/string pairs, then the udev code can attach the set of attribs
it understands, the OS specific code can attach its attrib, and then
the core/drivers can lookup the required attribs.

also add MATCH_PCI_DEVICES macro.

This version is mainly to address concerns raised by ajax.

v3: Address comments from Peter.
fix whitespace that snuck in.
rework to use a linked list with some core functions that
xf86 wraps.

v4: add free list, fix struct whitespace.
ajax this address most of your issues?

v5: drop probe ifdef, fix logic issue

v6: some overhaul after more testing.

Implement primaryBus for platform devices.
document hotplug.h dev attribs - drop sysname attrib
fix build with udev kms disabled
make probing work like the PCI probe code,
   match against bus id if one exists, or primary device.

RFC: add new bus id support "PLAT:syspath". we probably
want to match on this a bit different, or use a different
property maybe. I was mainly wanting this for use with
specifying usb devices in xorg.conf directly, but PLAT:path
could also work I suppose.

v6.1: add missing noop platform function

v7: fix two interactions with pci probing and slot claiming, prevents
pci and platform trying to load two drivers for same slot.

v8: test with zaphod mode on -ati driver, fixup resulting issue
clean up common probe code into another function, change busid
matching to allow dropping end of strings.

v9: fix platform probing logic so it actually works.
v9.1: fix pdev init to NULL properly.

v10: address most of Keith's concerns.

v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-06 10:20:19 +01:00
Alan Coopersmith
6450f6ca7e Move DoShowOptions to xf86Configure.c, delete xf86ShowOpts.c
Gets rid of duplicate static copy of optionTypeToString by putting
both callers of that helper function in the same source file.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:06 -08:00
Tiago Vignatti
6817050f31 configure: wrap PCI code with macro and set it at build time
--disable-pciaccess, used together with --disable-module-int10, can be used to
disable all pci code inside the server.

Note that XSERVER_LIBPCIACCESS was previously used only in the driver side and
now it defines also whether the library is used inside the server. Also,
XORG_BUS_PCI automake variable is introduced to track PCI code needs.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-15 21:18:47 -07:00
Peter Hutterer
24823f1ab0 xfree86: switch options from pointer to XF86OptionPtr
In all cases, the pointer was simply type-cast anyway. Let's get some
compile-time type safety going, how about that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>

Squashed in:
xfree86: Move definition of xf86OptionPtr into separate header file

The pile of spaghettis that is the xfree86 include dependencies make it
rather hard to have a single typedef somewhere that's not interfering with
everything else or drags in a whole bunch of other includes.

Move the xf86OptionRec and GenericListRec declarations into a separate
header.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-27 11:43:36 +10:00
Adam Jackson
f28e48834e Remove SCO support
This has never been buildable in any modular server release.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-12-20 12:11:11 -05:00
Cyril Brulebois
28b4c02d74 Enable silent rules for cat and echo.
One gets this:
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   GEN    lf3-xaaBitmap.c
|   CC     lf3-xaaBitmap.lo

instead of this:
| echo "#define LSBFIRST" > l3-xaaBitmap.c
| echo "#define TRIPLE_BITS" >> l3-xaaBitmap.c
| echo '#include "../../../../hw/xfree86/xaa/xaaBitmap.c"' >> l3-xaaBitmap.c
|   CC     l3-xaaBitmap.lo

Occurrences found using:
| git grep -E '(cat|echo)' -- '*Makefile.am'

Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-07 18:42:44 +01:00
Peter Hutterer
0799f0771c xfree86: remove two unused variables from Makefile.am
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-11-05 09:30:14 +10:00
Julien Cristau
5a387cf6d2 Only link Xorg with libconfig.la
Other DDXs don't use input hotplugging since config_init was moved to
the DDX in commit d33adcdf03, so there's
no need to link this in.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-17 09:41:16 -07:00
Dave Airlie
e454f106dc xf86 ddx: add vga arbiter support.
This adds support for using the libpciaccess interface for
vga arbitration support on top of a kernel which supports it.

Currently patches are queued for kernel 2.6.32 in jbarnes
pci tree, and shipping in Fedora kernel.

Co-authors:
Tiago Vignatti <tiago.vignatti@nokia.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-28 11:39:42 +10:00
Dave Airlie
4b42448a23 xserver: remove RAC/resource handling code.
This changes the ABI, but since the video ABI is at 6 already
it should be fine.

driver changes are in the pipeline after this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-07-28 15:14:28 +10:00
Topi Kanerva
c4081fee09 Make DGA optional. 2009-03-04 10:23:10 -05:00
Daniel Stone
7da4e901e0 XFree86: Fix build with DGA disabled
It's optional, so we might as well work when it's disabled.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-05 11:23:39 +02:00
Alan Coopersmith
89bbd07e9d Remove obsolete XF86_DATE & xf86Date.h 2008-12-23 21:40:21 -08:00
Maarten Maathuis
91f73b79b7 randr: Improve per-crtc gamma support.
- The Gamma values from the monitor section are now used during initial config.
- The old colormap system is disabled when gamma set hook is available.
- Gamma values are now persistent for the lifetime of the xserver.
- This requires no driver changes and should be driver ABI compatible.
2008-12-17 17:03:12 +01:00
Paulo Cesar Pereira de Andrade
b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Adam Jackson
8b9253f638 Code motion: subsume xf86DoProbe.c into xf86Init.c 2008-11-25 15:05:17 -05:00
Adam Jackson
df14682a31 Bus: Remove ISA support.
No, really.  PCI is old enough to drive now.  If you want this, get the kernel
to expose a framebuffer device.
2008-11-24 23:40:06 -05:00
Stefan Dirsch
f6e01fa1b8 Added '-showopts' option to print available driver options (#5564). 2008-11-23 11:16:03 +01:00
Rémi Cardona
58eacf0b7b Force LC_ALL=C when building xf86DefModeSet.c
Fixes build in not-quite-latin locales.
2008-10-21 10:07:24 -04:00
Eric Anholt
ce781cac1b Fix distcheck. 2008-09-11 16:48:23 -07:00
Adam Jackson
544bfd0666 Remove xf86Version.h and related API.
We haven't meaningfully been API-compatible with xf86 modules in ages,
let's stop pretending.
2008-08-13 11:20:24 -04:00
Kristian Høgsberg
036822584b Drop xf86CommonSpecialKey() and atKeynames.h
These are AT scancode specific, should really be part of xf86-input-keyboard.
Remove from server, move to xf86-input-keyboard.
2008-07-24 16:08:29 -04:00
Adam Jackson
8c8c4fdf34 EDID: Various reduced blanking fixes.
- Use a single common function to compute reducedness.
- Call it from both the old-school and new-school mode validation paths.
- Define monitor reduced-blanking support in accord with EDID 1.4.
- Attempt to filter RB DMT modes away from the "standard" EDID pool if
  the monitor doesn't claim RB support.
2008-07-21 16:49:17 -04:00
Julien Cristau
35346a4227 Don't put xf86Build.h in the tarball (bug#9277)
This file is generated by configure, we don't need to ship a stale
version in the tarball.
X.Org bug#9277 <https://bugs.freedesktop.org/show_bug.cgi?id=9277>
2008-07-20 16:40:59 +02:00
Daniel Stone
22e64108ec XFree86: Remove XFree86-Misc extension
Its last remaining purpose in life has been destroyed by input
properties.  Au revoir: it's been fun, by which I mean awful.
2008-07-16 06:25:26 +03:00
Daniel Stone
35c89f3f5b XFree86: Remove mysticism from Makefile.am
The variables were always the same, so just shove them in with the rest
of the plebs.
2008-07-16 01:51:02 +03:00
Daniel Stone
b89a59248a XFree86: Delete OSMouse code
This should be moved into the mouse driver, if anything.
2008-07-16 01:50:27 +03:00
Daniel Stone
d0de5ea96d XFree86: Remove useless debugging code
Also remove documentation which told you how to use a non-module-aware
GDB, albeit only with old, non-shared, modules.
2008-07-16 01:49:27 +03:00
Daniel Stone
4b1273c9c2 XFree86: Delete empty file & function
xf86InitXkb() has been empty for as long as I can remember.
2008-07-16 01:48:50 +03:00
Adam Jackson
ccec16e519 Bug #7300: Move xf86RAC to hw/xfree86/common 2008-07-15 11:24:08 -04:00
Daniel Stone
641a5f955b Build: Ensure xf86DefModeSet.c ends in an empty line
This shuts up a warning.
2008-05-07 22:29:04 +03:00
Adam Jackson
4cb4817c10 Remove the duplicate copy of xf86cvt.c 2008-02-29 16:01:15 -05:00