Commit Graph

15077 Commits

Author SHA1 Message Date
Adam Jackson
b25f7d0c16 Merge commit '1ba4fde1015fc6da19dfbfdf0f77f1071416e215'
This is ofourdan/xwayland, minus:

    xwayland: Always update the wl_pointer cursor on pointer focus

which was rejected for ABI and design issues.
2015-09-21 17:34:48 -04:00
Keith Packard
db1089eafc os/xdmcp: Just send XDMCP keepalive packets once every three minutes
There was a complicated scheme to increase the time between keepalives
from 3 minutes up to as much as 24 hours in an attempt to reduce
network traffic from idle X terminals. X terminals receiving X
traffic, or receiving user input would use the 3 minute value; X
terminals without any network traffic would use a longer value.

However, this was actually broken -- any activity in the X server,
either client requests or user input, would end up resetting the
keepalive timeout, so a user mashing on the keyboard would never
discover that the XDMCP master had disappeared and have the session
terminated, which was precisely the design goal of the XDMCP keepalive
mechanism.

Instead of attempting to fix this, accept the cost of a pair of XDMCP
packets once every three minutes and just perform keepalives
regularly.

This will also make reworking the block and wakeup handler APIs to
eliminate select masks easier.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-21 15:02:34 -04:00
Keith Packard
a3a4029133 os/xdmcp: Remove dead 'restart' code
The X server used to wait for the user to hit a key or move the mouse
before restarting the session after a keepalive failure. This,
presumably, was to avoid having the X server continuously spew XDMCP
protocol on the network while the XDM server was dead.

Switching into this state was removed from the server some time before
XFree86 4.3.99.16, so the remaining bits of code have been dead for
over a decade, and no-one ever noticed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-21 15:02:24 -04:00
Egbert Eich
3cd7d33380 randr: Remove senseless checks for xf86RandR12Key
When xf86RandR12Key is not set we will not get to the places where
these tests are done as the functions in question are not called.
In most cases we would have crashed before these checks anyway.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-21 14:44:10 -04:00
Chris Wilson
245040f0d0 randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmap
As we define sizeFits based on whether a CRTC is active, and skip trying
to redirect the scanout on a disable pipe, we then attempt to undo it
later and fail because crtc->scanout_pixmap != DRI2_Pixmap and
!sizeFits. Paper over this failure by skipping unredirected CRTC when
disabling.

v2: Unwind upon failure

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Reported-by: Christoph Haag <haagch@frickel.club>
Tested-by: Christoph Haag <haagch@frickel.club>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-21 14:42:51 -04:00
Alan Coopersmith
9d65a0de95 Remove DECnet from Xserver.man
DECnet support died in modularization (X11R7.0)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-21 14:18:52 -04:00
Aaron Plattner
82eb490b0a privates: Clear screen-specific keys during CloseScreen
The modesetting driver corrupts memory when used after a server regeneration
because not enough memory is allocated for its pixmap privates.  This happens
because its call to dixRegisterScreenSpecificPrivateKey() does nothing because
key->initialized is still TRUE from the first server generation.  However, the
key is not in the screen's linked list of screen-specific privates because
that's freed and reallocated during the server generation loop in dix_main().

Fix this by clearing key->initialized before CloseScreen and add a call to
dixFreeScreenSpecificPrivates() for GPU screens.

v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates()
calls to after CloseScreen.

v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-21 14:18:51 -04:00
Jasper St. Pierre
18a93da9b1 test/xi1: Update .gitignore
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-09-21 14:17:48 -04:00
Jon TURNEY
cdd1d58159 mingw: Fix NO_LOCAL_CLIENT_CRED build
Commit 4b4b9086 "os: support new implicit local user access mode [CVE-2015-3164
2/3]" carefully places the relevant code it adds under !NO_LOCAL_CLIENT_CRED,
but unfortunately doesn't notice that NO_LOCAL_CLIENT_CRED is defined as a
side-effect in the middle of GetLocalClientCreds(), so many of these checks
precede its definition.

Move the check if NO_LOCAL_CLIENT_CRED should be defined to configure.ac, so it
always occurs before it's first use.

v2:
Move check to configure.ac

v3:
Use AC_CACHE_CHECK and name cache varaible appropriately

[ajax: Massaged commit message]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Ray Strode <rstrode@redhat.com>
2015-09-21 13:07:02 -04:00
Javier Jardón
f8a2c087c8 configure.ac: Add support for new versions of systemd
... that only provide a unique libsystemd.pc file

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2015-09-21 13:06:49 -04:00
Adam Jackson
67dd34fa73 render: Simplify SProcRenderScale
Since ProcRenderScale throws BadImplementation anyway it's pointless to
waste time carefully swapping the request.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-21 12:27:11 -04:00
Ian Scott
a579e6ba77 Xephyr: Paint with subimage for non-Glamor & non-XSHM case
This improves the case for when we paint an area without SHM.
xcb_image_subimage() is used to create a subimage for the damaged area, which
is converted to native format if necessary.

Signed-off-by: Ian Scott <ian.scott@arteris.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-21 12:12:49 -04:00
Laércio de Sousa
a6c0564f7f ephyr: move host_has_extension() implementation to hostx.c
This is a trivial patch that moves host_has_extension() implementation
from ephyr.c to hostx.c so that it can be called by hostx.c internal
functions. Also rename function to hostx_has_extension() for consistency.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2015-09-21 12:12:41 -04:00
Jürg Billeter
9414ba3683 ephyr: fix -no-host-grab argument processing
Signed-off-by: Jürg Billeter <j@bitron.ch>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-21 12:08:25 -04:00
Daniel Drake
1f915e8b52 Keep SIGALRM restart flag after Popen
Commit 94ab7455 added SA_RESTART to the SIGALRM handler.  However, the
Popen code tears down and recreates the SIGALRM handler via OsSignal(),
and this flag is dropped at this time.

Clean the code to use just a single codepath for creating this signal
handler, always applying SA_RESTART.

[ajax: Fixed commit id]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
2015-09-21 11:06:39 -04:00
Daniel Drake
94ab7455ab Allow system call restarts upon signal interruption
The X server frequently deals with SIGIO and SIGALRM interruptions.
If process execution is inside certain blocking system calls
when these signals arrive, e.g. with the kernel blocked on
a contended semaphore, the system calls will be interrupted.

Some system calls are automatically restartable (the kernel re-executes
them with the same parameters once the signal handler returns) but
only if the signal handler allows it.

Set SA_RESTART on the signal handlers to enable this convenient
behaviour.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
2015-09-21 10:41:46 -04:00
Boyan Ding
1ba4fde101 xwayland: Activate and enable device on first capability reporting
Commit 2172714c changed behavior of capability handling, but it only
solved part of the problem. If Xwayland is launched without a capability
(e.g. no pointer device is connected when Xwayland was spinned up), and
later that capability comes, the device added will not be automatically
initialized. This patch initializes the device when the capability is
reported for the first time, thus avoiding the problem.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81819
Signed-off-by: Boyan Ding <stu_dby@126.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-09-21 08:48:47 +02:00
Peter Hutterer
f1995de1c4 xwayland: call through to miPointerWarpCursor on warp_cursor
This is (eventually) called during
InitializeSprite() → *pScreen->SetCursorPosition → miPointerSetCursorPosition
when a device is set to floating. We don't do anything special outselves, but
we need to pass on to the next layer to make sure the device is initialized
properly. Otherwise, pScreen stays NULL and eventually crashes the server when
we try to clean up behind us.

Test case: grab a device → floats it, ungrab again → crash

Reported-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Peter Hutterer
373599ab00 xwayland: fix crash on enter/leave for a grabbed slave device
When grabbed, the slave device is floating, i.e. the master device is NULL.
CheckMotion() isn't happy with NULL. Make sure we pass the right device in,
either the master device when the device is attached, or the device itself
when it is floating.

Reported-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Peter Hutterer
f1ba8858d5 xwayland: use the device pointer we already have
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Carlos Garnacho
44f250a7e8 xwayland: Remove related touchpoints when unrealizing windows
These sequences are forgotten to all purposes.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Carlos Garnacho
b7cd48f71d xwayland: Implement the wl_touch interface
A DeviceIntPtr with touch valuators is also created in order to deliver
the translated touch events. The lifetime of xwl_touch structs is tied
to the wayland ones, finishing in either wl_touch.up() or wl_touch.cancel()

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Carlos Garnacho
d96eccc057 xwayland: Add xwl_touch struct
This struct holds information about each individual, ongoing touchpoint.
A list of these is held by the xwl_seat.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Jasper St. Pierre
c1565f3ca6 xwayland-input: Remove our XYToWindow handler
This was built as a hack for simple Wayland compositors like Weston
which were lazy and didn't want to configure windows server-side when
moved.

Since comboboxes and menus are separate toplevel O-R windows, this hack
breaks input as it needs to be traced normally, not simply sent to the
focused window.

X11 toolkits really do need their windows to be configured correctly
for their O-R windows comboboxes or menus other things, so let's fix
the lazy compositors and remove this.

I have tested this patch with both Weston and Mutter and neither of
them require any changes, and it fixes comboboxes and menus.

If somebody then wants to revert 73698d4, that's fine by me, so we
reduce the amount of API that DDXen have.

Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-09-18 14:55:00 +02:00
Emil Velikov
58d54ee82d glamor: explicitly check for GL_OES_EGL_image
Otherwise we'll fail miserably later on as we try to use
glEGLImageTargetTexture2DOES.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-09-17 11:03:15 -04:00
Ilia Mirkin
139e36dd5c modesetting: fix up output naming convention
A user on a nouveau-driven card ran into a problem where DVI-D-1 and
DVI-I-1 were aliasing. The simplest fix is to provide the full connector
names. While we're at it, rename the output names to match what is in
the kernel, and start counting the connectors from 1 rather than 0. The
only deviation is HDMI vs HDMI-A, which kept its original name.

This will break backwards compatibility with existing xorg.conf's that
reference output names, but the alternative is to create a separate
counting system, further disconnecting from the kernel names.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-09-17 10:48:06 -04:00
Marek Chalupa
a907ead786 xwayland: implement repeat_info event
xwayland windows ignored any key repeating settings
advertised by a compositor

v2. don't hardcode version 4 of seat
    use AutoRepeatModeOn/Off

v3. use min(version, 4) when binding seat

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
2015-09-17 10:11:11 -04:00
Felix Janda
e8e3368298 On linux use <termios.h> instead of <termio.h>
<termio.h> is obsolete. Using <termios.h> instead fixes building with
musl libc.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Felix Janda <felix.janda@posteo.de>
2015-09-17 09:47:25 -04:00
Adam Jackson
dfa8b37cfb glxproxy: Fix an obvious thinko in QueryExtensionsString
gcc 5.1 throws a rather amusing warning here:

glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’:
glxcmdsswap.c:439:1: warning: function might be candidate for attribute
‘noreturn’ [-Wsuggest-attribute=noreturn]
 __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)

This is entirely accurate, albeit curiously phrased: swapping some bits
hanging off the end of a null pointer will make Xdmx crash, so from the
perspective of code generation the function will indeed not return.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-09-17 09:43:50 -04:00
Jon TURNEY
75ee874e43 Build fix for DMX
./../dix/.libs/libdix.a(pixmap.o): In function `PixmapStartDirtyTracking':
xorg/xserver/dix/pixmap.c:194: undefined reference to `RRTransformCompute'

I'm not quite sure how 0db457b fixes this

Move RANDR_LIB to after DIX_LIB, so the reference to RRTransformCompute in
DIX_LIB is satisfied.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-10 07:39:54 -07:00
Ingo Schwarze
634e357be2 remove bogus \/ escapes
some X manuals use then escape sequence \/ when they want to render
a slash.  That's bad because \/ is not a slash but an italic
correction, never producing any output, having no effect at all in
terminal output, and only changing spacing in a minor way in typeset
output.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-01 20:13:41 -07:00
Olivier Fourdan
c74c074d8e dix: export ResourceClientBits()
ResourceClientBits() might be used by the modules as well, need to
mark the symbol as visible to that the linker can resolve it at
run time.

/usr/bin/X: symbol lookup error:
/usr/lib64/xorg/modules/extensions/libglx.so: undefined symbol:
ResourceClientBits

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91763
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-01 20:11:26 -07:00
Keith Packard
dbfed3a291 Bump version to 1.17.99.901 (1.18 RC1)
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-01 19:03:33 -07:00
Jon TURNEY
bcb60a49c5 debug output format fix in TouchEventHistoryPush()
xserver/build.x86_64/../dix/touch.c:468:16: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Werror=format=]

%zu is C99, but is already used in a few places.  Perhaps doc/c-extensions needs
to mention it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:07:13 +01:00
Jon TURNEY
1f96a0d273 debug output format fix in ephyrProcessMouseMotion()
xorg/xserver/hw/kdrive/ephyr/ephyr.c:979:9: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ScreenPtr’ [-Werror=format=]

This looks like a genuine bug, and ephyrCursorScreen->myNum was meant here
rather than ephyrCursorScreen

v2:
Insert a ":" as well

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:07:02 +01:00
Jon TURNEY
8cc88fbe9e debug output format fix in DRISwapContext()
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=]                   ^
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:51 +01:00
Jon TURNEY
27cf584027 debug output format fix in TI.c
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Werror=format=]
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=]
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Werror=format=]

Use %lu for an unsigned long

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:39 +01:00
Jon TURNEY
6cc0f3d95d debug output format fix in xf86Events.c
xserver/hw/xfree86/common/xf86Events.c:183:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Werror=format=]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:16 +01:00
Olivier Fourdan
d206c240c0 configurable maximum number of clients
Make the maximum number of clients user configurable, either from the command
line or from xorg.conf

This patch works by using the MAXCLIENTS (raised to 512) as the maximum
allowed number of clients, but allowing the actual limit to be set by the
user to a lower value (keeping the default of 256).

There is a limit size of 29 bits to be used to store both the client ID and
the X resources ID, so by reducing the number of clients allowed to connect to
the X server, the user can increase the number of X resources per client or
vice-versa.

Parts of this patch are based on a similar patch from Adam Jackson
<ajax@redhat.com>

This now requires at least xproto 7.0.28

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-24 00:00:18 -07:00
Keith Packard
7ecdfbf0af Merge remote-tracking branch 'airlied/modesetting-zaphod' 2015-08-17 18:53:25 -07:00
Keith Packard
bca4f4b56c mi: Always initialize edge1 and edge2 in miLineArc
This eliminates a warning generated when miLineArcD is inlined and the
compiler can't figure out that edge1 and edge2 are always initialized
before being used.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-08-17 18:50:25 -07:00
Keith Packard
5daf1295cb dixfont.h: Include fontutil.h before GetGlyphs is #defined
This eliminates the duplicate declaration of dixGetGlyphs when
fontutil.h gets included after dixfont.h has defined GetGlyphs as
dixGetGlyphs.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-08-17 18:50:00 -07:00
Dave Airlie
d471000436 rootless: rename w->_w to avoid shadow warnings
fixes:
In file included from rootlessWindow.c:51:0:
rootlessWindow.c: In function 'RootlessResizeWindow':
rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
         WindowPtr w = pWin;                     \
                   ^
rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT'
         HUGE_ROOT(pWin);
         ^
rootlessWindow.c:1262:35: note: shadowed declaration is here
                      unsigned int w, unsigned int h, WindowPtr pSib)
                                   ^
In file included from rootlessWindow.c:51:0:
rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
         WindowPtr w = pWin;                     \
                   ^
rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT'
         NORMAL_ROOT(pWin);
         ^
rootlessWindow.c:1262:35: note: shadowed declaration is here
                      unsigned int w, unsigned int h, WindowPtr pSib)
                                   ^

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-17 18:24:04 -07:00
Dave Airlie
7f506b8099 rootless: fix warnings due to lack of const keeping.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-17 18:23:55 -07:00
Dave Airlie
b923443816 mioverlay.c: remove shadowed pScreen.
This is already defined at the function entry.

fixes warning:
  CC       mivaltree.lo
mioverlay.c: In function 'miOverlayWindowExposures':
mioverlay.c:993:23: warning: declaration of 'pScreen' shadows a previous local [-Wshadow]
             ScreenPtr pScreen = pWin->drawable.pScreen;
                       ^
mioverlay.c:986:15: note: shadowed declaration is here
     ScreenPtr pScreen = pWin->drawable.pScreen;

Signed-off-by: Dave Airlie <airlied@redhat.com>>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-17 18:23:40 -07:00
Mario Kleiner
a0b4f30b1f modesetting: Add more missing options to man page.
Descriptions for Options PageFlip and SWCursor.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-13 00:36:12 +01:00
Dave Airlie
19e1dc8f6e modesetting: add zaphod support (v3)
This adds zaphod and ZaphodHeads support
to the the in-server modesetting driver.

this is based on a request from Mario,
and on the current radeon driver, along
with some patches from Mario to bring things
up to the state of the art in Zaphod.

v2: fixup vblank fd registring.
v3: squash Mario's fixes.
  modesetting: Allow/Fix use of multiple ZaphodHead outputs per x-screen.
  modesetting: Take shift in crtc positions for ZaphodHeads configs into account.
  modesetting: Add ZaphodHeads description to man page.
small cleanups (airlied).

Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-13 00:36:03 +01:00
Adam Jackson
533fb62739 xwayland: Don't (double) destroy input resources in CloseScreen
By the time we get here we've already done CloseDownDevices, so on the
second regeneration you get:

    Invalid read of size 4
       at 0x43402A: RemoveDevice (devices.c:1125)
       by 0x427902: xwl_seat_destroy (xwayland-input.c:568)
       by 0x42649C: xwl_close_screen (xwayland.c:116)
       by 0x4B7F67: CursorCloseScreen (cursor.c:187)
       by 0x536003: AnimCurCloseScreen (animcur.c:106)
       by 0x539831: present_close_screen (present_screen.c:64)
       by 0x43E486: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x980e1a0 is 64 bytes inside a block of size 904

       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x434158: RemoveDevice (devices.c:1157)
       by 0x42F77B: CloseDeviceList (devices.c:1017)
       by 0x430246: CloseDownDevices (devices.c:1047)
       by 0x43E3EB: dix_main (main.c:333)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-12 08:53:38 -07:00
Adam Jackson
11f4cc47a8 xwayland: Don't (double) destroy RANDR resources in CloseScreen
By the time we get here we've already been through FreeAllResources,
which has already torn down the RANDR objects, so on the second
regeneration you get:

    Invalid read of size 4
       at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659)
       by 0x4285F5: xwl_output_destroy (xwayland-output.c:191)
       by 0x426464: xwl_close_screen (xwayland.c:112)
       by 0x4B7F77: CursorCloseScreen (cursor.c:187)
       by 0x536013: AnimCurCloseScreen (animcur.c:106)
       by 0x539841: present_close_screen (present_screen.c:64)
       by 0x43E496: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd
       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689)
       by 0x45CD91: doFreeResource (resource.c:872)
       by 0x45DE56: FreeClientResources (resource.c:1138)
       by 0x45DF06: FreeAllResources (resource.c:1153)
       by 0x43E3BD: dix_main (main.c:321)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-12 08:53:38 -07:00
Eric Anholt
ea03e314f9 glamor: Don't try to free the pixmap priv if we fail to allocate FBO.
Fixes a regression since a2a2f6e34b.  I
missed this in testing on x86, because we never fail to allocate an
FBO.  We do hit this path on VC4, though.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-29 13:58:54 -07:00