- Apr 07, 2017
-
-
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
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>
-
- Mar 30, 2017
-
-
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>
-
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>
-
- 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>
-
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 17, 2017
-
-
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>
-
- 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>
-
In preparation for grouping output repaint together where possible, switch the per-output repaint timer, to a global timer which iterates across all outputs. This is implemented by storing the absolute time for the next repaint for each output locally, and maintaining a global timer which iterates all of them, scheduling the repaint for the first available time. Signed-off-by:
Daniel Stone <daniels@collabora.com> Cc: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: The comment about 1 ms delay.] Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Mar 13, 2017
-
-
Daniel Stone authored
glibc 2.25 produces a warning when sysmacros.h is not directly included but major() is used, as it is intended to be moved to sysmacros.h and only there. Include it to keep the build happy. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
-
repaint_scheduled is actually cleverly a quad-state, disguised as a boolean. There are four possible conditions for the repaint loop to be in at any time: - loop idle; no repaint will occur until specifically requested, which may be never (repaint_scheduled == 0) - loop schedule to begin: the loop was previously idle, but due to a repaint-schedule request, we will call the start_repaint_loop hook in the next idle task - repaint scheduled: the compositor has definitively scheduled a repaint request for this output, which will occur in fixed time - awaiting repaint completion: the backend has not yet signaled completion of the last repaint request, and the compositor will not schedule another until it does so All but the first condition were previously conflated as repaint_scheduled == 1, but break them out into separate conditions to aid clarity, backed up by some asserts. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
It is only used as a binary value. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
On startup, we cannot lock on to the repaint timer because it is unknown to us. We deal with this by claiming that the moment of entry into the repaint loop is the moment a frame returned, causing finish_frame to delay our initial repaint to (refresh_time - repaint_delay), typically around 9ms of utterly wasted time. Add an explicit stamp == NULL, to determine that we are just beginning our repaint loop, that the timings are in fact totally invalid, and that it would be beneficial to repaint the output immediately. This will only trigger when the display had previously been disabled or the previous state is unknown, e.g. at startup, or coming back from DPMS off. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Rather than determining the time until next-frame repaint in relative space (time until repaint), determine it first in absolute space, and then later convert this to relative. This will later allow us to store these per-output, so we can have a single idle timer which will allow us to aggregate multiple repaints together when timing allows. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Paralleling timespec_to_nsec, converts to milliseconds. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: added doc about flooring] Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Mar 07, 2017
-
-
Weston will not repaint until previous update has been acked by a pageflip event coming from the drm driver. However, some buggy drivers won’t return those events or will stop sending them at some point and Weston output repaints will completely freeze. To ease developers’ task in testing their drivers, this patch makes compositor-drm use a timer to detect cases where those pageflip events stop coming. This timeout implementation is software only and includes basic features usually found in a watchdog. We simply exit Weston gracefully with a log message and an exit code when the timout is reached. The timeout value can be set via weston.ini by adding a pageflip-timeout=<MILLISECONDS> entry under [core] section. Setting it to 0 disables the timeout feature. v2: - Made sure we would get both the pageflip and the vblank events before stopping the timer. - Reordered the error and success cases in drm_output_pageflip_timer_create() to be more in line with the rest of the code. v3: - Reordered (de)arming of the timer with the code around it to avoid it being rearmed before the current dearming. - Return the proper value for the dispatcher in the pageflip_timeout callback. - Also display the output name in case the timer fires. v4: - Reordered a forgotten timer rearming after its drmModePageFlip(). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83884 Signed-off-by: Frederic Plourde <frederic.plourde at collabora.co.uk> Signed-off-by:
Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Feb 27, 2017
-
-
Makes the code easier to read and browse through. Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Already considered and handled as such. Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Don't import buffers which span multiple outputs, short-cut any attempt to import SHM buffers, and ignore buffers with a global alpha set. I'm not convinced all of these conditions entirely make sense, but this at least makes them equally nonsensical. Differential Revision: https://phabricator.freedesktop.org/D1414 Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
And properly deconstruct it in drm_output_destroy. Might be useful for finding out which modes are supported before even setting them, in case we want to extend the modesetting API. Signed-off-by:
Armin Krezović <krezovic.armin@gmail.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Previously in picking CRTC -> encoder -> connecting routing, we went for the first triplet we found which claimed to work. Preserving the existing routing means that startup will be faster: on a multi-head system, changing the routing implies disabling both CRTCs, then re-enabling them with a new configuration, which may involve retraining links etc. Furthermore, the existing routing may be set for a reason; each CRTC/encoder is not necessarily as capable as the other, so the routing may be configured to stay within such device limits. Try where possible to respect the routing we pick up, rather than blithely configuring our own. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Given that we can have render-only devices, or vgem in a class of its own, ignore any non-KMS devices in compositor-drm's device selection. For x86 platforms, this is mostly a non-issue since we look at the udev boot_vga issue, but other architectures which lack this, and have multiple KMS devices present, will hit this. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com> Reported-by:
Thierry Reding <treding@nvidia.com> Reported-by:
Daniel Vetter <daniel.vetter@intel.com>
-
- Feb 13, 2017
-
-
A handful of source files were not using the MIT Expat text in COPYING. Update these files to bring them inline with the rest, standardizing on the MIT Expat text. Signed-off-by:
Yong Bakos <ybakos@humanoriented.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Signed-off-by:
Armin Krezović <krezovic.armin@gmail.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
- Feb 09, 2017
-
-
Daniel Stone authored
Remove the last usage of connector_allocator, which was to check for displays which have been hot-unplugged, and replace it with an array which doesn't rely on the connector IDs remaining below 32 (or 64). Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reported-by:
Peter Senna Tschudin <peter.senna@collabora.com>
-
Daniel Stone authored
Rather than using connector_allocator to determine whether an output is newly connected or not, use a list walk across all outputs instead. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reported-by:
Peter Senna Tschudin <peter.senna@collabora.com>
-
Daniel Stone authored
crtc_allocator was used as a bitmask of CRTC IDs, so we didn't try to use the same CRTC for multiple outputs. Unfortunately, this only works to the extent that CRTC object IDs fit within the bitmask; though they were previously, they are not guaranteed to be under 32 or even 64. Replace the only use of crtc_allocator with a list walk across outputs. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Quentin Glidic <sardemff7+git@sardemff7.net> Reported-by:
Peter Senna Tschudin <peter.senna@collabora.com>
-
- Feb 07, 2017
-
-
Signed-off-by:
Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
When a client changes the subsurfaces state, we need to damage them so the result is visible. We do that by flagging the surfaces when the state changes and causing damage when committing the state. This prevents normal repaints from considering these changes until a commit has happened, and allows the client to atomically schedule several changes. This fixes the subsurface_z_order test, which is now marked as expected to succeed. Signed-off-by:
Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Micah Fedke <micah.fedke@collabora.co.uk>
-
The connector option is a part of drm_backend struct. Therefore, it is not needed to pass it as an argument to create_outputs function. Signed-off-by:
Emre Ucan <eucan@de.adit-jv.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by:
Daniel Stone <daniels@collabora.com>
-
weston can be started with --connector option to be initialized with a particular output. But in the update_outputs this option is not considered and output is created for all the available connectors. This patch fixes this issue by considering the option for connectors in the update_outputs. Signed-off-by:
Emre Ucan <eucan@de.adit-jv.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by:
Daniel Stone <daniels@collabora.com>
-
- Feb 06, 2017
-
-
This patch checks the attribute flags on incoming dmabufs and refuses to put them overlays if they have any of the flags set (currently: ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT, ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED and ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST), instead defaulting to the gl-renderer which can handle some of the flags. This check should be superceded by buffer transforms, when they become available. Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Feb 04, 2017
-
-
Bryce Harrington authored
-
- Jan 30, 2017
-
-
Daniel Stone authored
Given that it's used by clients, it's really the very definition of shared. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Daniel Stone authored
repaint_needed / repaint_scheduled are surprisingly subtle. Explode the conditional with side-effects into more obvious separate calls, and document what they do. Signed-off-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-