Commit Graph

51 Commits

Author SHA1 Message Date
Thierry Reding c62a8b60b9 xorg: Remove unused definitions from xorg-server.h.in
There is no code around that will ever define values for the XLOADABLE,
WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end
up commented out and are therefore completely useless.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-28 09:54:17 -04:00
Adam Jackson 2e7f790b57 dix: Remove ffs.c
Your libc has ffs, I promise.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-11-06 17:22:46 -05:00
Eric Anholt da27ca84b4 xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c.
parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and
defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed
__XCONFIGFILE__ to anything else, it would have got out of sync.
Settle on the name without gratuitous underscores.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25 15:01:23 -07:00
Eric Anholt 5c7ed785e3 kdrive: Remove vestiges of TSLIB support.
The actual code was gone in 27819950e4,
but some checks remained.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23 13:17:34 -04:00
Jamey Sharp d08ac36606 kdrive: Delete unused TOUCHSCREEN define.
There's nothing in configure to enable this, and KdTsPhyScreen isn't
defined anywhere.

[ajax: Rebase, also clean up Xfbdev]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
2015-10-06 10:43:05 -04:00
Alan Coopersmith 0887c9463f Import reallocarray() from OpenBSD
Wrapper for realloc() that checks for overflow when multiplying
arguments together, so we don't have to add overflow checks to
every single call.  For documentation on usage, see:
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Keith Packard e8373e4b6a Add X_BYTE_ORDER to xorg-server.h
Drivers don't get to use dix-config.h, they use xorg-server.h
instead. Add X_BYTE_ORDER to that file so drivers can see the value.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-07-31 21:42:04 -07:00
Keith Packard 90803042bc Fix files including xorg-server.h by mistake
A few files in the server are including xorg-server.h, which is only
for use by Xorg server drivers. This fixes those errors and then adds
a check to make sure it doesn't happen again.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-07-30 12:17:27 -07:00
Keith Packard 1487145b41 Add 'FONT_PATH_NAME_ELEMENT_CONST' to dix-config.h and xorg-server.h
This signals to the fontsproto code that the X server has been fixed
to allow the name member in a FontPathElement struct to be declared
const to eliminate piles of warnings when assigning string constants
to them.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22 19:56:31 -08:00
Keith Packard 7aad79c5a5 Make XTrans FD passing support optional. Define only on Linux
Until other operating systems have a libXtrans port for FD passing,
disable this on non-Linux systems.

Note that this define affects how libXtrans gets built into the X
server, which is why it need only define the symbol

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-11 15:11:39 -08:00
Keith Packard aaf0e29619 Disable DRI3 and sync fence FD functions if xshmfence isn't available
Make sure the server can build when the xshmfence library isn't present

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-04 18:53:36 -08:00
Keith Packard 5c5c1b7798 present: Add Present extension
Provides both a software implementation using timers and driver hooks
to base everything on vblank intervals.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:59:18 -07:00
Keith Packard 5631382988 dri3: Add DRI3 extension
Adds DRM compatible fences using futexes.
Uses FD passing to get pixmaps from DRM applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:58:30 -07:00
Daniel Stone 6636244186 Remove last renmants of XFree86LOADER define
Not to be confused with XFree86Loader or XorgLoader.  Which are both now
dead too.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:02 -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 8b6a750097 Fix gcc warnings about redundant declarations of fallback functions
Ensure ffs, strndup, strlcat, etc. aren't defined by our headers
if they're already defined in the system headers.

This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers,
but if you built the Xserver with a libc that had those, and then build
the drivers with a less capable libc, you're going to have problems anyway,
and this should solve some reported problems with conflicts between our
strndup definition and gcc magic for it.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-05 14:32:59 -08:00
Adam Jackson a16e282200 xfree86: Fix the sdk headers to be multilib-safe
Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in
internal header usage, and always define _XSERVER64 for modules if _LP64
is defined.  Prevents differing xorg-server.h between 32 and 64 bit
packages.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-23 13:39:22 -05:00
Alan Coopersmith 613e76ff90 Remove support for Solaris x86 releases older than Solaris 8
If you want to run a pre-1999 kernel, you'll need a pre-2009 X server

[Some pre-Solaris 8 VT support is left by this patch to allow reuse by
 the new Solaris VT support that follows in the next patch.]

Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-08-13 21:56:05 -07:00
Oliver McFadden 21cbb4c9de xorg-server.h.in: Export the X Access Control Extension (XACE), too.
Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-06-24 00:26:14 +03:00
Peter Hutterer 7057a9a97b Remove two more define XKB leftovers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:17 +10:00
Daniel Stone 40877c6680 XKB: Make XKB mandatory
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22 15:06:25 +11:00
Alan Coopersmith 3208eff2d7 Update xorg-server.h.in & Xnest to use new XKB default #defines 2009-01-21 14:45:06 -08:00
Jeremy Huddleston 4f00423187 XQuartz: Fat binary buildfixes
Let Xarch.h set X_BYTE_ORDER for us.
Determine _XSERVER64 at build time.
(cherry picked from commit f54736c2b0)
2009-01-07 10:57:06 -08:00
Mathieu Bérard 9f9268821b The smart scheduler is not optional. 2008-08-11 13:52:38 -04:00
Daniel Stone 16e40ecf43 Remove dead code, useless #defines, et al 2008-07-17 22:37:31 +03:00
Daniel Stone 446fe9eecd Dead code removal
Remove a whole bunch of code that was never built, be it entire files or
just dead ifdefs.
2008-07-17 21:37:50 +03: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
Adam Jackson cbc20d92de XTrap delenda est. 2008-06-25 09:52:36 -04:00
Eric Anholt 25827fde68 Nuke the MIT-SUNDRY-NONSTANDARD extension.
This extension provided bug-compatibility with pre-X11R6, but has been
stubbed out in our server since 2006 to return BadRequest when you actually
asked for it.
2008-04-18 16:37:08 -07:00
Eric Anholt a7e3ad1c6b Remove NDEBUG (assert() disable) define from the X Server.
A few pieces of code were abusing this define for other purposes, which are
converted to #ifndef DEBUG instead.  There should be no ABI consequences
to this change.

The rationale is that having the define in xorg-server.h also disables
assert() drivers, which is unexpected, and also difficult to avoid since
xorg-server.h is included in their config.h, and you can't put a #undef in
config.h.  As for removing it from the server instead of moving it to an
internal header, we probably shouldn't have unnecessary assert()s in
critical server paths anyway, and if we do we could #define NDEBUG in the
specific cases needed.
2008-04-10 10:35:14 -07:00
Kristian Høgsberg b71dc54352 Add DRI2 module. 2008-02-14 19:53:49 -05:00
Eamon Walsh 2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Adam Jackson c67b9c5fc3 Clean up some garbage in driver enumeration. 2007-11-15 14:24:36 -05:00
Eamon Walsh a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Daniel Stone dda10c9066 Remove all traces of external RGB database (and Speedo)
Remove all references to an external RGB database (which hasn't been enabled
for a very long time).  Also get rid of some references to Speedo fonts.
2007-11-05 16:28:35 +00:00
Eamon Walsh 4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Keith Packard 7d54399cfd Add XSERVER_LIBPCIACCESS to xorg-server.h when using libpciaccess 2007-08-26 22:11:45 -07:00
Alan Coopersmith c0e91777a9 Add __SOL8__ to xorg-server.h.in since xf86-input-kbd needs it to build 2007-07-12 16:37:11 -07:00
Ben Byer 81444486be autoconf goodness for XDarwin, courtesy of pogma 2007-02-17 02:23:11 -08:00
Daniel Stone 84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Daniel Stone 6d594ebc66 Ditch more alternate-loader braindamage. 2006-06-01 20:22:39 +00:00
Kevin E Martin 7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Kevin E Martin 14b9315379 Add missing XvExtension and XvMCExtension defines. 2005-12-01 22:06:49 +00:00
Kevin E Martin 0e7e4c7064 Fix typo to enable DGA support.
EXTMODULE is required to build DGA support into extmod.
2005-11-10 04:59:21 +00:00
Eric Anholt 12fbcfefe6 Add some initial BSD support for the xorg server. Incomplete on NetBSD,
OpenBSD, and non-i386/amd64 FreeBSD for sure. Plus I haven't actually
    run it yet.
2005-09-13 18:37:35 +00:00
Daniel Stone ade158d238 Define WITH_VGAHW, since we always build it; add to Xorg headers. 2005-09-12 07:07:59 +00:00
Daniel Stone 8d6e743bc4 Add _XSERVER64 definition to config headers. 2005-08-21 19:23:17 +00:00
Alan Coopersmith 9e9f9cb487 Need to define SVR4 on SVR4-ish systems since many headers and source files
check for it, expecting Imake to have defined it already. (Should be
    replaced with more specific checks & defines, but there's too many to
    get them all right now.)
2005-07-29 21:55:57 +00:00
Kevin E Martin a407fa373b Move drm up to os-support since the files are shared by multiple platforms.
Fix the dri and drm build. Fix server-side DMX extension build. Make
    xf4bpp use the correct version of mfbline.c for mfbseg.c. Add #ifndef
    _HEADERNAME_H_/#define _HEADERNAME_H_/.../#endif to the headers.
2005-07-15 22:51:05 +00:00
Adam Jackson f4626bb72b dlloader is the default in 6.9, but the loader doesn't get told to prefer
dlloader modules unless you -DDLOPEN_HACK.
2005-07-13 22:59:39 +00:00