- Apr 07, 2017
-
-
We implement v2 so use that instead of the DRM_EVENT_CONTEXT_VERSION macro. The latter defines the version of the drmEventContext struct declared in the header [used in the current build] and can be 2, 3 or even 1000. Signed-off-by:
Emil Velikov <emil.velikov@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Instead of setting state members directly in the drm_output_render functions (to paint using Pixman or GL), just return a drm_fb, and let the core function place it in state. This brings damage handling in line with repaint state, so we do not clear damage if repaint fails. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Call drm_output_render unconditionally, doing an early exit if we're already rendering a client buffer on the primary plane. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
'next' is used as a framebuffer which has either been rendered but not had a configuration request (pageflip or CRTC set) applied to it, or when for a framebuffer that has had configuration requested but not applied (delayed pageflip where the event has not been applied). 'current' is used as the last framebuffer for which we know configuration has been fully applied, i.e. CRTC set executed or pageflip requested and event received. Rename these members to fb_current and fb_pending, doing some small reordering of drm_output whilst in the vicinity. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Now that we have better types in drm_fb, use it for cursor buffers as well. This gives us easier refcounting for our cursors, as well as a unified buffer-destruction path. Currently this makes no difference, as the KMS legacy cursor update API uses GEM names directly, and never touches DRM FBs. However, the cursor plane becomes a regular KMS plane under atomic, at which point we require DRM FBs. Take the opportunity to move to drm_fb ahead of time. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Sometimes we need to duplicate an existing drm_fb, e.g. when pageflipping to the same buffer to kickstart the repaint loop. To handle situations like these, and simplify resource management for dumb and cursor buffers, refcount drm_fb. drm_fb_get_from_bo has a path where it may reuse a drm_fb, if the BO has been imported and not released yet. As drm_fb_unref now relies on actual refcounting (backed up by asserts), we add a balancing drm_fb_ref() to the path where we return a reused drm_fb. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
We only need it for the GBM surface the FB was originally created against; a mismatch here is very bad indeed, so no reason to pass it in explictly every time rather than store it. Following patches change drm_fb to be explicitly reference counted; in order to reduce churn, rename drm_output_release_fb to drm_fb_unref whilst changing its call signature here, even though it does not yet actually perform reference counting. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Armin Krezović <krezovic.armin@gmail.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
The drm_fb destroy callback to mostly the same thing regardless of whether the buffer is a dumb buffer or gbm buffer. This patch refactors the common parts into a new function that can be called for both cases. [daniels: Rebased on top of fb->fd changes, cosmetic changes.] Signed-off-by:
Tomohito Esaki <etom@igel.co.jp> Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
This uses the new pixel-format helpers, so we can also replace depth/bpp with these. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalaneN@collabora.co.uk>
-
Rather than magically trying to infer what the buffer is and what we should do with it when we go to destroy it, add an explicit type instead. In doing so, the test for dumb images (destroying them, but only if they're not the 'live' ones) is removed. This was dead code, as the only path which could cause us to shuffle images is drm_output_switch_mode. This calls drm_output_release_fb before the images are reallocated in drm_output_fini_pixman / drm_output_init_pixman, with the reallocation unconditionally destroying the images, so can never be hit. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Make drm_output_set_cursor more deterministic, by calculating more state and performing more plane manipulation, inside drm_output_prepare_cursor_view. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Rather than duplicating knowledge of pixel formats across several components, create a custom central repository. Signed-off-by:
Daniel Stone <daniels@collabora.com> [Pekka: fix include paths and two copy-pastas] Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Libdrm provides headers that are useful even without libdrm.so itself, particularly drm_fourcc.h. Therefore promote libdrm as a hard build-time dependency of libweston core so that we can always rely on libdrm headers. This does not affect any runtime dependencies. Specifically, no runtime dependency to libdrm.so is added in any build configuration. Currently only gl-renderer is using drm_fourcc.h. Now we can drop the GL_RENDERER check from configure.ac and just use LIBDRM_CFLAGS. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka, from Quentin: just drop have_libdrm var completely] Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Pekka Paalanen authored
The pkg-config test for LIBDRM is independent of whether the DRM backend is enabled or not. Therefore it is possible to have libdrm available and found, even though it is not needed. Do not link libdrm.so into the launchers unless it is really needed, that is, DRM compositor is built. Otherwise you end up with fbdev-backend.so and weston-launch depending on libdrm.so. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Pekka Paalanen authored
HAVE_LIBDRM was used as a condition for the launcher infrastructure to call libdrm.so functions. It was set by an independent test for libdrm, which would silently continue if libdrm was not found. It was assumed that if you enabled a feature that used libdrm at runtime, the test for that feature would imply that HAVE_LIBDRM is also set. This was quite subtle. The only feature that actually uses libdrm.so at runtime is the DRM backend. No other backend needs the libdrm calls in the launcher infrastructure. Therefore to simplify things, stop using HAVE_LIBDRM and use BUILD_DRM_COMPOSITOR instead. If you enable the DRM compositor, you automatically also get libdrm support in the launchers. There are still things depending on LIBDRM_CFLAGS and LIBDRM_LIBS, so the test cannot be removed completely. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Apr 06, 2017
-
-
Emmanuel Gil Peyrot authored
During a maximize event, a surface was previously always put back to the primary output after one frame on the correct output, while keeping its size. This was caused by the shell surface’s last_{width,height} not being reset when it was either fullscreen or maximized, leading to the unmaximize/maximize dance being done at each commit. This was introduced in 8f9d90a8. Changes since v1: - Fix the actual issue instead of a symptom. Signed-off-by:
Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 30, 2017
-
-
Sergi Granell authored
Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Raúl Peñacoba authored
Signed-off-by:
Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Raúl Peñacoba authored
Signed-off-by:
Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Raúl Peñacoba authored
Signed-off-by:
Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by:
Emre Ucan <eucan@de.adit-jv.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Raúl Peñacoba authored
Signed-off-by:
Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Sergi Granell authored
Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 25, 2017
-
-
Sergi Granell authored
Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Raúl Peñacoba authored
Signed-off-by:
Raúl Peñacoba <raul.mikaop.zelda@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 24, 2017
-
-
Sergi Granell authored
This way Wayland compositors will be aware of Weston's "visible bounds" (and ignore its shadows). Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Derek Foreman authored
If anything is printed for the terminal window to display before the window has been initially sized we end up with a segfault. This defers the exec() of the shell child process until after the window is sized so this can't happen anymore. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Derek Foreman authored
Client applications shouldn't be in the same process group as the display server. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Derek Foreman authored
We don't want to leak this into apps launched from the panel. stdout and stderr are left for now because some things launched by weston - such as weston-keyboard - share weston's log by printing to those fds. I'm singling out stdin because it's never needed by a child process and because it's value is 0, which makes it easy to accidentally do bad things to (commit 5c611d93) Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Derek Foreman authored
The man page indicates that ftruncate() can set errno to EINTR, so test for this. I have not actually been able to provoke an EINTR error from ftruncate() in testing though. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Derek Foreman authored
posix_fallocate() can return EINTR and need to be restarted - I've hit this when running weston-terminal under gdb. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Sergi Granell authored
If wayland_output_create_common returns NULL, it means that the output creation failed. Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Armin Krezović <krezovic.armin@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
Sergi Granell authored
struct wayland_output::name was used but never initialized. Also zxdg_toplevel_v6_set_title was only called for windowed outputs, and some compositors let you see the client's name even when it is fullscreen (GNOME Shell's Activities menu for example). So rename struct wayland_output::name to struct wayland_output::title and precompute it on wayland_output_create_common(), so it can be later used on xdg's set_title and frame_create. v2: Move zxdg_toplevel_v6_set_title() before the wl_surface_commit() as per Quentin Glidic's suggestion. Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Armin Krezović <krezovic.armin@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 22, 2017
-
-
Sergi Granell authored
Signed-off-by:
Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net>
-
- Mar 20, 2017
-
-
The paragraph about pageflip-timeout was added in between the two paragraphs of idle-time, causing the paragraphs to be associated wrong. Move the pageflip-timeout paragraph to the end. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100163 Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Mar 17, 2017
-
-
This is useful for testing compositor response to a client that requests a maximized initial surface. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Same as with c4d7f66c, but I hadn't done a full-tree rebuild so didn't see this one go by. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
When the wheel tilt source is present, gcc complains that we don't handle all possible enumeration values. We already ensure this cannot happen in its only caller (handle_pointer_axis), but gcc doesn't recognise this. Give it a default value to quiet the warning. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Peter Hutterer <peter.hutterer@who-t.net>
-
According to v4l2 documentation, DQBUF always clears FLAG_DONE, so this assert can be expected to fire 100% of the time. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Mar 16, 2017
-
-
Pekka Paalanen authored
Bump the future release to 3.0.0 due to breaking ABI in libweston. We have merged a few patches already that change libweston/compositor.h. While most of the changes arguably change only things libweston users should not be touching, some change the size of e.g. struct weston_output and struct weston_compositor, possibly moving member offsets. We also haven't separated public and private parts from compositor.h yet. To be on the safe side, bump the major now. I'm sure there will be more changes that make the bump obviously necessary. Cc: Bryce Harrington <bryce@osg.samsung.com> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Mar 14, 2017
-
-
Implement new repaint_begin and repaint_flush hooks inside weston_backend, allowing backends to gang together repaints which trigger at the same time. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-