Commit Graph

12115 Commits

Author SHA1 Message Date
Adam Jackson
387b1ac33c dix: Factor out DeliverUnmapNotify
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:41:41 -07:00
Adam Jackson
d20cc0fca4 dix: Factor out DeliverMapNotify
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:41:26 -07:00
Adam Jackson
63843cb700 dix: Factor out MaybeDeliverMapRequest
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:40:38 -07:00
Adam Jackson
dab7a1ec7f dix: Fix some indentation
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:40:08 -07:00
Peter Hutterer
3d1051aecb dix: set the device transformation matrix
The property handler is registered after setting the property, so
dev->transform remains as all-zeros. That causes pixman_f_transform_invert()
to fail (in transformAbsolute()) and invert remains as garbage. This
may then cause a cursor jump to 0,0.

Since the axes are not yet initialized here and we need to allow for drivers
changing the matrix, we cannot use the property handler for matrix
initialization, essentially duplicating the code.

Triggered by the fix to (#49347) in 749a593e49

https://bugzilla.redhat.com/show_bug.cgi?id=852841

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:38:42 -07:00
Daniel Martin
1cb0261ef5 dix: Delete mibstore.h
Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to
define an empty function (miInitializeBackingStore()) for backward
compatibility. Time to say goodbye.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:31:55 -07:00
Daniel Martin
08a9ed2524 dix: Remove refs to mi backing store from docs
Remove any reference to mibstore.h and miInitializeBackingStore() from
the documentation.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:31:39 -07:00
Daniel Martin
76d8739b1f dix: Remove #includes of mibstore.h
Remove more backing store leftovers.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:31:27 -07:00
Daniel Martin
056fd15dea dix: Delete mibstore.c
The only reference to mibstore.c was removed with commit c4c4676. Remove the
file itself too.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:30:34 -07:00
Keith Packard
d01921ec18 Merge remote-tracking branch 'ajax/ioperm' 2012-09-20 17:26:48 +02:00
Adam Jackson
245e7e0361 xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES)
This is a really awkward interface, since we're calling it well before
the driver knows what device it's going to drive.  Drivers with both KMS
and UMS support therefore don't know whether to say they need I/O port
access or not, and have to assume they do.

With this change we now call it only to query whether port access might
be needed; we don't use that to determine whether to call a driver's
probe function or not, instead we call them unconditionally.  If the
driver doesn't check whether port access was enabled, they might crash
ungracefully.  To accomodate this, we move xorgHWAccess to be explicitly
intentionally exported (sigh xf86Priv.h) so that drivers can check that
before they attempt port access.

v2: Move initial xf86EnableIO() nearer the logic that determines whether
to call it, suggested by Simon Farnsworth.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20 11:07:27 -04:00
Adam Jackson
d88fb00d79 linux: Make failure to iopl non-fatal
We load the driver list, then enable I/O, then call driver probe based
on whether I/O enable succeeded.  That's bad, because the loaded
security policy might forbid port access.  We happen to treat that as
fatal for some reason, which means even drivers that don't need I/O
access (like kms and fbdev) don't get the chance to run.  Facepalm.

How about we just make that non-fatal instead, that sounds like a much
better plan.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20 11:07:27 -04:00
Adam Jackson
048674a6ae linux: Refactor xf86{En,Dis}ableIO
Pull platform methods into their own sections for legibility, and
rewrite the ifdefs to be more concise.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20 11:07:27 -04:00
Dave Airlie
70e5766874 xf86: fix multi-seat video device support. (v2)
If we are not seat 0 the following apply:

don't probe any bus other than platform
don't probe any drivers other than platform
assume the first platform device we match on the bus is the primary GPU.

This just adds checks in the correct places to ensure this, and
with this X can now start on a secondary seat for an output device.

v2: fix Seat0 macros
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19 15:48:50 +10:00
Keith Packard
37d956e3ac xf86: fix compat output selection for no output GPUs
This should work properly with dynamic outputs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19 15:48:12 +10:00
Dave Airlie
e0b92f5f86 config/udev: ignore change on drm devices
for input devices we handle change like remove/add, but for
drm devices we get change events when we hotplug outputs,
so lets just ignore change at this level, and let the drivers
handle it. We may in the future want to route driver udev
from here instead.

Reported-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19 10:47:04 +10:00
Dave Airlie
10672a5abe xf86/platform: scan pci after probing devices
This solves a race if we are trying to dynamically power off
secondary GPUs. Its not the greatest fix ever but it probably
as good as we can do for now.

The GPU probing causes the devices to be powered up, then when
we scan the PCI bus we get the correct information from the kernel,
rather than a bunch of 0xff due to the device being powered off.

drop gratuitous '&'.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-19 10:46:32 +10:00
Dave Airlie
22746df15b dri2: invalidate drawable after sharing pixmap
After we share the pixmap, the backing storage may have changed,
and we need to invalidate and buffers pointing at it.

This fixes GL compositors and prime windows lacking contents initially.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-17 09:52:03 +10:00
Keith Packard
f0bad69edd Version bumped to 1.13
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-05 14:45:08 -07:00
Keith Packard
856f80c8d7 Merge remote-tracking branch 'jeremyhu/master' 2012-09-05 11:02:58 -07:00
Dave Airlie
0db936a5b7 xf86: call enter/leave VT for gpu screens as well
Otherwise we can't do fast user switch properly for multiple GPUs.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 16:16:17 +10:00
Dave Airlie
18deac48db config/udev: respect seat for hotplugged video devices.
This respects the seat tag for hotplugged video devices at X start.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 16:16:02 +10:00
Dave Airlie
ec740cffeb config/udev: add wrapper around check if server is not seat 0
this is a simple clean-up that is useful to stop further propogation
of this construct.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 16:15:52 +10:00
Dave Airlie
49ec57d509 dix: free default colormap before screen deletion
If we don't free this here, it gets freed later in the resource
cleanups, however it then looks up up pmap->pScreen, which we
freed already in this function. So free the default colormap
when we should.

This fixes a bug after a couple of hotplug cycles when you try
to exit the X server and it crashes.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 16:15:52 +10:00
Dave Airlie
20f601a0fb xf86/crtc: don't free config->name
This is set by pre_init not screen init, so if we free it here
and then recycle the server, we lose all the providers.

I think we need to wrap FreeScreen here to do this properly,
will investigate for 1.14 most likely, safer to just leak this
on server exit for now.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-04 16:15:52 +10:00
Jeremy Huddleston Sequoia
b8ab93dfbc list: Use offsetof() and typeof() to determine member offsets within a structure
Some compilers have difficulty with the previous implementation which
relies on undefined behavior according to the C standard.  Using
offsetof() from <stddef.h> (which most likely just uses
__builtin_offsetof on modern compilers) allows us to accomplish this
without ambiguity.

This fix also requires support for typeof().  If your compiler does not
support typeof(), then the old implementation will be used.  If you see
failures in test/list, please try a more modern compiler.

v2: Added fallback if typeof() is not present.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-08-29 16:09:20 -07:00
Peter Hutterer
148583d62b tests: move GCC diagnostics pragma outside of function
This is a  a gcc 4.6+ feature.

signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside
functions

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-29 01:11:29 -07:00
Jeremy Huddleston Sequoia
c75c947b6e test/list: Fix test_xorg_list_del test
We never use child[2], so it's state is undefined.

This issue seems to have existed since the test was first
written: 92788e677b

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-08-28 20:07:22 -07:00
Jeremy Huddleston Sequoia
486038fe16 XQuartz: Bump Info.plist version to 2.7.4
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-27 22:35:51 -07:00
Jeremy Huddleston Sequoia
b90b3f6eac test: Make os test more compliant
sighandler_t is not UNIX.

Regression from: 7f09126e06

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-08-27 22:10:05 -07:00
Keith Packard
a557edca61 Merge remote-tracking branch 'whot/for-keith' 2012-08-27 08:06:09 -07:00
Peter Hutterer
24ffcfcded os: fix typo, fsync when WIN32 is _not_ defined
Introduced in 164b38c72f

Reported-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-23 14:48:18 +10:00
Peter Hutterer
d53e6e02a2 mi: don't check for core events in miPointerSetPosition (#53568)
As of 81cfe44b1e, miPointerSetPosition now
returns the screen pointer of the device. This broke floating slave devices,
as soon as a motion event was submitted, miPointerSetPosition returned NULL,
crashing the server.

dev->coreEvents is only false if the device is a floating slave, in which
case it has a sprite.

X.Org Bug 53568 <http://bugs.freedesktop.org/show_bug.cgi?id=53568>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-23 14:48:14 +10:00
Keith Packard
6619f5c0e1 Relase 1.12.99.905
RC with updated ABI version numbers.

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-21 13:46:34 -07:00
Peter Hutterer
bafbd99080 dix: work around scaling issues during WarpPointer (#53037)
In WarpPointer calls, we get input in screen coordinates. They must be
scaled to device coordinates, and then back to screen coordinates for screen
crossing and root coordinates in events.

The rounding errors introduced (and clipping in core/XI 1.x events) can lead
to the actual position being different to the requested input coordinates.
e.g. 200 scales to 199.9999, truncated to 199 in the event.

Avoid this by simply overwriting the scaled screen coordinates with the
input coordinates for the POINTER_SCREEN case.

X.Org Bug 53037 <http://bugs.freedesktop.org/show_bug.cgi?id=53037>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-21 07:54:07 +10:00
Peter Hutterer
1ebba43052 os: don't block signal-unsafe logging, merely warn about it.
Throw an error into the log file, but continue anyway. And after three
warnings, stop complaining. Not all input drivers will be fixed in time (or
ever) and our printf implementation is vastly inferior, so there is still a
use-case for non-sigsafe logging.

This also adds more linebreaks to the message.

CC: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-21 07:54:07 +10:00
Peter Hutterer
4912b4adb6 os: add support for %d and %i to pnprintf
The mouse driver uses %i in some debug messages

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-21 07:54:07 +10:00
Peter Hutterer
7f8c39c8b5 Add FormatInt64 to convert signed integers in signal-safe manner
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-21 07:54:07 +10:00
Peter Hutterer
36c1d92ec0 test: add a few tests for signal-safe logging
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-21 07:54:07 +10:00
Peter Hutterer
b69536b475 test: assert from signal-safe number conversion
Throw an assert when the conversion fails instead of just returning. Asserts
are more informative.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-21 07:54:07 +10:00
Aaron Plattner
3e091e1075 xfree86: Bump extension ABI to 7.0
Commit 9d457f9c55 added an array of
DevPrivateSetRec structures in the middle of the ScreenRec, which throws off
extension modules trying to call things like pScreen->DestroyPixmap.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-17 16:17:19 -07:00
Jeremy Huddleston Sequoia
ac616d8ed5 XQuartz: Use asl_log_descriptor for children as well
This change is #if'd out due to a bug in asl_log_descriptor, but
it is left here as reference to be enabled in the future.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
ad123071e5 XQuartz: Use asl_log_descriptor on Mountain Lion
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
7c3d2e4828 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
We forgot to multiply by sizeof(), so it wasn't fully zeroed out.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
a32e01802f XQuartz: console_redirect: Set the correct location for reading into the buffer
Prior to this change, it was possible that a large message would have some
of its data prepended to subsequent messages due to our not incorrectly
setting the location to write into the buffer.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 18:32:50 -07:00
Keith Packard
ad5fe2d961 Merge remote-tracking branch 'jeremyhu/master' 2012-08-15 13:29:17 -07:00
Paul Berry
16d8da5ca9 glx: Skip multisampled configs when matching pre-existing X visuals.
In __glXScreenInit() we generate the set of GLX visuals in two steps:
first we match each pre-existing X visual with a corresponding
FBConfig, then we generate a new X visual to correspond to all the
remaining FBConfigs.

The first step is used for the two default 24-bit visuals (true color
and direct color) and for the 32-bit visual.  If windowsystem
multisampling is enabled in Mesa, we need to ensure that none of these
three visuals gets matched to a multisampled config.

Fixes a bug with windowsystem multisampling in gnome-shell.  If the X
server happens to match up a multisampled FBConfig to the 32-bit
visual, gnome-shell will try to use it to read pixels from
alpha-blended windows (such as gnome-terminal), resulting in no window
appearing on screen.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-15 13:25:08 -07:00
Jeremy Huddleston
99b94af1ff XQuartz: Fix build regression for GlxExtensionInit
quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue]
    {GlxExtensionInit, "GLX", &noGlxExtension},

Regression-from: aad428b8e2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-08-15 10:28:16 -07:00
Keith Packard
c0540b4c8d Kludge -- Call RandR screen before cleaning up xf86 crtcs
The core RandR screen cleanup now involves cleaning up any GPU screen
associations, and those call down into DDX to clean up the driver. If
the pointers from the xf86 structures back to the core randr
structures are set to NULL at that point, bad things happen.

This patch "knows" that the core RandR close screen is underneath the
xf86 randr close screen function, and so makes sure it gets called
first.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14 17:14:55 -07:00
Keith Packard
288b87e42c Close GPU screens before core screens
This should make cleaning up the GPU screens easier as the core
screens they are associated with will still be around.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14 17:13:52 -07:00