Commit Graph

6775 Commits

Author SHA1 Message Date
Eric Anholt
35dc7c7515 Merge branch 'modesetting-import' into master
This reintroduces a "hardware" driver to the xfree86 directory.
Unlike the drivers that xorg used to include in the source tree, that
needed independent release schedules to get hardware support out the
door, the modesetting driver shouldn't change much as new hardware
gets released.  A lot of what this driver needs to do is just keep up
with server ABI changes.

This import was done by taking xf86-video-modesetting-0.9.0, and
running this script with 'git-filter-branch -f --tree-filter
~/bin/modesetting-filter':

mkdir -p hw/xfree86/drivers/modesetting

rm -f README autogen.sh configure.ac Makefile.am .gitignore
rm -f man/Makefile.am

mv man/modesetting.man hw/xfree86/drivers/modesetting/
mv COPYING hw/xfree86/drivers/modesetting/
mv src/* hw/xfree86/drivers/modesetting/
2014-08-26 11:07:55 -07:00
Laércio de Sousa
3a51418b2d ephyr: set screen size & origin from host X server output's CRTC geometry
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake "Zaphod mode").

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Laércio de Sousa
84b02469ef ephyr: enable screen window placement following kdrive -screen option extended syntax
With this patch, one can launch Xephyr with option "-screen WxH+X+Y"
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Laércio de Sousa
376f4de8ae kdrive: add support to +X+Y syntax in -screen option parsing
This patch enhances current -screen option parsing for kdrive-based
applications. It can parse strings like
<WIDTH>x<HEIGHT>+<XOFFSET>+<YOFFSET>, storing X and Y offsets
in KdScreenInfo instances.

For negative values, this patch supports +-X+-Y (not -X-Y) syntax.

It will allow e.g. proper Xephyr window placement for multiseat
purposes.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:54 -05:00
Thierry Reding
5d133276de xfree86: Allow non-PCI devices as primary
On platforms that don't support PCI or have no GPU attached to the PCI
bus, there can still be a primary device on a non-PCI bus.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:04:08 -05:00
Thierry Reding
2f0183222b xfree86: Fallback to first platform device as primary
When neither of the various bus implementations was able to find a
primary bus and device, fallback to using the platform bus as primary
bus and the first platform device as primary device.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:03:48 -05:00
Joerg Sonnenberger
c2548d71f7 Fix format string.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-17 14:18:45 -07:00
Keith Packard
d09c9ddb86 Merge remote-tracking branch 'jeremyhu/master' 2014-08-12 16:34:24 -07:00
Keith Packard
ee9f766abf xfree86: [v2] Remove duplicate InputInfoPtr typedef from xf86Xinput.h
GCC 4.2 doesn't accept 2 typedef declarations of the same type, so
remove the extra one from xf86Xinput.h and have xf86Xinput.h #include
xf86.h to make sure everyone using just that file gets the typedef.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2014-08-12 15:36:57 -07:00
Jeremy Huddleston Sequoia
ab32ee3589 XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks
http://xquartz.macosforge.org/trac/ticket/1876

Follow-up to: 1c10b37380

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-08-11 13:18:51 -07:00
Eric Anholt
3714f54016 kdrive: Remove a dead struct.
It's never been used in the history of the tree.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07 12:39:53 -07:00
Eric Anholt
ef258fa4fd xv: Drop the ClientPtr from the interface to the DDX.
Nobody was using it.

v2: Merge the hunk that was accidentally in the previous commit into
    this one.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07 12:39:53 -07:00
Eric Anholt
850b268e2b xv: Remove the no-op AllocatePort/FreePort interfaces.
v2: Fix accidentally squashed-in change for dropping client from the
    arguments, which should have been in the next commit.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v2)
2014-08-07 12:39:48 -07:00
Eric Anholt
41d4a626c6 kdrive: Don't bother explicitly clearing new window privates to NULL.
Privates are initially cleared to zero by dixInitPrivates().

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
e311318b35 kdrive: Remove dead KXVPaintRegion().
It's been unused since mach64 was deleted, and now there's a helper in
core XV.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
ea3f3b0786 xv: Move xf86 XV color key helper to core.
Color key overlay implementations want to reuse this code, and XF86's
had bugs (to be fixed in the next commit).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
b01cfe5f23 xv: Move CloseScreen setup from a DIX hook to normal wrapping.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
e7dde86f23 xv: Move the DDX XV screen private allocation into the DDXes.
XV was going against convention by having the core infrastructure
allocate the private on behalf of the DDX.  I was interested in this
because I was trying to make multiple pieces of DDX be able to
allocate adaptors, and that wasn't going to work if DDX-specific code
was hung off of a single global screen private.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
a146c6d421 xv: Drop the ddQueryAdaptors() interface.
The core was passing pointers to pxvs's nAdaptors and pAdaptors, and
the two hardware implementations were copying pxvs's nAdaptors and
pAdaptors into those pointers.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
cb42805c66 xv: Move common code for adaptor cleanup to xvmain.c
Since any DDX XV screen cleanup would need this same code for freeing
the tree of pointers for xv adaptors, move it to the dix.

v2: Unconditionalize the pPorts freeing, to match the block above it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
2014-08-06 20:12:20 -07:00
Eric Anholt
8cb0da2940 xv: Remove dead VIDEO_NO_CLIPPING from the xorg and kdrive DDXes.
As far as I can see, nothing has ever used this flag except possibly
the i.mx6 xorg ddx debug during bringup.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
a6ec7d5278 xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes.
As far as I can see (looking at trees on my disk, plus googling for
the term), nothing has ever used this flag

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Keith Packard
61afe950e6 xfree86/modes: rotation damage is automatically destroyed on close
Don't try to destroy rotation_damage in the xf86RotateCloseScreen; it
will have been destroyed when the screen pixmap was destroyed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-31 00:03:58 -07:00
Keith Packard
bd4198b01f xfree86: Avoid compiler warning for unused vars without systemd
When systemd isn't being used, systemd_logind_release_fd is defined
as an empty macro, leaving the arguments unused. Fix the compiler
warnings by simply removing the local variables and referencing the
structure within the macro call.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-31 00:03:39 -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
Adam Jackson
a08e7a098a dri1: Remove unused DRI{,Post}ValidateTree
i810, mga, savage, and tdfx do reference these slots, but only to set
them to NULL, so while this does have API impact it's not actually used.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:58:30 -04:00
Adam Jackson
5486c834fa xquartz: Remove unused DRI{,Post}ValidateTree
Cargo-culted from DRI1, not actually used for anything.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:58:30 -04:00
Adam Jackson
ac3af4bd21 xfree86: Remove unused HardEdges
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:19 -04:00
Adam Jackson
4100687ea6 xfree86: Remove useless #include "fb.h"
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:04 -04:00
Adam Jackson
2d451c5cdc xfree86: Remove pointless xf86RandRCreateScreenResources
Given the #if 0 this was wrapping for no effect.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:01 -04:00
Adam Jackson
a8cca7bd5a xfree86: Remove protectMem from VidMemInfo
Never filled in.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:58 -04:00
Adam Jackson
e4cf1e58f5 xfree86: Remove unused xf86{Map,Unmap}LegacyIO
I ported these to pciaccess in:

    commit 858fbbb40d
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Fri Sep 16 13:33:04 2011 -0400

        pci: Port xf86MapLegacyIO to pciaccess

As of yet there are still no drivers using them, and there's not a lot
of value in having the wrappers when they just trivially call pciaccess
anyway.  Nuke 'em.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:52 -04:00
Adam Jackson
96206cf477 xfree86: Remove deprecated PCI types
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:50 -04:00
Adam Jackson
46fd5a28ef xfree86: Remove some unused pre-pciaccess types
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:46 -04:00
Adam Jackson
3bb9f9862b xfree86: Remove xf86ConfigActivePciEntity
The giant OBSOLETE DO NOT USE comment has been there since 2000,
probably it's safe to nuke by now.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:27 -04:00
Adam Jackson
51531a6717 vgahw: Nuke unused vgaCmap.c
Never been built since m12n, can't be needed.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:24 -04:00
Adam Jackson
150acef3af kdrive: Remove some dead bits of the man page
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:51:40 -04:00
Adam Jackson
a317e0a974 bsd: Remove some reference arm code behind #if 0
git history is reference enough, thanks.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:47:23 -04:00
Adam Jackson
6ddd164508 xfree86: Unify the ppc/sparc mmio-swap-or-not conditionals
Map SPARC_MMIO_IS_BE and PPC_MMIO_IS_BE to MMIO_IS_BE and use the same
macros for both since they're identical.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:19:10 -07:00
Adam Jackson
8ffd1c066a xfree86: Clean up some silly __sparc macro usage
The top of this file already defines __sparc__ if __sparc is defined.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:19:07 -07:00
Adam Jackson
1c1711b57f xfree86: Pull generic barrier() definition up to top level
And remove the redundant redecl from the nds32 section.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:19:05 -07:00
Adam Jackson
c73929bbfc xfree86: Remove MMIO_ONB* and friends
Non-barrier-emitting MMIO writes.  They appear to be utterly unused,
burn it all down.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:19:01 -07:00
Adam Jackson
9b33e31d41 xfree86: Clean up powerpc barrier decls
I think the externs are there for the non-gcc case?  And maybe there was
some assembly code to implement that once?  Whatever, at this point on
ppc the compiler is either gcc or willing to pretend.  The macros below
the decls take care of the actual eieio so the externs can just go.

Also remove a comment that maybe made sense once upon a time.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:58 -07:00
Adam Jackson
b5141a1fab xfree86: Simplify a bunch of OS and arch conditionals
All of this is inside #ifdef __GNUC__, between that and configure.ac we
can assume there's a unixy thing under us.  Given that there's no real
reason to limit the arch paths to particular OSes, so let's not.

The final #elif here, combined with the ones before it, effectively said
"if not (alpha amd64 sparc* mips* ppc* arm* nds32 m68k sh hppa s390 m32r)",
and as the comment above it hints, it's meant to cover i386 (and happens to
also cover itanic).  Flip the conditional around to be sensible.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:55 -07:00
Adam Jackson
6d3ba80f19 xfree86: Remove pre-2.6 Linux ppc support
2.6.0 was December 2003, you've had plenty of time to get your head in
the game.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:52 -07:00
Adam Jackson
e242e82eba xfree86: Remove a useless !__SUNPRO_C guard
You can't tell from context here, but this is all inside #ifdef
__GNUC__, so this conditional can't do squat.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:35 -07:00
Adam Jackson
93745a6c1a xfree86: Undef GCCUSESGAS
Can't be needed, we've never defined it in modular xserver.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:33 -07:00
Adam Jackson
b1d9bc8d1d xfree86: Remove an unlikely bit of #pragma
__USLC__ appears to mean the SCO OpenServer compiler, which configure.ac
doesn't think is an OS the xfree86 ddx supports.  The conditionals
surrounding these pragmas effectively mean "if not gcc and not Sun C",
and probably arbitrary pragmas aren't supported by arbitrary compilers.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:31 -07:00
Adam Jackson
f7f9ccef1d xfree86: Undef __HIGHC__
MetaWare High C++ compiler?  xfree86 cvs history shows this being added
in a commit whose text is, classically, "updates".  metaware.com
redirects to a 404 on synopsys.com, which to me indicates it's not super
important to them, and their order form won't even tell you how much the
thing costs.  At any rate if this is worth worrying about it's worth
letting autoconf worry about for us.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:29 -07:00
Adam Jackson
80446086b9 xfree86: Undef FAKEIT
I guess this is meant to stub out all I/O port calls?  Whatever, it's
not been defined by the buildsystem at least as far back as monolith
6.8.2.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:26 -07:00