v2: Fix libdrm version check, and use XORG_VERSION_* instead of a
static 1.0.0 version for the driver module.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
The server will always have it.
v2: Clean up some weird formatting from the unifdeffing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
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/
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>
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>
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>
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>
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)
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>
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>
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
__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>
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>
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>
Whatever these are, they're not something grep can find, they must not
be used.
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This is the only place they're actually used (well, aside from some XAA
code in the s3 driver, but one s3 and 2 XAA).
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>