platform/upstream/xorg-server.git
9 years agoenable dri3 and present extensions 53/26853/1 accepted/tizen/common/20140829.104150 submit/tizen_common/20140829.101731
SooChan Lim [Fri, 29 Aug 2014 10:06:33 +0000 (19:06 +0900)]
enable dri3 and present extensions

Change-Id: I8aeb99bdf04dc9ca846d50fa6914593b4c0ddd65

9 years agopackage version up devel/x11 submit/devel/x11/20140801.070459 submit/tizen/20140818.084211 submit/tizen/20140818.144456 submit/tizen/20140819.234625
Boram Park [Fri, 1 Aug 2014 07:04:20 +0000 (16:04 +0900)]
package version up

Change-Id: I0f9956d830b932e66973d2ec5bcf5992c4518cd4

9 years agoMerge branch 'upstream' into devel/x11
Boram Park [Fri, 1 Aug 2014 07:03:58 +0000 (16:03 +0900)]
Merge branch 'upstream' into devel/x11

Conflicts:
configure.ac

Change-Id: I6d360dd3d81bc38134e8f8de28e1256b491d0031

9 years agopacking extensions only in case of x86_64 submit/devel/x11/20140801.054256
Boram Park [Fri, 1 Aug 2014 05:41:11 +0000 (14:41 +0900)]
packing extensions only in case of x86_64

Change-Id: Iab26be59aeb269e44ba14d992f328b3207edb000

9 years agopackaging: Use mesa on x86 arch 24/25224/1 sandbox/pcoval/tizen
Philippe Coval [Thu, 31 Jul 2014 01:26:52 +0000 (03:26 +0200)]
packaging: Use mesa on x86 arch

Change-Id: Ifeafb50de463fb9318c5f022276e9934f45f0e71
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoRevert "x doens't use mesa" 23/25223/1
Philippe Coval [Thu, 31 Jul 2014 01:20:06 +0000 (03:20 +0200)]
Revert "x doens't use mesa"

This reverts commit 46e1b28889f68d29143726f55022e802a62d331d.

Change-Id: I5739052842b6fb62ac019ee170ab6831af45a0ad
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
10 years agox doens't use mesa 08/24908/1
Boram Park [Sat, 19 Jul 2014 07:22:46 +0000 (16:22 +0900)]
x doens't use mesa

Change-Id: I31dbb49ea9968841092792e7f8cdfce0ed7551d7

10 years agoUpdate to version 1.16.0 upstream upstream/1.16
Keith Packard [Thu, 17 Jul 2014 07:03:33 +0000 (00:03 -0700)]
Update to version 1.16.0

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoconfig_odev_add_attribute*: Check for right attribute type
Hans de Goede [Mon, 14 Jul 2014 12:01:47 +0000 (14:01 +0200)]
config_odev_add_attribute*: Check for right attribute type

Don't allow setting string attributes to integers and vice versa.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoFix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD
Hans de Goede [Mon, 14 Jul 2014 12:01:46 +0000 (14:01 +0200)]
Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD

Looks like the value of ODEV_ATTRIB_DRIVER was not updated when the patch
adding it got rebased on top of a newer server version.

This fixes the xserver crashing when systemd-logind integration is used.

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

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoRevert "dix: fix up coordinate scaling when external monitors are present"
Peter Hutterer [Mon, 14 Jul 2014 05:05:58 +0000 (15:05 +1000)]
Revert "dix: fix up coordinate scaling when external monitors are present"

This reverts commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf.

Reverting for two reasons:
* the scaling does not work on devices that don't advertise resolution, and
  the default resolution used (100 units/mm) is higher than most devices,
  resulting in a significant slowdown of the touchpads.
* the scaling is still affected by resolution changing. The patch worked
  before acceleration but since it maps into resolution-dependent dx/dy
  coordinates the acceleration may distort the movement after the fact. So the
  same input data generates different movements depending on the resolution.
  This can't easily be fixed for all affected devices as synaptics has its own
  velocity calculation method whereas wacom doesn't. So anything in the server
  won't work for both at the same time.

Revert this for now, until a more integrated solution can be implemented.

10 years agoxfree86: Only support one sysconfigdir
Aaron Plattner [Fri, 11 Jul 2014 22:56:35 +0000 (15:56 -0700)]
xfree86: Only support one sysconfigdir

When the X server is compiled with --prefix set to something other than /usr,
then it ends up with a nonstandard sysconfigdir in its .pc file.  This causes
various other components to install their xorg.conf.d snippets there.

However, the X server first looks for /usr/share/X11/xorg.conf.d before looking
in sysconfigdir.  That means that if the system administrator installed anything
that created that path, the user's custom sysconfigdir is not searched.

Rather than doing that, just look in the configured sysconfdir and nowhere else.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoxfree86: don't force the screensaver off on DPMS unblank, merely suggest it
Peter Hutterer [Thu, 10 Jul 2014 00:39:50 +0000 (10:39 +1000)]
xfree86: don't force the screensaver off on DPMS unblank, merely suggest it

Commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a added symmetry to the
screensaver/DPMS invocations so that one (en|dis)ables the other. Having
dependencies between DPMS and the screensaver is subject to further arguments,
but in this particular case using SCREENSAVER_FORCER is detrimental.
SCREENSAVER_FORCER(ScreenSaverReset) resets the idle time for all
devices on DPMS unblank.

It prevents at least one use-case that GNOME tries to implement:
GNOME displays a notification before suspending. If the display is
currently blanked, GNOME lights it up to display the message. With the
original patch in place DPMS unblank also resets the device idle times, thus
restarting the timeout ad infinitum.

Switch this to a more suggestive SCREENSAVER_OFF(ScreenSaverReset). This keeps
the symmetry in blanking mode (DPMS and screensaver turn each other on/off as
expected) but does not reset the idle time on the devices.

https://bugzilla.gnome.org/show_bug.cgi?id=731241

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-By: Egbert Eich <eich@freedesktop.org>
10 years agoos: prevent negative array index access (#80890)
Peter Hutterer [Sun, 6 Jul 2014 22:27:44 +0000 (08:27 +1000)]
os: prevent negative array index access (#80890)

If an empty string is provided to LogMessageVerbSigSafe, the length of the
printed string is 0.

Read-only access only and the only effect it had was adding a linebreak or not.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoMerge remote-tracking branch 'jturney/master'
Keith Packard [Mon, 7 Jul 2014 23:53:07 +0000 (16:53 -0700)]
Merge remote-tracking branch 'jturney/master'

10 years agoUpdate to version 1.15.99.904
Keith Packard [Mon, 7 Jul 2014 23:28:26 +0000 (16:28 -0700)]
Update to version 1.15.99.904

One more RC to get the non-PCI patches tested before release

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: Make error message more readable
Thierry Reding [Thu, 13 Feb 2014 20:09:49 +0000 (21:09 +0100)]
xfree86: Make error message more readable

While at it also replace a tab by four spaces for consistency.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
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>
10 years agoxfree86: Support driver loading via OutputClass
Thierry Reding [Thu, 13 Feb 2014 12:54:23 +0000 (13:54 +0100)]
xfree86: Support driver loading via OutputClass

Use the OutputClass configuration to determine what drivers to autoload
for a given device.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: Introduce OutputClass configuration
Thierry Reding [Thu, 13 Feb 2014 12:42:05 +0000 (13:42 +0100)]
xfree86: Introduce OutputClass configuration

The OutputClass section provides a way to match output devices to a set
of given attributes and configure them. For now, only matching by kernel
driver name is supported. This can be used to determine what DDX module
to load for non-PCI output devices. DDX modules can ship an xorg.conf.d
snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this:

Section "OutputClass"
    Identifer "NVIDIA Tegra open-source driver"
    MatchDriver "tegra"
    Driver "opentegra"
EndSection

This will cause any device that's driven by the kernel driver named
"tegra" to use the "opentegra" DDX module.

See the OUTPUTCLASS section in xorg.conf(5) for more details.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: Store kernel driver name in platform device attribute
Thierry Reding [Wed, 12 Feb 2014 15:43:29 +0000 (16:43 +0100)]
xfree86: Store kernel driver name in platform device attribute

When opening a DRM device, query the version and store the driver name
as a new attribute for future reference.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
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>
10 years agoxfree86: Make driver matching consistent
Thierry Reding [Fri, 14 Feb 2014 14:45:33 +0000 (15:45 +0100)]
xfree86: Make driver matching consistent

Most of the driver enumeration functions take an array and a maximum
number of entries that they are allowed to fill in. Upon success, they
return the number of entries filled in. This allows them to be easily
used to consecutively.

One exception is the xf86MatchDriverFromFiles() function, which doesn't
return a value, so callers have to manually search the array for the
first empty entry.

This commit modifies the xf86MatchDriverFromFiles() to behave the same
way as others, which makes it easier to deal with.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com> (on arm / platform device)
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoglamor: Fix stack corruption in glamor_init
Tomasz Borowik [Thu, 3 Jul 2014 20:04:44 +0000 (13:04 -0700)]
glamor: Fix stack corruption in glamor_init

glGet on GL_MAX_VIEWPORT_DIMS returns two values

Reviewed-by: Markus Wick <markus@selfnet.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agofb: Don't free NULL pixmap in fbCloseScreen. Bug #80313
Keith Packard [Thu, 26 Jun 2014 21:12:24 +0000 (14:12 -0700)]
fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313

We fixed fbCloseScreen to use the FreePixmap function so that the
private counts would be updated correctly during CloseScreen. Xvfb
calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is
called; not checking devPrivate before calling would result in a NULL
pointer dereference.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
10 years agohw/xwin: link dynamically and export symbols
Yaakov Selkowitz [Sun, 6 Apr 2014 09:47:15 +0000 (04:47 -0500)]
hw/xwin: link dynamically and export symbols

With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
10 years agoexa: Fix a warning when enabling DEBUG_TRACE_FALL
Thierry Reding [Wed, 25 Jun 2014 14:03:29 +0000 (16:03 +0200)]
exa: Fix a warning when enabling DEBUG_TRACE_FALL

The format string wants a picture and a character, but the argument list
contains only a character, causing GCC to complain. Add the missing
argument.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxwayland: Add glamor and DRI3 support
Kristian Høgsberg [Mon, 16 Jun 2014 18:34:55 +0000 (11:34 -0700)]
xwayland: Add glamor and DRI3 support

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoRevert "glamor: Fix coordinates handling for composite source/mask pictures"
Michel Dänzer [Tue, 24 Jun 2014 07:09:19 +0000 (16:09 +0900)]
Revert "glamor: Fix coordinates handling for composite source/mask pictures"

This reverts commit 4e9aabb6fc15d8052934f20c6a07801c197ec36a.

It broke kwin decorations with XRender compositing.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodri2: Invalidate DRI2Buffers upon SetWindowPixmap updates
Chris Wilson [Tue, 10 Jun 2014 06:45:05 +0000 (07:45 +0100)]
dri2: Invalidate DRI2Buffers upon SetWindowPixmap updates

When transitioning to a redirected or unredirected Window, the Composite
layer modifies the Window's Pixmap. However, the DRI2Buffer for the
Drawable is still pointing to the backing bo of the old Pixmap with the
result that rendering goes astray.

This now also effects DRI2 Drawables that are touched by PresentPixmap.

v2: Fixup the function name after rebasing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Reinis Danne <reinis.danne@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodri2: Use the PrimeScreen when creating/reusing buffers
Chris Wilson [Wed, 18 Jun 2014 10:14:43 +0000 (11:14 +0100)]
dri2: Use the PrimeScreen when creating/reusing buffers

This fixes a segfault when we attempt to call ds->ReuseBufferNotify()
passing a Prime DRI2BufferPtr to the master backend.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80001
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoglamor: Fix GLES2 non-VBO temporary memory allocation.
Eric Anholt [Mon, 16 Jun 2014 07:06:53 +0000 (08:06 +0100)]
glamor: Fix GLES2 non-VBO temporary memory allocation.

We'd get a request for like 16 bytes, claim to have allocated
GLAMOR_VBO_SIZE, and then not reallocate when something a request
bigger than 16 came along.  The intent was to always allocate at least
GLAMOR_VBO_SIZE.

Fixes segfaults with Xephyr -glamor_gles2 and running gnome-terminal.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Mon, 23 Jun 2014 21:18:03 +0000 (14:18 -0700)]
Merge remote-tracking branch 'whot/for-keith'

10 years agopresent: fix bad logic in cancelling scheduled operations.
Axel Davy [Thu, 19 Jun 2014 02:22:09 +0000 (22:22 -0400)]
present: fix bad logic in cancelling scheduled operations.

If we present several pixmaps in advance for different msc, the later one
shouldn't cancel the previous ones.

This reverts a change made by commit
e6f5d9d7b7efdacea0f22f1808efca849bcede4c

Without this fix, vblank_mode=0 glxgears doesn't update
with the present fallback.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoarch: Fix image and bitmap byte order for ppc64le
Dinar Valeev [Mon, 24 Feb 2014 10:36:54 +0000 (11:36 +0100)]
arch: Fix image and bitmap byte order for ppc64le

So far PPC was big endian for sure. For ppc64le this is no longer
true.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'anholt/glamor-fixes'
Keith Packard [Mon, 23 Jun 2014 20:50:54 +0000 (13:50 -0700)]
Merge remote-tracking branch 'anholt/glamor-fixes'

10 years agopresent: restore screen pixmap when aborting a flip
Frank Binns [Tue, 10 Jun 2014 12:43:31 +0000 (13:43 +0100)]
present: restore screen pixmap when aborting a flip

If a 2D application is started on top of a fullscreen 3D application, which
is flipping, then we need to stop flipping and restore the root window, and
possibly the flip window, to using the screen pixmap. Normally this would
be done as part of an unflip. However, in the case that there is a pending
flip there is no mechanism to abort so the unflip is deferred until the
pending flip completes. This provides a window of opportunity for the 2D
application to draw to the wrong pixmap.

Restore the screen pixmap at the point a pending flip is marked as aborted,
thus avoiding this issue.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodix: fix up coordinate scaling when external monitors are present
Peter Hutterer [Thu, 29 May 2014 23:56:37 +0000 (09:56 +1000)]
dix: fix up coordinate scaling when external monitors are present

The goal of all this is to get an x/y motion reflecting the motion
on the device, i.e. a circle on the device is a circle on the screen.

This is currently done by scaling the y coordinate depending on the screen
ratio vs device ratio. Depending on that ratio the movement on the y axis may
be accelerated (ratio < 1) or slowed (ratio > 1). This leads to the weird
effect that changing the screen ratio by plugging a new monitor changes the
speed of the touchpad.

Use a different algorithm: calculate the physical movement on the device, map
that to the same-ish distance on the screen, then convert that back into a
device-specific vector. This way we get the same mapping regardless of the
current screen dimensions.

Since the pointer accel code doesn't take device resolution into account, make
sure we apply our crazy mapping before we accelerate. This way we accelerate
resolution-independent.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agopresent: Remove executing vblank from window list. Bug# 79709.
Keith Packard [Tue, 17 Jun 2014 22:50:48 +0000 (15:50 -0700)]
present: Remove executing vblank from window list. Bug# 79709.

Once the vblank is actually getting executed, it's lifetime is no
longer tied to the window, and so it shouldn't be controlled by window
destruction. In particular, if the vblank is queued for flip, it will
get stored in the flip_pending field, and will be correctly destroyed
when the flip completes.

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoglamor: Don't leak a prepare_access_gc() in putimage fallbacks.
Eric Anholt [Fri, 30 May 2014 17:39:30 +0000 (10:39 -0700)]
glamor: Don't leak a prepare_access_gc() in putimage fallbacks.

It turns out putimage doesn't use the GC tile or stipple anyway, so
there's no need to do this.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agoglamor: Choose max fbo size by texture + viewport size
Markus Wick [Wed, 14 May 2014 21:08:18 +0000 (23:08 +0200)]
glamor: Choose max fbo size by texture + viewport size

The max size of renderbuffers and texture often match by accident, but
as we always use textures, we should check for the right flag.  Also
check for viewport size as this may be lower and we want to render to
almost every pixmap.

Signed-off-by: Markus Wick <markus@selfnet.de>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agoglamor: Fix no-mipmap allocations
Markus Wick [Wed, 14 May 2014 21:08:17 +0000 (23:08 +0200)]
glamor: Fix no-mipmap allocations

With GL_TEXTURE_MIN_FILTER, we configure not to use mipmaps, but
there's no real way until GL_ARB_texture_storage to dictate whether
memory should be allocated for mipmap levels or not.

GL_TEXTURE_MAX_LEVEL is a stronger hint to the driver than the
filtering that we really don't want mipmap allocations.  Stops VARM
wasting warnings from the nvidia driver.

Signed-off-by: Markus Wick <markus@selfnet.de>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agoconfig: show default path in help for --with-xkb-bin-directory
Alan Coopersmith [Sat, 7 Jun 2014 00:54:22 +0000 (17:54 -0700)]
config: show default path in help for --with-xkb-bin-directory

Now shows:
  --with-xkb-bin-directory=DIR
                          Directory containing xkbcomp program (default:
                          ${bindir})

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agomi: Build fix: mieqProcessDeviceEvent returns void
Jeremy Huddleston Sequoia [Fri, 6 Jun 2014 03:38:44 +0000 (20:38 -0700)]
mi: Build fix: mieqProcessDeviceEvent returns void

mieq.c:520:9: error: void function 'mieqProcessDeviceEvent' should not return a value [-Wreturn-type,Semantic Issue]
        return 0;
        ^      ~
1 error generated.

Regression-from: 9fb08310b51b46736f3ca8dbc04efdf502420403
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoUpdate to version 1.15.99.903
Keith Packard [Thu, 5 Jun 2014 05:28:57 +0000 (22:28 -0700)]
Update to version 1.15.99.903

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agomi: don't process events from disabled devices (#77884)
Peter Hutterer [Wed, 21 May 2014 00:07:31 +0000 (10:07 +1000)]
mi: don't process events from disabled devices (#77884)

Once a device is disabled, it doesn't have a sprite pointer anymore. If an
event is still in the queue and processed after DisableDevice finished, a
dereference causes a crash. Example backtrace (crash forced by injecting an
event at the right time):

(EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f]
(EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240]
(EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389]
(EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720]
(EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58]
(EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457]
(EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7]
(EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb]
(EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6]
(EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748]
(EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9]
(EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28]
(EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65]
(EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69]
(EE) 15: ? (?+0x29) [0x29]

xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and
DisableDevice() calls mieqProcessInputEvents() again when flushing touches and
button events. Between that and disabling the device (which causes new events
to be refused) there is a window where events may be triggered and enqueued.
On the next call to PIE that event is processed on a now defunct device,
causing the crash.

The simplest fix to this is to discard events from disabled devices. We flush
the queue often enough before disabling that when we get here, we really don't
care about the events from this device.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agopresent: Queue flips for later execution
Keith Packard [Mon, 27 Jan 2014 19:23:58 +0000 (11:23 -0800)]
present: Queue flips for later execution

When a flip (or unflip) is pending and a flip request comes in, leave
it queued until the pending flip completes and then execute it.

This fixes a bug where an application submitting back-to-back
present_pixmap requests for sequential frames would alternate between
flipping and copying as the pending flip would cause the new
present_pixmap request to not use a flip.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Frank Binns <frank.binns@imgtec.com>
10 years agoxfixes: disable cursor on X server reset
Frank Binns [Thu, 24 Apr 2014 10:37:48 +0000 (11:37 +0100)]
xfixes: disable cursor on X server reset

The initial state of the cursor is set to disabled but this was
never be re-disabled during X server reset. This meant any
application run after an X server reset would have the cursor
displayed even if it hadn't requested this to be the case.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodix: fix pixmap leak on server reset
Brendan King [Thu, 24 Apr 2014 10:37:47 +0000 (11:37 +0100)]
dix: fix pixmap leak on server reset

The server is leaking a pixmap (created by CreateDefaultStipple()) on
reset. The leak is caused by some X Server graphics contexts not being
freed on reset by the machine independent cursor code in the server,
which in turn is caused by the cursor cleanup code
(miSpriteDeviceCursorCleanup()) not being called.

Ensures the DeviceCursorCleanup() function is called when the associated
input device is closed on server reset.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodix: reference the cursor just once in InitializeSprite()
Brendan King [Thu, 24 Apr 2014 10:37:46 +0000 (11:37 +0100)]
dix: reference the cursor just once in InitializeSprite()

The new current cursor was being referenced twice, resulting in a
memory leak when the current server generation ended.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agofb: fix screen pixmap leak on server reset
Brendan King [Thu, 24 Apr 2014 10:37:45 +0000 (11:37 +0100)]
fb: fix screen pixmap leak on server reset

Call FreePixmap() instead of free() to destroy the screen pixmap in
fbCloseScreen().

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: Report Present as a built-in module
Chris Wilson [Wed, 28 May 2014 07:14:00 +0000 (08:14 +0100)]
xfree86: Report Present as a built-in module

This is so that drivers can do a runtime check that Present is available,
similar to existing runtime checks performed by the drivers for DRI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: Report DRI3 as a built-in module
Chris Wilson [Wed, 28 May 2014 07:13:59 +0000 (08:13 +0100)]
xfree86: Report DRI3 as a built-in module

This is so that drivers can do a runtime check that DRI3 is available,
similar to existing runtime checks performed by the drivers for DRI and
DRI2.

v2: Only add DRI3 to the list if the module was actually built into the
server (Mark Kettenis).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'jturney/master'
Keith Packard [Mon, 2 Jun 2014 20:08:23 +0000 (13:08 -0700)]
Merge remote-tracking branch 'jturney/master'

10 years agoxtensa: add support for xtensa architecture
Max Filippov [Sun, 1 Jun 2014 21:17:31 +0000 (01:17 +0400)]
xtensa: add support for xtensa architecture

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'jeremyhu/master'
Keith Packard [Mon, 2 Jun 2014 18:30:24 +0000 (11:30 -0700)]
Merge remote-tracking branch 'jeremyhu/master'

10 years agoxfree86: Add "modesetting" to list of fallback drivers
Søren Sandmann [Fri, 30 May 2014 20:50:35 +0000 (16:50 -0400)]
xfree86: Add "modesetting" to list of fallback drivers

To make X -configure work properly, the output of fixup_video_driver_list()
should be in order of preference. Otherwise, the config file may use
the incorrect driver for some devices.

In particular, the drivers that work for all (or many) devices need to be
last in the list. Since the modesetting driver works for many devices,
it needs to be considered a fallback driver.

Signed-off-by: Søren Sandmann <ssp@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Mon, 2 Jun 2014 18:22:48 +0000 (11:22 -0700)]
Merge remote-tracking branch 'whot/for-keith'

10 years agoFix overflow checking extension versions
Robert Ancell [Wed, 21 May 2014 22:43:52 +0000 (10:43 +1200)]
Fix overflow checking extension versions

The easiest way to check for the version of an extension is to send the maximum
possible version numbers in the QueryVersion request. The X server overflows on
these as it assumes you will send a reasonable version number.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoconfigure: Require sufficiently new wayland-client for xwayland ddx
Adam Jackson [Wed, 21 May 2014 13:22:49 +0000 (09:22 -0400)]
configure: Require sufficiently new wayland-client for xwayland ddx

The explicit release requests were added in 1.3.0, don't try to build
against older.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoconfigure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used
Jon TURNEY [Sat, 5 Apr 2014 14:15:46 +0000 (15:15 +0100)]
configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used

Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from
xwin-config.h.in for some reason, but it is used.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
10 years agohw/xwin: Update for __glXLastContext -> lastGLContext
Jon TURNEY [Sun, 27 Apr 2014 19:55:51 +0000 (20:55 +0100)]
hw/xwin: Update for __glXLastContext -> lastGLContext

Update for __glXLastContext -> lastGLContext.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
10 years agoXQuartz: Update logic to account for title bar on every display in Mavericks
Jeremy Huddleston Sequoia [Sun, 1 Jun 2014 00:45:02 +0000 (17:45 -0700)]
XQuartz: Update logic to account for title bar on every display in Mavericks

<rdar://problem/14205847>
http://xquartz.macosforge.org/trac/ticket/832

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
10 years agoXQuartz: Dead code removal (ENABLE_DEBUG_LOG)
Jeremy Huddleston Sequoia [Sun, 1 Jun 2014 00:22:51 +0000 (17:22 -0700)]
XQuartz: Dead code removal (ENABLE_DEBUG_LOG)

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
10 years agoXQuartz: Bump to 2.7.7
Jeremy Huddleston Sequoia [Sat, 31 May 2014 20:04:43 +0000 (13:04 -0700)]
XQuartz: Bump to 2.7.7

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
10 years agoman: drop specific mention of DontZap in -retro (#71113)
Peter Hutterer [Sat, 24 May 2014 10:05:53 +0000 (20:05 +1000)]
man: drop specific mention of DontZap in -retro (#71113)

DontZap off is the default anyway, don't mention it specifically to avoid
confusion

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoxfree86: fix wrong DontZap documentation (#71113)
Peter Hutterer [Sat, 24 May 2014 10:02:56 +0000 (20:02 +1000)]
xfree86: fix wrong DontZap documentation (#71113)

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoFix overflow checking extension versions
Robert Ancell [Wed, 21 May 2014 22:43:52 +0000 (10:43 +1200)]
Fix overflow checking extension versions

The easiest way to check for the version of an extension is to send the maximum
possible version numbers in the QueryVersion request. The X server overflows on
these as it assumes you will send a reasonable version number.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agoglx: Require at least one True/DirectColor visual
Adam Jackson [Thu, 27 Sep 2012 21:44:42 +0000 (17:44 -0400)]
glx: Require at least one True/DirectColor visual

Mesa no longer supports rendering to anything less.  GLX 1.2 requires
that the server advertise at least one GLX visual.  GLX 1.3 and 1.4 are
more subtle: they require at least one fbconfig capable of window
rendering, and _also_ require that window-capable fbconfigs have a
non-zero value for the GLX_VISUAL_ID.  In either case we should refuse
to init GLX if there's not at least one GL-capable visual on at least
one screen.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoXi: block SIGIOs while copying device classes around
Steven McDonald [Sun, 18 May 2014 11:42:08 +0000 (13:42 +0200)]
Xi: block SIGIOs while copying device classes around

I've been seeing sporadic (anywhere from once every few days to 3-4
times a day) crashes and freezes in X. The problematic behaviour isn't
always the same, but I chose a particular incident to debug, and found
that X was segfaulting in updateMotionHistory, on line 575 of
dix/getevents.c.

After some further investigation, I found that the bug was being
triggered when a SIGIO was received in DeepCopyPointerClasses, between
the AllocValuatorClass call (line 540) and updating the to->valuator
pointer (line 545). AllocValuatorClass calls realloc() on to->valuator,
so between these lines, it's not guaranteed to point to allocated
memory.

It seems the SIGIO handler is calling updateMotionHistory, which is
reading the memory pointed to by to->valuator and getting a wrong value
for last_motion, which updates buff to point to wildly the wrong place
and thus generates a segfault when a memcpy() is done into buff.

I am attaching a patch which I've been running on that machine for the
past three days, and haven't yet observed any more crashing or freezing
behaviour. The patch simply calls OsBlockSIGIO while
DeepCopyDeviceClasses is in progress, as the state of the X server's
device data structures is not guaranteed to be in a consistent state
during that time.

Debian bug#744303 <https://bugs.debian.org/744303>

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoos: automatically switch to sigsafe logging when needed
Peter Hutterer [Wed, 7 May 2014 23:39:36 +0000 (09:39 +1000)]
os: automatically switch to sigsafe logging when needed

If we're smart enough to warn, we should be smart enough to just pass it
through to the right function. Worst case we lose some formatting specifiers
which pnprintf will complain about anyway. And in most cases it won't matter.

This requires renaming pnprintf to vpnprintf and changing the size_t to int to
be compatible with Xvscnprintf. pnprintf is internal only, the others are
exported API so we can't change them as easily.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agoshadowfb: Fix initialization
Adam Jackson [Wed, 21 May 2014 13:23:19 +0000 (09:23 -0400)]
shadowfb: Fix initialization

This has to run at initial CreateWindow time, at CreateScreenResources
the root window doesn't actually exist yet.

Tested-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoglxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)
Adam Jackson [Wed, 30 Apr 2014 17:49:06 +0000 (13:49 -0400)]
glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)

v2: Fix another path spotted by keithp

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodmx: Fix memory leak in dmxBELoadFont (#50281)
Adam Jackson [Wed, 30 Apr 2014 17:49:05 +0000 (13:49 -0400)]
dmx: Fix memory leak in dmxBELoadFont (#50281)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodri2: Fix detection of wrong prime_id in GetScreenPrime.
Michal Srb [Tue, 15 Apr 2014 15:54:35 +0000 (18:54 +0300)]
dri2: Fix detection of wrong prime_id in GetScreenPrime.

Checking the iterating variable ("slave") against null can not detect if the
xorg_list_for_each_entry finished without break being invoked - slave variable
will be always non-null. This caused segfault whenever someone tried to use
DRI_PRIME with incorrect id while having at least one render offloading slave
configured.

Restructurize the GetScreenPrime to work as expected.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoARC: Add support for ARC architecture
Alexey Brodkin [Thu, 1 May 2014 12:39:29 +0000 (15:39 +0300)]
ARC: Add support for ARC architecture

Xorg server could be built for and run on Synopsys DesignWare ARC cores.
These changes are required for successful building and execution of the server.

Both little-endian and big-endian flavors of ARC cores are supported.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Egbert Eich <eich@freedesktop.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoconfig: revert quirk for the Evoluent Vertical Mouse
Peter Hutterer [Wed, 14 May 2014 00:32:30 +0000 (10:32 +1000)]
config: revert quirk for the Evoluent Vertical Mouse

This quick makes the mouse behaviour more obvious (LMR buttons generate LMR
events) but goes against the manufacturer's intended defaults:

    Top button - left click.
    Wheel button - .middle click (e.g., for pan and rotate in CAD programs).
    Middle button - right click.
    Bottom button - back.
    Thumb button - forward.

from http://www.evoluent.com/vm3.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agorrcrtc: brackets are hard, lets go shopping.
Dave Airlie [Mon, 12 May 2014 21:55:04 +0000 (14:55 -0700)]
rrcrtc: brackets are hard, lets go shopping.

Slaving two outputs on a secondary GPU to a primary GPU testing
picked this up, in that we'd try to resize to the totally the
wrong thing, then as usual segfault in the rotation code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoglamor: Don't forget to check whether we can fall back in polysegment.
Eric Anholt [Tue, 6 May 2014 00:01:14 +0000 (17:01 -0700)]
glamor: Don't forget to check whether we can fall back in polysegment.

Part of the _nf contract is that glamor will only return FALSE if
glamor has checked that UXA can actually map the pixmaps (UXA only
allocates the BO itself in the screen pixmap and DRI2 cases, and can't
map it otherwise).  Fixes server segfaults zooming in and out of
libreoffice spreadsheets.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoxfree86: fix warnings after MatchSeat patch
Laércio de Sousa [Fri, 9 May 2014 12:09:16 +0000 (09:09 -0300)]
xfree86: fix warnings after MatchSeat patch

This patch fixes some compile warnings that arise after
commit 7070ebeebaca1b51f8a2801989120784a1c374ae
(xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout")
available at git repository
git://people.freedesktop.org/~whot/xserver for-keith

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoglamor: Stop disabling asserts by default.
Eric Anholt [Thu, 8 May 2014 15:45:22 +0000 (08:45 -0700)]
glamor: Stop disabling asserts by default.

Disabling asserts is something the user gets to manage.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoXi: don't copy a DeviceEvent into an InternalEvent
Peter Hutterer [Tue, 29 Apr 2014 06:52:01 +0000 (16:52 +1000)]
Xi: don't copy a DeviceEvent into an InternalEvent

==26141== Invalid read of size 8
==26141==    at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484)

An InternalEvent is bigger than a DeviceEvent, thus copying one to the other
reads past the allocated boundary. Shouldn't have any real effect since we
shouldn't access anything past the DeviceEvent boundary if the event type is
correct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agomi: start calculating the sprite trace from the first child of root
Peter Hutterer [Wed, 30 Apr 2014 00:55:26 +0000 (10:55 +1000)]
mi: start calculating the sprite trace from the first child of root

Introduced in
73698d41e41ce76bef2d9a90b46ac0c24ae148dd "Make XYToWindow a screen function"

Moving the code into miwindow.c changed the start of the loop from
RootWindow()->firstChild to DeepestSpriteWindow(). This function is only
supposed to be called from miXYToWindow which resets spriteTraceGood to 1,
thus DeepestSpriteWindow() is always the root window anyway.
What got dropped was the firstChild as the first window to handle, so we may
end up with the root window twice in the sprite trace.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
10 years agoMerge commit 'who/for-keith'
Keith Packard [Thu, 8 May 2014 19:58:41 +0000 (12:58 -0700)]
Merge commit 'who/for-keith'

Skipping two unreviewed patches; will mark them reviewed and cherry pick

10 years agoglamor: Publish change_window_attributes and copy_window
Keith Packard [Fri, 25 Apr 2014 22:07:03 +0000 (15:07 -0700)]
glamor: Publish change_window_attributes and copy_window

Because uxa doesn't just use glamor directly, it keeps these two
functions from being wrapped so that they get called
automatically. Publishing these will allow uxa to call them directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agoglamor: Work around libXfont when it fails to use defaultChar
Keith Packard [Sat, 26 Apr 2014 03:25:56 +0000 (20:25 -0700)]
glamor: Work around libXfont when it fails to use defaultChar

GetGlyphs is supposed to always return the full list of characters
when there is a default character available. However, if an
application opens a 16-bit two dimensional font and then draws with
8-bit requests, the bitmapGetGlyphs function in libXfont versions up
through 1.4.7 will return zero glyphs if there is no 0th row.

While this is a bug in libXfont and should be fixed there, it's easy
to protect glamor from it by simply falling through to the case that
handles GetGlyphs failures for fonts without a default character.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agoglamor: Fix uxa-entry point for ImageText16
Keith Packard [Sat, 26 Apr 2014 06:38:35 +0000 (23:38 -0700)]
glamor: Fix uxa-entry point for ImageText16

Was interpreting the incoming chars as 8-bits instead of 16-bits,
resulting in the wrong characters being drawn.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
10 years agosystemd-logind: let the logind code decided whether to close an fd
Peter Hutterer [Fri, 2 May 2014 04:14:58 +0000 (14:14 +1000)]
systemd-logind: let the logind code decided whether to close an fd

We can only request one fd per device from systemd-logind. If a fd is re-used
by the same device, releasing the fd from one device doesn't mean we can close
it. The systemd code knows when it's really released, so let it close the fd.

Test case: xorg.conf section for an input device with hotplugging enabled.
evdev detects the duplicate and closes the hotplugged device, which closes the
fd. The other instance of evdev thinks the fd is still valid so now you're
playing a double lottery. First, which client(s) will get the evdev fd?
Second, which requests will be picked up by evdev and which ones will be
picked up by the client? You'll never know, but the fun is in finding out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
10 years agohw/xfree86: Video Driver ABI version 18.0
Keith Packard [Wed, 30 Apr 2014 16:32:29 +0000 (09:32 -0700)]
hw/xfree86: Video Driver ABI version 18.0

With the change in the cursor interface in
4c3932620c29c91dfbbc8eb09c84efcaa7ec873e, we need to bump the video
driver ABI number to ensure that drivers are rebuilt to match the new
interface.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
10 years agoxfree86: add short description about MatchSeat key in xorg.conf man page
Laércio de Sousa [Thu, 3 Apr 2014 14:19:15 +0000 (11:19 -0300)]
xfree86: add short description about MatchSeat key in xorg.conf man page

Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoxfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerL...
Oleg Samarin [Thu, 3 Apr 2014 14:19:14 +0000 (11:19 -0300)]
xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout"

This patch introduces a new key MatchSeat in xorg.conf (also applies to
any .conf file in xorg.conf.d). It will allow targeting a given
"Device", "Screen", and/or "ServerLayout" section to a particular
seat only (specified by option "-seat" in X server command line),
so that other seats won't be affected.

Without this patch, one needs to write a separate xorg.conf.custom
file and pass it to X server via "-config" option, if one wants that
these settings only apply for the right seat. However, in some cases,
this solution is undesirable or even impossible (e.g. when using GDM,
which doesn't allow X server command line customization).

Example file (/etc/X11/xorg.conf.d/seat1.conf), which would be ignored
by X server unless it was started with "-seat seat1" option:

Section "Device"
    Identifier "card0"
    Driver "nvidia"
    Option "NoLogo" "True"
    MatchSeat "seat1"
EndSection

Signed-off-by: Oleg Samarin <osamarin68@gmail.com>
Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoxfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers...
Laércio de Sousa [Thu, 3 Apr 2014 14:19:13 +0000 (11:19 -0300)]
xfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers (#66851)

Currently non-seat0 X servers only probe platform bus for graphics devices,
which is OK for most KMS-compliant drivers. However, for non-KMS drivers
(like NVIDIA proprietary ones), graphics devices can't be reached
by platform bus probe, resulting in a "No devices detected" error.

This patch allows a fallback to PCI bus probe for non-seat0 X servers
in case no platform bus graphics device is found.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851

Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoos: Add -displayfd into -help text
Robert Ancell [Tue, 22 Apr 2014 20:19:35 +0000 (08:19 +1200)]
os: Add -displayfd into -help text

Add -displayfd into -help text. It was mentioned in the man page but seem to have been missed from the -help text.

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoselinux: don't checkout for AVCs on select() EINTR
Ray Strode [Thu, 24 Apr 2014 17:38:29 +0000 (13:38 -0400)]
selinux: don't checkout for AVCs on select() EINTR

wakeup handlers are called even when select() returns EINTR,
and when they're called the passed fd set is undefined.

This commit fixes the selinux wakeup handler to avoid checking
for AVCs over the netlink socket spuriously.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ray Strode <rstrode@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agodbus: don't dispatch dbus events on select() EINTR
Ray Strode [Thu, 24 Apr 2014 17:38:28 +0000 (13:38 -0400)]
dbus: don't dispatch dbus events on select() EINTR

wakeup handlers are called even when select() returns EINTR,
and when they're called the passed fd set is undefined.

This commit fixes the dbus wakeup handler to avoid dispatching
into dbus spuriously.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ray Strode <rstrode@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoMerge remote-tracking branch 'whot/for-keith'
Keith Packard [Tue, 29 Apr 2014 16:37:37 +0000 (09:37 -0700)]
Merge remote-tracking branch 'whot/for-keith'

10 years agodix: remove a now-superfluous comment
Peter Hutterer [Sun, 27 Apr 2014 21:57:00 +0000 (07:57 +1000)]
dix: remove a now-superfluous comment

Obsolete since 93945b0a74aa8156a88f52b8ba77f1210042f396

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoinput: Remove invalid bug checks.
Michal Srb [Wed, 2 Apr 2014 14:14:05 +0000 (17:14 +0300)]
input: Remove invalid bug checks.

Commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 added several bug checks. Some
of them are not correct.

Checks in Init(Ptr|String|Bell|Led|Integer)FeedbackClassDeviceStruct verify
that no feedback struct was set yet, but that is not required. If any feedback
structs are already present, the function will chain them behind the new one.

Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
10 years agoxfree86: int10: Fix build on ARM
Thierry Reding [Wed, 12 Feb 2014 16:11:40 +0000 (17:11 +0100)]
xfree86: int10: Fix build on ARM

Commit 7353ec7cb6fc235b03e59e35425201429c83ee72 "xfree86: Switch int10
code to stdint types" uses designated initializers to setup the fields
of the X86EMU_pioFuncs.

This breaks compilation on ARM, since out{b,w,l}() are redefined using
the preprocessor and therefore cause the compiler to complain about
non-existent fields being assigned to.

It seems like the compiler.h header that contains these redefinitions
isn't actually needed in xf86x86emu.c, so the easiest "fix" is to not
include it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
10 years agoint10: fix build error
Rob Clark [Thu, 3 Apr 2014 19:35:53 +0000 (15:35 -0400)]
int10: fix build error

Fixes:

  stub.c:66:1: error: conflicting types for 'xf86int10Addr'
  In file included from stub.c:14:0:
  xf86int10.h:72:53: note: previous declaration of 'xf86int10Addr' was here

Signed-off-by: Rob Clark <robdclark@gmail.com>
10 years agodefault to stub int10 implementation on arm
Rob Clark [Thu, 3 Apr 2014 18:54:02 +0000 (14:54 -0400)]
default to stub int10 implementation on arm

There should be no reason to need a real int10 implementation on arm,
and switching to stub is an easy way to fix:

  xf86x86emu.c: In function 'xf86Int10ExecSetup':
  xf86x86emu.c:56:9: error: unknown field 'xf_outb' specified in initializer
  xf86x86emu.c:57:9: error: unknown field 'xf_outw' specified in initializer
  xf86x86emu.c:58:9: error: unknown field 'xf_outl' specified in initializer

which is caused by the following in compiler.h:

  #define outb xf_outb
  #define outw xf_outw
  #define outl xf_outl

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
10 years agohw/xfree86: Restore API compatibility for cursor loading functions
Keith Packard [Fri, 25 Apr 2014 15:22:15 +0000 (08:22 -0700)]
hw/xfree86: Restore API compatibility for cursor loading functions

Create load_cursor_image_check, load_cursor_argb_check,
LoadCursorImageCheck and LoadCursorARGBCheck that can return failure
and use them in preference to the old unchecked variants.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Michael Thayer <michael.thayer@oracle.com>