Commit Graph

15020 Commits

Author SHA1 Message Date
Alan Coopersmith
fd653194be protocol.txt: Add RANDR 1.5 requests
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-25 09:45:57 -04:00
Alan Coopersmith
1ea8fb96bc protocol.txt: Remove extensions that died before Xorg was born
Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-25 09:45:53 -04:00
Alan Coopersmith
6ca496b7c3 dri2: better checks for integer overflow in GetBuffers*
Check for integer overflow before using stuff->count in a multiplication,
to avoid compiler optimizing out due to undefined behaviour, but only
after we've checked to make sure stuff->count is in the range of the
request we're parsing.

Reported-by: jes@posteo.de
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-24 13:47:01 -04:00
Keith Packard
6c2c6fb5a7 Xext, os: Remove OS-internal usages within XACE and XSELinux
These extensions were accessing internal OS functions and
structures. Expose the necessary functionality to them and remove
their use of osdep.h

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-24 13:38:24 -04:00
Keith Packard
9af111fe04 Xext/xselinux: Warning fixes
There's a 'const char *' adventure here that I'm mostly ignoring; some
client information gets const poisoned. Worked around by adding a
couple of casts. Ick.

Added an _X_ATTRIBUTE_PRINTF to SELinuxLog.

Ignore a couple of unused return values.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-24 13:35:21 -04:00
Jon TURNEY
9ee05c8987 debug output format fix in RRMonitorCrtcName()
xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=]

RRCrtc is XID is CARD32, which inside the server is unsigned long or int
depending on architecture, so a cast is required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-09-24 13:21:01 -04:00
Jon TURNEY
fe25329603 debug output format fix in xf86Helper.c
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Atom’ [-Werror=format=]
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘Atom’ [-Werror=format=]

Atom is unfortunately unsigned long or unsigned int depending on the
architecture, so a cast is required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-09-24 13:19:53 -04:00
Dima Ryazanov
dc2998bf06 xwayland: Remove a useless out-of-memory check
snprintf does not allocate memory, so we can never get an out-of-memory
error.

(Also, the error handler would free xwl_output after it was already
registered as an event listener.)

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
2015-09-24 13:10:46 -04:00
Adam Jackson
b469fc72d2 composite: Factor out backing store transition
No functional change.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-09-24 13:01:51 -04:00
Dave Airlie
6da3f5d04f glx: fix regression with copy sub buffer disappearing
So copy sub buffer isn't a core extensions it's a driver extension
which means we are using totally the wrong interface to query for it
here, which means bad things happen when you roll out this code,
for instance MESA_copy_sub_buffer stops working.

This is just the hack I'm sticking in Fedora to avoid the regression
for now, but hopefully will inspire us.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-09-23 17:08:44 -04:00
Eric Anholt
5e9457c41c fbdevhw: Fix a const qualifier warning
We're passing string literals to these functions.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-09-23 15:18:24 -04:00
Eric Anholt
88355cedfc kdrive: Remove dead debug arrays.
These have never been used in the history of the tree, and were
producing string literal const loss warnings.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-09-23 15:17:22 -04:00
Eric Anholt
e6f8a0340b x86emu: Fix some set-but-not-used warnings.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-09-23 15:01:25 -04:00
Egbert Eich
fca98ce5e7 libxf86config: libxf86config_internal -> libxf86config
Now since the installable libxf86config is gone, rename
libxf86config_internal to libxf86config.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23 14:29:21 -04:00
Egbert Eich
dabf7c3590 libxf86config: Remove
The library used by the Xserver to read and parse the configuration file
could be built so that it culd be installed as a separate lib and used
by external programs.

Apparently there has not been any interest in this for quite a while as
this library has been broken for a long time now in the sense that it
was calling functions provided by the Xserver which were not implemented
for the external library.

Since this library is useless as it is anyway when built let's drop
support for it.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23 14:28:56 -04:00
Chris Wilson
c7f84c880b render: Fix leak of filter params
==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
==11097==    at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11097==    by 0x225EF3: SetPicturePictFilter (filter.c:339)
==11097==    by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
==11097==    by 0x15D25D: Dispatch (dispatch.c:432)
==11097==    by 0x14C7B9: main (main.c:298)

[ajax: Fixed whitespace]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-23 14:11:37 -04:00
Ville Syrjälä
98e170971c xfree86: Fix the 1792x1344-75 EST III mode
The correct refresh rate for this mode is 75, not 85.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-23 13:18:22 -04:00
Michal Srb
91c7acfc34 randr: Allow RRSelectInput for ProviderChange and ResourceChange events
[ajax: To be clear, we already have code to emit these events, and it
 looks like it works, but to get them you'd have had to also ask for one
 of the other notify types.  This makes it possible to listen for e.g.
 ProviderChange alone.]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michal Srb <msrb@suse.com>
2015-09-23 13:12:21 -04:00
Egbert Eich
5437949a51 fbdevhw: Disable FBIOBLANK ioctl if not supported
Some ioctls may not be supported by the kernel however their failure
is non-fatal to the driver. Unfortunately we only know once we try
to execute the ioctl however the sematics of the fbdev driver API
doesn't allow upper layers to disable the call.
Instead of changing the fbdevHW driver API just disable the call to
this ioctl on the module level when detecting such a case.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Egbert Eich <eich@freedesktop.org>
2015-09-23 13:01:23 -04:00
Matt Turner
49fe4ee7b7 compiler.h: Remove dead STANDALONE_MMIO
The only drivers I can find that used this are the r128 and radeon DRI
drivers. r128 is dead and the radeon driver wasn't including Xorg's
compiler.h and still worked.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2015-09-23 12:18:50 -04:00
Andy Ritger
d2a6962474 mi: Log an error if mieqProcessInputEvents() recurses.
v2:

Uses BUG_WARN_MSG to also provide a stack trace. (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Andy Ritger <aritger@nvidia.com>
2015-09-23 11:07:23 -04:00
Andy Ritger
cc57ab4fc8 Remove static qualifier on mieqProcessInputEvents()'s 'event'
This isn't necessary.

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-23 11:06:13 -04:00
Tomas Carnecky
44ea291b78 Remove NO_LIBCWRAPPER define
I'll just refer to 1faba79 (Death to libcwrapper., 2007-12-03).

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Tomas Carnecky <tomas.carnecky@gmail.com>
2015-09-23 11:03:26 -04:00
Peter Hutterer
1e95a7df5f dix: put warning in for scroll increments of 0
If the increment is 0 but this is a scroll axis, it's definitely a bug.
Nonetheless, it has happened, so put a warning in and a return statement
that we avoid the infinite loop and hopefully be able to reproduce later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-09-23 10:51:45 -04:00
Bryce Harrington
63efa2e7e9 test: Fix typo and drop documentation references to glib.
The X server doesn't use glib for the tests any more.

Signed-off-by: Bryce Harrington <bryce@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2015-09-23 10:48:12 -04:00
Dave Airlie
4c7cefe240 exa: initialise mask_off_x and mask_off_y
These get used at the end of the function in a calculation,
even though the result isn't used its not pretty.

Pointed out by coverity.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-23 10:43:39 -04:00
Gaetan Nadon
668cce3f5a dmx: fix typo in the title
[ajax: fix typo in the commit message]

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-23 10:39:47 -04:00
Andrea Canciani
7ed0c3912e render: Allow single-stop gradients
The Render specification allows single-stop gradients and pixman 0.22
(X server requires >= 0.27.2 now) can rasterize them correctly.

[ajax: update commit message]

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <ssp@redhat.com>
2015-09-23 10:34:43 -04:00
Cyril Brulebois
3d9f578e6f doc: Convert an \fP pair into appropriate tags.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:32:53 -04:00
Cyril Brulebois
d97ffef1ab doc: Try to avoid repetitions.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:31:55 -04:00
Cyril Brulebois
2cce6ffc35 doc: Fix punctuation.
[ajax: s/ponct/punct/]

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2015-09-23 10:31:12 -04:00
Cyril Brulebois
e7e3320098 doc: Fix extraneous &gt;
It looks like it serves no special purpose.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:30:38 -04:00
Cyril Brulebois
9b4f10d749 doc: Fix grammar and typos.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:30:13 -04:00
Cyril Brulebois
5b92a0a84a doc: Fix alignment.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:29:43 -04:00
Cyril Brulebois
0b8fca667b doc: Fix typo.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-23 10:28:41 -04:00
Cyril Brulebois
1226f7ddd7 doc: Get rid of RCS tags.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:27:13 -04:00
Cyril Brulebois
4803f71391 man: Fix case for MIT-unspecified.
include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather
than MIT-Unspecified. Fix the manpage accordingly.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-23 10:24:48 -04:00
Tiago Vignatti
593270038d dix: remove dead extensions to protocol.txt
lbx and mbe.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2015-09-22 13:44:59 -04:00
Robert Hooker
3cd56dd2cf Add new GLX events errors and requests to protocol.txt
Based off of glproto 1.4.11.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
2015-09-22 13:18:53 -04:00
Robert Hooker
272ba9f021 Add DRI2 2.2/2.3 events and requests to protocol.txt
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
2015-09-22 13:18:47 -04:00
Emil Velikov
64e6124f27 glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import
We're using the former only as the latter is present. Thus in some cases
we might incorrectly error out if it's missing.

Namely - glamor_glx, glamor_egl without gbm, EGL_KHR_gl_texture_2D_image
or EGL_EXT_image_dma_buf_import.

Fixes 58d54ee82df(glamor: explicitly check for GL_OES_EGL_image)
Cc: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Suggested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-22 11:11:49 -04:00
Alan Coopersmith
aa5606be1c Make configure test for LD_NO_UNDEFINED_FLAG on Solaris work w/autoconf 2.69
After upgrading from autoconf 2.68 to 2.69, this test started failing with
"conftest.c", line 149: undefined symbol: NULL
so use a raw 0 pointer to avoid header dependencies in the autoconf
generated test case.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2015-09-21 16:08:30 -07:00
Adam Jackson
fa0bb01899 rootless: Fix bogus handling of broken root clip
gcc quite correctly complains about this:

    In file included from ../../include/scrnintstr.h:51:0,
                     from rootlessValTree.c:98:
    In function 'RegionUninit.isra.1',
        inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5,
        inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9:
    ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object]
             free((_pReg)->data);

So that'd crash if you ever got there.  RegionNull will do almost the
same thing only without the free(), so let's do that instead; it might
still not be an entirely sane way to recover, but it at least won't
crash.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-09-21 17:44:48 -04:00
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