- Aug 20, 2015
-
-
Pekka Paalanen authored
This bug was introduced in 954f183e. The session_notify() data was accidentally cast to fbdev_backend while it is weston_compositor. This was possibly due to the code before the mentioned commit casting data directly to fbdev_compositor without going through the intended type first, which worked only because weston_compositor was the first member in struct fbdev_compositor. Fix the casts to be the right way around. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91654 Cc: nerdopolis1@verizon.net Cc: Giulio Camuffo <giuliocamuffo@gmail.com> Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Aug 19, 2015
-
-
gl_renderer_output_create expects `window_for_legacy' variable to be of type EGLNativeWindowType, not EGLNativeDisplayType. This variable is used later in eglCreateWindowSurface(). Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Aug 17, 2015
-
-
Pekka Paalanen authored
When the user does not specify --enable nor --disable-simple-intel-dmabuf-client, we want to autodetect based on dependencies. cb512c01 implemented this, but forgot to actually enable it if the autodetect comes positive. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Aug 16, 2015
-
-
Bryce Harrington authored
-
Bryce Harrington authored
-
Bryce Harrington authored
-
- Aug 14, 2015
-
-
Bryce Harrington authored
The buildbots discovered that recent changes break on Ubuntu 15.04's armhf images: configure:16137: checking for SIMPLE_DMABUF_CLIENT configure:16144: $PKG_CONFIG --exists --print-errors "wayland-client libdrm libdrm_intel" Package libdrm_intel was not found in the pkg-config search path. ... configure:16194: error: Package requirements (wayland-client libdrm libdrm_intel) were not met: No package 'libdrm_intel' found This patch was provided by Daniel Stone. I've not tested it other than verifying it does not cause build problems on x86_64. Acked-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Bryce Harrington authored
The buildbots discovered this issue on Ubuntu 14.04, which carries libgbm 10.1.3-0ubuntu0.4. The dmabuf changes need gbm 10.2, so it fails during build like this: src/compositor-drm.c: In function ‘drm_output_prepare_overlay_view’: src/compositor-drm.c:984:10: error: variable ‘gbm_dmabuf’ has initializer but incomplete type struct gbm_import_fd_data gbm_dmabuf = { ^ etc. Proposed fix is to conditionalize the gbm fd import feature in compositor-drm. This fix was suggested by daniels. I set up a synthetic test environment to reproduce the issue as found by the buildbots and tweaked the patch to get it to build both with and without gbm 10.2. Signed-off-by:
Bryce Harrington <bryce@osg.samsung.com>
-
v2: - adapted to protocol changes - added TODO comments - minor clean-up - change y-invert from per-plane boolean to per-buffer flag v3: - fix a typo: 1 -> i (noticed by Carlos Olmedo Escobar) Signed-off-by:
George Kiagiadakis <george.kiagiadakis@collabora.com> Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2: - add TODO note about multi-planar import and how we should do it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
Import dmabuf as an EGLImage, and hold on to the EGLImage until we are signalled a content change. On content change, destroy the EGLImage and re-import to trigger GPU cache flushes. We hold on to the EGLImage as long as possible just in case the client does other imports that might later make re-importing fail. As dmabuf protocol uses drm_fourcc codes, we need libdrm for drm_fourcc.h. However, we are not doing any libdrm function calls, so there is no new need to link to libdrm. RFCv1 changes: - fix error if dmabuf exposed unsupported - always use GL_TEXTURE_EXTERNAL_OES with dmabuf v2 changes: - improve support check and error handling - hold on to the imported EGLImage to avoid the dmabuf becoming unimportable in the future - send internal errors with linux_dmabuf_buffer_send_server_error() - import EGL_EXT_image_dma_buf_import extension headers - use heuristics to decide between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES - add comment about Mesa requirements - change y-invert from per-plane boolean to per-buffer flag Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This is a reference-counted holder of an EGLImage. For now, direct EGLImage usage is simply converted to use egl_image. Use of reference counting will come in a later patch. v2: - this is a new patch, split from gl-renderer dmabuf import support Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - implement the revised protocol - add basic sanity checks when creating buffer and check for support - add way to attach user data to the dmabuf for renderer use - bump max number of planes to 4 to follow DRM AddFb2 ioctl - improve errors handling - use separate linux_dmabuf_buffer fields for the different wl_resource types - as SERVER_ERROR code is no more, use a wl_display "generic" error for emergency-disconneting a client we fail to process - more documentation - change y-invert from per-plane boolean to per-buffer flag Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol extension for creating dmabuf-based wl_buffers in a generic manner. This does not include proper dmabuf metadata negotiation because there is no way to communicate all dmabuf constraints from the compositor to a client before-hand. The client has to create a wl_buffer wrapping one or more dmabuf buffers and then listen at the feedback object returned to know if the operation was successful. RFCv1 changes (after a first draft without code): - some renames of interfaces and argument, no semantic changes - added destructor protocol to dmabuf_batch - added feedback interface for buffer creation v2 changes: - use drm_fourcc.h as authoritative source for format codes - add support for the 64-bit layout qualifier and y-inverted dmabufs - simplify the 'add' request (no need to preserve fd numerical id) - add explicit plane index in the 'add' request - integrate the 'feedback' object events to the batch interface - rename 'create_buffer' to 'create' and move it into the batch interface - add requirements needed from the graphics stack and clients - improve existing errors and add batch error codes - removed error codes from the global interface - improve documentation for arguments, enums, etc. - rename dmabuf_batch to zlinux_buffer_params - The y-inverted property makes more sense as a whole buffer property. Y-flipping individual planes of the same buffer object is hardly useful. The y-invert is also converted into a flag, so we may add more flags later. - add flags for interlaced buffer content v3 changes: - Apply Daniel Vetter's comments about wording on coherency. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
- Aug 10, 2015
-
-
Dawid Gajownik authored
According to POSIX standard "upon successful completion, putenv() shall return 0; otherwise, it shall return a non-zero value." Unlike in setenv() we should not be checking only for negative values. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com>
-
- Aug 07, 2015
-
-
Dawid Gajownik authored
When the output can't be completely created in the backend (for example lack of memory), weston_compositor_add_output() is never run. In such a case output->link is not initialized. Letter, when weston_output_destroy() is called, application crashes on wl_list_remove(&output->link). This problem happens when drm, fbdev, rdp, rpi or wayland backend is used. v2: Initialize output->link in weston_output_init() as suggested by Derek Foreman. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Jason Ekstrand authored
Previously, we blindly created a mode for the output based on surface size and completely ignoring the output transform. This caused modesets to fail on outputs that were transformed by 90 or 270 degrees. We should be swapping the width and the height in this case. Reviewed-by:
Derek Foreman <derekf@osg.samsung.com> Tested-by:
Derek Foreman <derekf@osg.samsung.com>
-
Derek Foreman authored
If we destroy all the devices before trying to remove keyboard focus we'll segfault because we destroyed the keyboard. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Dawid Gajownik authored
- opening braces are on the same line as the if statement - opening braces are not on the same line as the function name - space between for/while/if and opening parenthesis Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Ryo Munakata authored
Signed-off-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Aug 06, 2015
-
-
When we get a focus in event from an X window which is not the one we last set as the active window, reset the focus. Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
We already do this math in compositor.c so let's not duplicate it here. Additionally, the copy here has broken zoom, so this also fixes zooming. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Daniel Stone <daniels@collabora.com>
-
Valgrind has shown that in at least one place (default_grab_pointer_focus) we're testing uninitialized values coming out of weston_compositor_pick_view. This is happening when default_grab_pointer_focus is called when there is nothing on the view list, and during the first repaint when only the black surface with no input region exists. This patch adds a function to clear pointer focus and also set the sx,sy co-ordinates to a sentinel value we shouldn't compute with. Assertions are added to make sure any time pointer focus is set to NULL these values are used. weston_compositor_pick_view() now returns these values too. Now the values are always initialized, even when no view exists, and they're initialized in such a way that actually doing computation with them should fail in an obvious way, but we can compare them safely for equality. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This seems like a good idea for consistency that the protocol header is included for any protocols used by the code. This also means the code will compile with headers generated by wayland-scanner -c. Fixed to use angle brackets. Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This makes it consistent with the pointer grab, which also gets global coordinates and not surface relative ones, and allows to easily filter out gestures based on compositor global hotspots. Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
In weston_compositor_create, we initialize output_list. After that we call weston_compositor_schedule_repaint which just calls weston_output_schedule_repaint on all elements of output_list. This call does nothing obviously. So we remove it. Signed-off-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Guilio Camuffo <guiliocamuffo@gmail.com>
-
An earlier patch made surface_resize() and surface_move() take pointers instead of seats, this updates the weston_shell_interface resize and move to match. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This allows to close the remaining issue in https://bugs.freedesktop.org/show_bug.cgi?id=91390 Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
drm, fbdev, rpi and wayland backends are unnecessarily destroying renderer and output before executing weston_compositor_shutdown() Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
When something goes wrong during weston initialization, weston_compositor_destroy() is executed. It destroys the backend and then frees compositor memory. Unfortunately RDP backend is not correctly destroyed. It frees compositor instead of a backend memory. This causes later a double free error. The easiest way to reproduce a problem is to run weston with an invalid option. Additionally some other objects of rdp_backend structure are not destroyed/freed. The patch fixes both issues. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91457 v3: comply with Weston coding style, this time for real v2: comply with Weston coding style Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
David FORT <contact@hardening-consulting.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit makes screen-share.c compile once again after changes in commit 1281a36e. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
This prevents a use after free when the surfaces are automatically cleaned up later, as shell_client's freed node was still in the surface list. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Aug 02, 2015
-
-
Dawid Gajownik authored
There's no need to check if a pointer exists before passing it to free(). free() can handle NULL pointers. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-By:
David FORT <contact@hardening-consulting.com>
-
- Jul 31, 2015
-
-
Dawid Gajownik authored
For better readability of `weston --help' output, backends are now sorted in alphabetical order. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Dawid Gajownik authored
Fixes incorrect commit d9563790 Signed-off-by:
Dawid Gajownik <gajownik@gmail.com>
-
Derek Foreman authored
Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit renames the touch/keyboard/pointer pointers and adds helper functions to get them that hide this complexity and return NULL when *_device_count is 0. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
We should be testing device counts, not pointers. The pointers are persistent state that never gets freed, and are an inaccurate indicator of device presence after the last release. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
We should be testing device counts, not pointers. The pointers are persistent state that never gets freed, and are an inaccurate indicator of device presence after a release. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-