- Jul 19, 2016
-
-
Adam Jackson authored
Signed-off-by: Adam Jackson <ajax@redhat.com>
-
Fixes leaking the memory pointed to by the members of the array returned by xstrtokenize. Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit e156c0cc)
-
Adam Jackson authored
By the time we get to ComputeLocalClient, we've already done NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming we're built with #define CLIENTIDS), so we can look up the name of the client process and refuse to treat ssh's X forwarding as if it were local. v2: (Michel Dänzer) * Only match "ssh" itself, not other executable names starting with that prefix. * Ignore executable path for the match. v3: (Michel Dänzer) * Use GetClientCmdName (Mark Kettenis) * Perform check on Windows as well, but only ignore path on Cygwin (Martin Peres, Emil Velikov, Jon Turney) v4: (Michel Dänzer) * Cut of any colon and whatever comes after it. (Adam Jackson) * Add bugzilla reference. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit adefbaee)
-
Fixes incorrect clipping for redirected windows which don't happen to be located at the top left corner of the screen. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit e8e36755)
-
Adam Jackson authored
The intent here was that fallback drivers would be at the end of the list in order, but if a fallback driver happened to be at the end of the list already that's not what would happen. Rather than open-code something smarter, just use qsort. Note that qsort puts things in ascending order, so somewhat backwardsly fallbacks are greater than native drivers, and vesa is greater than modesetting. v2: Use strcmp to compare non-fallback drivers so we get a predictable result if your libc's qsort isn't stable (Keith Packard) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 32a9504c)
-
We currently censor images from dix's GetImage, but not from ShmGetImage. This is a method to bypass XACE, creating a potential leak. We should censor in both methods. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> (cherry picked from commit 4926845a)
-
Otherwise if the geometry changes but the mode doesn't we end up with the previous geometry from RR's point of view. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710 Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Rui Matos <tiagomatos@gmail.com> (cherry picked from commit cf6730c5)
-
Some games incorrectly use non-premultiplied ARGB cursor data, presumably because that's what Windows uses. On some hardware (and with SWcursor), this breaks areas of the cursor which are supposed to be transparent (and presumably also translucent areas, but that's less noticeable). This change checks for pixels with alpha == 0 and any non-alpha component != 0. If any such pixel is found, the data is assumed to be non-premultiplied and fixed up by multiplying the RGB components with the alpha component. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 401a8d6e)
-
/dev/vc/0 is a devfs thing which is long dead, so stop trying to open /dev/vc/0, besides being a (small) code cleanup this will also fix the "parse_vt_settings: Cannot open /dev/tty0 (%s)\n" error message to display the actual error, rather then the -ENOENT from also trying /dev/vc/0. BugLink: https://patchwork.freedesktop.org/patch/8768/ Reported-by: Chad Versace <chad.versace@linux.intel.com> Suggested-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Chad Versace <chad.versace@intel.com> (cherry picked from commit 033888e7)
-
Adam Jackson authored
This error code can mean we're submitting more rects at once than the driver can handle. If that happens, resubmit one at a time. v2: Make the rect submit loop more error-proof (Walter Harms) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Michael Thayer <michael.thayer@oracle.com> (cherry picked from commit 4b311d23)
-
24bpp front buffers tend to be the least well tested path for client rendering. On the qemu cirrus emulation, and on some Matrox G200 server chips, the hardware can't do 32bpp at all. It's better to just allocate a 32bpp shadow and downconvert in the upload hook than expose a funky pixmap format to clients. [ajax: Ported from RHEL and separate modesetting driver, lifted kbpp into the drmmode struct, cleaned up commit message, fixed 16bpp] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlied <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [hdegoede@redhat.com: rebase, also use kbpp for rotate shadow fb] Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 21217d02)
-
If we're doing reverse-prime; or doing rotation the main fb is not used, and there is no reason to add it in this case. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 4313122d)
-
Adam Jackson authored
This reverts commit 713a21cc.
-
- Jul 06, 2016
-
-
With the previous patch, the modesetting driver can now return whether the driver supports hw cursor. However, it alone doesn't suffice, unfortunately. drmmode_load_cursor_argb_check() is called in the following chain: xf86CursorSetCursor() -> xf86SetCursor() -> xf86DriverLoadCursorARGB() -> xf86_load_cursor_argb() -> xf86_crtc_load_cursor_argb() -> drmmode_load_cursor_argb_check() *but* at first with drmmode_crtc->cursor_up = FALSE. Then the function doesn't actually set the cursor but returns TRUE unconditionally. The actual call of drmmode_set_cursor() is done at first via the show_cursor callback, and there is no check of sw cursor fallback any longer at this place. Since it's called only once per cursor setup, so the xserver still thinks as if the hw cursor is supported. This patch is an ad hoc fix to correct the behavior somehow: it does call drmmode_set_cursor() at the very first time even if cursor_up is FALSE, then quickly hides again. In that way, whether the hw cursor is supported is evaluated in the right place at the right time. Of course, it might be more elegant if we have a more proper mechanism to fall back to sw cursor at any call path. But it'd need more rework, so I leave this workaround as is for now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit af916477)
-
The modesetting driver still has an everlasting bug of invisible cursor on cirrus and other KMS drivers where no hardware cursor is supported. This patch is a part of an attempt to address it. This patch particularly converts the current load_cursor_argb callback of modesetting driver to load_cursor_argb_check so that it can return whether the driver handles the hw cursor or falls back to the sw cursor. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [hdegoede@redhat.com: Add extra comment suggested by Kenneth] Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 14c21ea1)
-
The error value isn't always -EINVAL, e.g. the kernel drm core returns -ENXIO when the corresponding ops doesn't exist. Without this fix, DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it shouldn't. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 074cf587)
-
Regression introduce by ac164e58 which calls XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into the stack and we triggered a NULL-pointer dereference. In theory a NULL cause is acceptable since we don't actually change modifier state here. Instead of updating all places to check for NULL just set the cause to the client request and go to the pub. https://bugs.freedesktop.org/show_bug.cgi?id=96384 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Daniel Stone <daniels@collabora.com> (cherry picked from commit d135100d)
-
When multiple processes are using GL with indirect rendering a race condition can make drawables refcount never drop to zero. This situation could happen when there are many X clients using indirect GLX: 1 - client1: calls glXMakeCurrent 2 - client2: calls glXMakeCurrent This is the first context switch for this client. So old_context_tag=0 3 - client1: calls glXRender For the client, its context is already current. For the server side lastGLContext points to client2's context. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Guilherme Quentel Melo <gqmelo@gmail.com> (cherry picked from commit a134d1e7)
-
Nice of FreePicture to take a void * instead of a PicturPtr so that this error wasn't caught by the compiler. Noticed when resetting the X server left a dangling pixmap around. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 2d6230e7)
-
On cursor unrealize, the associated pixmap is destroyed, make sure we clear the pointer from the private resource and check for the value being non-null when setting or destroying the cursor. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246 (cherry picked from commit edd24aa5)
-
Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> (cherry picked from commit 166d4c81)
-
Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96344 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit d798b831)
-
Commit b64108fa ("glamor: Check for composite operations which are equivalent to copies") failed to copy conditions from exaComposite which ensure that the composite operation doesn't access outside of the source picture. This fixes rendercheck regressions from the commit above. Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 5ff75da3)
-
Patch b64108fa added a short cut that identifies composite operations that can be performed with a simple copy instead. glamor_copy works in absolute coordinates, so the dx and dy values passed in need to be converted from drawable-relative to absolute by adding the drawable x/y values. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 8b9b4387)
-
A1 and A8 pixmaps are usually stored in the Red channel to conform with more recent GL versions. When using these pixmaps as mask values, that works great. When using these pixmaps as source values, then the value we want depends on what the destination looks like. For RGBA or RGB destinations, then we want to use the Red channel for A values and leave RGB all set to zero. For A destinations, then we want to leave the R values in the Red channel so that they end up in the Red channel of the output. This patch adds a helper function, glamor_bind_texture, which performs the glBindTexture call along with setting the swizzle parameter correctly for the Red channel. The swizzle parameter for the Alpha channel doesn't depend on the destination as it's safe to leave it always swizzled from the Red channel. This fixes incorrect rendering in firefox for this page: https://gfycat.com/HoarseCheapAmericankestrel while not breaking rendering for this page: https://feedly.com v2: Add change accidentally left in patch for missing glDisable(GL_COLOR_LOGIC_OP). Found by Emil Velikov <emil.l.velikov@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63397 Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 181a4bd0)
-
glamor_make_current is supposed to be called before any GL APIs. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit b07bc700)
-
If the logic op gets left enabled, it overrides the blending operation, causing incorrect contents on the display. v2: Disable only on non-ES2, but disable even for PictOpSrc v3: Found another place this is needed in glamor_composite_set_shader_blend v4: Remove change dependent on new glamor_set_composite_texture API. This belongs in a different patch. Found by Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 743b6f23)
-
Increases x11perf -compwinwin500 numbers by a factor of 10 for me with radeonsi. Conditions copied from exaComposite(). Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit b64108fa)
-
RENDER requires that sampling outside of any source/mask picture results in alpha == 0.0. The OpenGL border colour cannot set alpha = 0.0 if the texture format doesn't have an alpha channel, so we have to use the RepeatFix handling in that case. Also, only force alpha = 1.0 when sampling inside of RGBx source/mask pictures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94514 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 4711ebc1)
-
This changes XInput 2's propagation of NotifyPointer focus out events to include the pointer window as well, similar to core events. This fixes a potential permanent focus in GDK when the focus moves to PointerRoot. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93539 Signed-off-by: Andrew Comminos <andrew@comminos.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 2fbf5c2f)
-
Reported-by: Uli Schlachter <psychon@znc.in> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94775 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Uli Schlachter <psychon@znc.in> (cherry picked from commit 140c2f1a)
-
R_SP is also defined in <sys/ucontext.h> on m68k. Also remove duplicate definitions. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Andreas Schwab <schwab@suse.de> (cherry picked from commit 23dfa017)
-
Some drivers are calling glFinish, they really should be doing this. This also is needed for some reverse prime scenarios. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit aa4e7571)
-
If posix_fallocate or ftruncate is interrupted by signal while working, we return -1 as fd and the allocation process returns BadAlloc error. That causes xwayland clients to abort with 'BadAlloc (insufficient resources for operation)' even when there's a lot of resources available. Fix it by trying again when we get EINTR. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> (cherry picked from commit f48b0534)
-
DRI2 detection could fail if configure is invoked with a sysroot passed as CFLAGS. Ideally configure should invoke gcc with the sysroot argument passed to the configure script, but for some reason this is not done by AC_COMPILE_IFELSE. Fix this by ensuring CFLAGS are preserved when checking for stuff. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 4cc32880)
-
This was quite unlikely except in situations where a proper startup would have been impossible anyway, but since automated checks don't grade likelyhood just fix it. Detected by Jeremy Huddleston's clang checks. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit c8e5fc30)
-
When using PictOpSrc, the destination is wrongly shifted back to (0, 0). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94568 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> (cherry picked from commit 84379555)
-
In newer laptops with switchable graphics, the GPU may have 0 outputs, in this case the modesetting driver should still load if the GPU is SourceOffload capable, so that it can be used as an offload source provider. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (cherry picked from commit 60ad701a)
-
When a card has import capability it can be an offload _sink_, not a source and vice versa for export capability. This commit fixes the modesetting driver to properly set these capabilities, this went unnoticed sofar because most gpus have both import and export capability. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (cherry picked from commit 94a1c772)
-
- Jun 21, 2016
-
-
Lyude Paul authored
[fix copied from 40191d82370e in xf86-video-ati] Without this, we end up setting rotated CRTCs back to their previous framebuffer right after we perform a rotation. Reproducer: - Have two monitors connected at the same resolution - Rotate one monitor from normal straight to inverted - Watch as the monitor you didn't rotate either freezes or shows intense flickering Signed-off-by: Lyude <cpaul@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 848089e0)
-