Commit graph

15263 commits

Author SHA1 Message Date
Maarten Lankhorst
db258a27f0 exa: only draw valid trapezoids
Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484

If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly.
A similar fix should also be applied to pixman.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit c6511d0142)
2016-06-21 12:08:12 +02:00
Adam Jackson
62bf33d0d1 xfree86: Don't swallow ±iglx command line flag
We want to notice that it's set, but still pass it through to dix.
Return 0 to indicate this.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 7cf80b9714)
2016-06-20 11:50:00 -04:00
Adam Jackson
d7ae950c1d xfree86: Add IndirectGLX server flag (v2)
Not all display managers make it easy (or possible) to modify the
command line flags passed to the server, so add a way to get to it from
xorg.conf.

v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan
Coopersmith)

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 4fca18dc03)
2016-06-20 11:49:43 -04:00
Olivier Fourdan
02f9b3c18f xwayland: Fix compiler warning in GLAMOR Xv
XvWindowMask is defined as 0x00020000 and cannot fit in the XvAdaptor
type which is defined as an unsigned char, thus causing a compiler
warning:

  xwayland-glamor-xv.c: In function ‘xwl_glamor_xv_add_adaptors’:
  xwayland-glamor-xv.c:339:16: warning: large integer implicitly
  truncated to unsigned type [-Woverflow]

This XvWindowMask value is actually not used for XvAdaptor itself but by
the server in its xf86xv implementation, so we don't even need that mask
in our xwayland-glamor-xv implementation.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit e8e5d83996)
2016-06-20 11:49:27 -04:00
Adam Jackson
a482b0b6c7 kdrive: Nuke a bunch of dead code
gcc6 says:

keyboard.c:46:21: warning: ‘linux_to_x’ defined but not used

Only referenced by a bunch of long if-0'd code, so chuck it all out.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit c33250945b)
2016-06-20 11:46:44 -04:00
Adam Jackson
0dfa816af2 dix: Squash some new gcc6 warnings
-Wlogical-op now tells us:

    devices.c:1685:23: warning: logical ‘and’ of equal expressions

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit a5dd7b890f)
2016-06-20 11:46:24 -04:00
Jeremy Huddleston Sequoia
9849977064 XQuartz: Fix default CFBundleVersion
m4/shell variable name collision broke the case when the configure
option was not used

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 1bb932bf14)
2016-05-18 14:13:04 -07:00
Jeremy Huddleston Sequoia
1a81f2a519 XQuartz: Update copyright years
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 059d5ef304)
2016-05-04 13:14:04 -07:00
Jeremy Huddleston Sequoia
73987379d7 XQuartz: Add --with-bundle-version and --with-bundle-version-string configure options
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit d6ba4f2c52)
2016-05-04 13:14:04 -07:00
Jeremy Huddleston Sequoia
bab72d3905 XQuartz: Add --with-sparkle-feed-url configure option
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit c1614928c1)
2016-05-04 13:14:04 -07:00
Jeremy Huddleston Sequoia
a1915ad14d XQuartz: Update release feed URL to use new https URL
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 299b01eabf)
2016-05-04 13:14:04 -07:00
Jeremy Huddleston Sequoia
ab5f69e541 XQuartz: Fix the help text for --with-bundle-id-prefix
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 16d6733c63)
2016-05-04 13:14:04 -07:00
Jeremy Huddleston Sequoia
3600f8600f XQuartz: Remove --with-launchd-id-prefix
It's been deprecated for years.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 214a66b661)
2016-05-04 13:14:04 -07:00
Adam Jackson
9454cd51da xserver 1.18.3
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-04-04 14:39:36 -04:00
Olivier Fourdan
082d5ea9a8 xwayland: Pretend we support viewport in vidmode
Some games (namely openttd) will raise an XError and fail with a
BadValue if their request to XF86VidModeSetViewPort fails.

Support only the default zoom and viewport, fail for everything else.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 44e1c97ca6)
2016-03-29 16:42:30 -04:00
Olivier Fourdan
fcb89adb4a xwayland: do not include frequency in mode name
Some applications (e.g. using lwjgl) try to parse the output of the
xrandr command and get confused with the mode name returned by Xwayland,
because it contains "@[frequency]" (e.g. "1024x640@60.0Hz").

Remove the @[frequency] part of the mode name to match what is found in
usual mode names on regular X servers to please those applications.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94589

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 6e3a6e30a6)
2016-03-29 16:42:30 -04:00
Michel Dänzer
b8f9fd8318 xfree86/modes: Make sure the HW cursor is hidden when it should be
When the HW cursor is hidden (e.g. because xf86CursorResetCursor
triggers a switch from HW cursor to SW cursor), the driver isn't
notified of this for disabled CRTCs. If the HW cursor was shown when the
CRTC was disabled, it may still be displayed when the CRTC is enabled
again.

Prevent this by explicitly hiding the HW cursor again after setting a
mode if it's currently supposed to be hidden.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94560
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 418fe365b4)
2016-03-29 16:42:30 -04:00
Sonny Jiang
1211d483d4 DRI2: add Polaris PCI IDs
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Polaris10)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (Polaris11)

(Ported from Mesa commit f00c840578a70e479ffb99f6b64c73dc420179fa)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1c90797565)
2016-03-29 16:42:30 -04:00
Michel Dänzer
07ad2fde78 present: Only requeue for next MSC after flip failure
This code was added to deal with the driver present hook failing, in
which case we need to wait for the next MSC before executing the
presentation.

However, it could also take effect in cases where the driver incorrectly
thinks the current MSC matches the target one (e.g. due to the kernel
interface only supporting 32-bit MSC values), in which case it could
result in the presentation getting requeued over and over.

To prevent such issues, check specifically for the target MSC
immediately following the current MSC.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94596
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 3b385105b2)
2016-03-29 16:42:30 -04:00
Adam Jackson
e8f785f82e vfb: Re-add LD_EXPORT_SYMBOLS_FLAG to LDFLAGS
Accidentally removed, breaks Xvfb on cygwin.

Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 8ac0e05cc6)
2016-03-29 16:42:30 -04:00
Dave Airlie
fb8ddcf1cb glamor: swizzle RED to 0 for alpha textures
I'm pretty sure Eric suspected this could cause a problem, and we
couldn't find a test. Well loading feedly in firefox seems to trigger
badness that this solves.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94554
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
(cherry picked from commit a288cf58a0)
2016-03-29 16:42:30 -04:00
Chris Wilson
1bffe77769 Xext/vidmode: Reduce verbosity of GetModeLine debug messages
In commit f175cf45ae
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Feb 10 09:34:34 2016 +0100

    vidmode: move to a separate library of its own

the verbosity of some old debug messages (which print the reply to every
GetModeLine client request and others) was increased leading to lots of
log spam. Downgrade the logging back to DebugF.

[ajax: Fix a typo so it compiles.]

Reviewed-by: Adam Jackson <ajax@redhat.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=94515
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 75eecf28ae)
2016-03-29 16:42:25 -04:00
Adam Jackson
93d4224ccf xserver 1.18.2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-11 16:38:52 -05:00
Adam Jackson
d88f8ffeb7 vidmode: Remove stray vidmodeproc.h from EXTRA_DIST
Was removed from the tree in:

    commit f175cf45ae
    Author: Olivier Fourdan <ofourdan@redhat.com>
    Date:   Wed Feb 10 09:34:34 2016 +0100

        vidmode: move to a separate library of its own

but not removed from the Makefile, which broke 'make dist'.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 744c292ae4)
2016-03-11 13:51:59 -05:00
Dave Airlie
643359fb03 present: fail flipping if we have any slave outputs
Due to the way present currently works, we don't ever check with the
secondary adapters if we can flip at all.

We shouldn't flip if the secondary adapters are attached to the pixmap
currently, however using the current check_flip callback isn't possible
as it passes the Window to the driver (something we shouldn't be doing),
so the slave driver can never get it's own screen ptr back.

For now to fix the problem just block flips if we have any slaves
configured. We can fix the ABI up later, but this fix can be backported
to stable.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 47bc7fcaa5)
2016-03-11 13:37:10 -05:00
Adam Jackson
3e480c6f51 glx: Implement GLX_EXT_fbconfig_packed_float
The tokens for this are already defined by GLX_ARB_fbconfig_float, which
we already support, so just add the extension to the list and let the
driver provide those configs if it wants.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit ef3005da3d)
2016-03-11 13:14:34 -05:00
Adam Jackson
b9f7edda06 glx: Implement GLX_EXT_stereo_tree
This is correct as it is, but only because we know no DRI drivers
implement stereo.

v2: Use new ATTRIB macro

Reviewed-by: James Jones <jajones@nvidia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d15cb654b6)
2016-03-11 13:14:34 -05:00
Adam Jackson
2b3363418a glx: Add GLX_SCREEN to the GetDrawableAttributes response
libglvnd would like to use this to map from drawable to screen, so it
can know which driver to dispatch to. Refer to the spec proposal here:

https://lists.freedesktop.org/archives/mesa-dev/2016-March/109543.html

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit a18238877b)
2016-03-11 13:14:34 -05:00
Adam Jackson
2541d765fd glx: Macroize building the attribute list in DoGetDrawableAttributes
No functional change, just a little easier to read and harder to get
wrong.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 47c1d6b7ab)
2016-03-11 13:14:34 -05:00
Eric Anholt
2a7b6ea1a5 ephyr: Fix redisplay with glamor on GLES.
glamor_transfer.c is still totally broken, though.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit c01094c531)
2016-03-11 13:14:34 -05:00
Olivier Fourdan
5af20f1563 glamor: do not build Xv support when --disable-xv
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 25ce263fd8)
2016-03-11 13:14:34 -05:00
Olivier Fourdan
9fc05b85e5 xwayland: add glamor Xv adaptor
This adds an Xv adaptor using glamor.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit da7724d3d2)
2016-03-11 13:14:34 -05:00
Michel Dänzer
1aa9a2be31 modesetting: Allow CRTC transforms to actually take effect
Setting crtc->transformPresent to FALSE was preventing the transform
from actually taking effect and putting RandR into a confused state.

Now that the RandR 1.2 cursor code handles transforms correctly, we can
allow them to properly take effect.

Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 24042b4e36)
2016-03-11 13:14:33 -05:00
Michel Dänzer
aa8770bf54 xfree86: Re-set current cursor after RandR 1.2 CRTC configuration change
Add xf86CursorResetCursor, which allows switching between HW and SW
cursor depending on the current state.

Call it from xf86DisableUnusedFunctions, which is called after any CRTC
configuration change such as setting a mode or disabling a CRTC. This
makes sure that SW cursor is used e.g. while a transform is in use on
any CRTC or while there are active PRIME output slaves, and enables HW
cursor again once none of those conditions are true anymore.

Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b04767c84d)
2016-03-11 13:14:33 -05:00
Michel Dänzer
870d4e2e6b xfree86/modes: Check for CRTC transforms in xf86_use_hw_cursor(_argb) (v2)
We currently don't handle transforms for the HW cursor image, so return
FALSE to signal a software cursor must be used if a transform is in use
on any CRTC.

v2: Check crtc->transformPresent instead of crtc->transform_in_use. The
    latter is TRUE for rotation as well, which we handle correctly.

Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a4ffa8721d)
2016-03-11 13:14:33 -05:00
Michel Dänzer
af87ab6287 xfree86/modes: Refactor xf86_use_hw_cursor_argb to use xf86_use_hw_cursor (v2)
This reduces code duplication.

v2: No functional change this time.

Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c3e4e9fc5d)
2016-03-11 13:14:33 -05:00
Michel Dänzer
87c23dc471 glamor: Source pictures are always depth 32
We were using the destination pixmap depth to determine the source
picture format.

Fixes incorrect text rendering with some MATE desktop GTK3 themes.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94246
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit a3e681eafa)
2016-03-11 13:14:33 -05:00
Michel Dänzer
0220275531 glamor: Factor out glamor_set_color_depth from glamor_set_color
The former takes explicit screen and depth parameters instead of
deriving them from a pixmap.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit b05ae79ee3)
2016-03-11 13:14:33 -05:00
Hans de Goede
79985270f1 glamor: Fix XvPutImage when src_y != 0
We already take src_y into account when uploading the src data by
starting at the top line of the src data when uploading.

Adjust src_y accordingly when rendering.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 947e94a341)
2016-03-11 13:14:33 -05:00
Rui Matos
ddca8e1647 build: Enable vidmode independently from Xorg
This allows building Xwayland without Xorg and still include the
vidmode extension.

v2: Use PKG_CHECK_EXISTS instead of PKG_CHECK_MODULES

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 40a164b8f4)
2016-03-11 13:14:33 -05:00
Julien Cristau
7680f558e1 xfixes: avoid double free if AddResource fails
pChc is already freed through CursorFreeHideCount →
deleteCursorHideCount.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 2be527b1d4)
2016-03-11 13:14:33 -05:00
Julien Cristau
b7e1f25005 render: free already allocated formats in PictureInit failure case
Probably pointless, if this fails you're not likely to get far...

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 4217db89ec)
2016-03-11 13:14:33 -05:00
Julien Cristau
518a0c179f record: don't call RecordDeleteContext when AddResource fails
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 054f807178)
2016-03-11 13:14:33 -05:00
Julien Cristau
dae9c195a9 xwin: no need to free auth data if AddResource fails
This is taken care of by SecurityDeleteAuthorization

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit d0c1a5bc61)
2016-03-11 13:14:33 -05:00
Julien Cristau
4bbaffc813 modesetting: avoid double free if AddResource fails
ms_dri2_frame_event_client_gone or ms_dri2_frame_event_drawable_gone
already free the resource.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit acf263df81)
2016-03-11 13:14:33 -05:00
Julien Cristau
8616bd95de dmx/glxProxy: don't free the glx pixmap twice if AddResource fails
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 164753f158)
2016-03-11 13:14:33 -05:00
Julien Cristau
dcbf88aea7 glx: don't call pGlxDraw->destroy() if AddResource fails
AddResource will have called DrawableGone, which takes care of the
destruction.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 59b9c3d5e4)
2016-03-11 13:14:33 -05:00
Julien Cristau
ab197ee947 xvmc: Fix unchecked AddResource
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 119d5c0e2f)
2016-03-11 13:14:33 -05:00
Jonas Ådahl
bd022f0314 xwayland: Correctly detect whether posix_fallocate exists
We had HAVE_POSIX_FALLOCATE checks, but no such macros were ever
defined anywhere. This commit makes it so that this macro is defined if
the posix_fallocate is detected during configure.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit a2c3c34b44)
2016-03-11 13:14:32 -05:00
Julien Cristau
23d9b2a566 xv: fix double free in AddResource failure case
XvdiDestroyVideoNotifyList already frees the list if AddResource fails,
so don't do it twice.  And set tpn->client to NULL explicitly to avoid
confusing uninitialized memory with a valid value.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 939ce0bae6)
2016-03-11 13:14:32 -05:00