- Oct 10, 2017
-
-
Daniel Stone authored
When disabling an output, we _really_ want a synchronous disable, so we can have the output turned off and immediately throw away all the state we had for it. The alternative to this is tracking a 'disable issued but not finished' state, which doesn't seem great? That's basically what I've done here, badly. When destroying an output, we can just jettison our state immediately, and not bother trying to disable anything. This bit isn't really done.
-
Daniel Stone authored
-
Daniel Stone authored
-
Daniel Stone authored
Use the extended GBM allocator interface to support modifiers and multi-planar BOs. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
The per-plane IN_FORMATS property adds information about format modifiers; we can use these to both feed GBM with the set of modifiers we want to use for rendering, and also as an early-out test when we're trying to see if a FB will go on a particular plane. Signed-off-by: Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Now that we can sensibly test proposed plane configurations with atomic, sprites are not broken. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Since we now incrementally test atomic state as we build it, we can loosen restrictions on what we can do with planes, and let the kernel tell us whether or not it's OK. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
The atomic API can allow us to test state before we apply it, to see if it will be valid. Add support for this, which we will later use in assign_planes to ensure our plane configuration is valid. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Return a pointer to the plane state, rather than indirecting via a weston_plane. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Add support for multiple modes: toggling whether or not the renderer and/or planes are acceptable. This will be used to implement a smarter plane-placement heuristic when we have support for testing output states. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
When trying to assign planes, keep track of the areas which are already occluded, and ignore views which are completely occluded. This allows us to build a state using planes only, when there are occluded views which cannot go into a plane behind views which can. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
When we come to assign_planes, try very hard to ignore views which are only visible on other outputs, rather than forcibly moving them to the primary plane, which causes damage all round and unnecessary repaints. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Move drm_assign_planes into two functions: one which proposes a plane configuration, and another which applies that state to the Weston internal structures. This will be used to try multiple configurations and see which is supported. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Make it a bit more clear what the purpose of the variable is. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Nothing in this loop reorders views within the compositor's view_list. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Add support for the GBM_BO_IMPORT_FD_MODIFIER path, which allows us to import multi-plane dmabufs, as well as format modifiers. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Use the new drmModeAddFB2WithModifiers interface to import buffers with modifiers. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
We currently do the same thing in two places, and will soon have a third. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
If AddFB2 ever fails for any reason, we fall back to legacy AddFB, which doesn't support the same swathe of formats, or multi-planar formats, or modifiers. This can happen with arbitrary client buffers, condemning us to the fallback forever more. Remove this, at the cost of an unnecessary ioctl for users on old kernels without AddFB2; unfortunately, we cannot detect the complete absence of the ioctl, as the return here is -EINVAL rather than -ENOTTY. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Use the same codepath, which has the added advantage of being able to import dmabufs. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
... in order to be able to use it from scanout as well. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Use the new helper to populate the cursor state as well, with some special-case handling to account for how we always upload a full-size BO. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Derek Foreman <derekf@osg.samsung.com>
-
Daniel Stone authored
Use the shiny new helper we have for working through scanout as well. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Now we have a more comprehensive overview of the transform we're going to apply, use this to explicitly disallow scaling and rotation. XXX: This does not actually disallow rotation for square surfaces. We would have to build up a full buffer->view->output transform matrix, and then analyse that. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
In our new and improved helper to determine the src/dest values for a buffer on a given plane, make sure we account for all buffer transformations, including viewport clipping. Rather than badly open-coding it ourselves, just use the helper which does exactly this. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Tiago Gomes <tiago.gomes@codethink.co.uk>
-
Daniel Stone authored
Pull this into a helper function, so we can use it everywhere. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Rather than a hardcoded ARGB8888 -> XRGB8888 translation inside a GBM-specific helper, just determine whether or not the view is opaque, and use the generic helpers to implement the format translation. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Add support for using the atomic-modesetting API to apply output state. Unlike previous series, this commit does not unflip sprites_are_broken, until further work has been done with assign_planes to make it reliable. Signed-off-by: Daniel Stone <daniels@collabora.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Co-authored-by: Louis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.com> Co-authored-by: Derek Foreman <derek.foreman@collabora.co.uk>
-
Daniel Stone authored
Much like we already have to_drm_output and to_drm_backend. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
For atomic modesetting support, the mode is identified by a blob property ID, rather than being passed inline. Add a blob_id member to drm_mode to handle this, including refactoring mode destruction into a helper function. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Set the atomic client cap, where it exists, and use this to discover the plane/CRTC/connector properties we require for atomic modesetting. Signed-off-by: Daniel Stone <daniels@collabora.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
When leaving Weston, don't attempt to restore the previous CRTC settings. The framebuffer may well have disappeared, and in every likelihood, whoever gets the KMS device afterwards will be repainting anyway. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Rather than open-coding it ourselves, use the new apply_state helper in drm_output_start_repaint. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Fabien DESSENNE <fabien.dessenne@st.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Split repaint into two stages, as implied by the grouped-repaint interface: drm_output_repaint generates the repaint state only, and drm_repaint_flush applies it. This also moves DPMS into output state. Previously, the usual way to DPMS off was that repaint would be called and apply its state, followed by set_dpms being called afterwards to push the DPMS state separately. As this happens before the repaint_flush hook, with no change to DPMS we would set DPMS off, then immediately re-enable the output by posting the repaint. Not ideal. Moving DPMS application at the same time complicates this patch, but I couldn't find a way to split it; if we keep set_dpms before begin_flush then we break DPMS off, or if we try to move DPMS to output state before using the repaint flush, we get stuck as the repaint hook generates an asynchronous state update, followed immediately by set_dpms generating a synchronous state update. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
- Oct 07, 2017
-
-
Daniel Stone authored
If we have an unused CRTC or connector, explicitly disable it during the end of the repaint cycle, or when we get VT-switched back in. This commit moves state_invalid from an output property to a backend property, as the unused CRTCs or connectors are likely not tracked by drm_outputs. This matches the mechanics of later commits, where we move to a global repaint-flush hook, applying the state for all outputs in one go. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Rather than a more piecemeal approach at backend creation, explicitly track connectors and CRTCs we do not intend to use, so we can ensure they are disabled where appropriate. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
If we don't have any damage for the primary plane, then don't force a repaint; simply reuse the old buffer we already have. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Calling switch_mode with no output or mode never makes any sense. Drop the NULL checks. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Use a real drm_plane to back the scanout plane, displacing output->fb_{last,cur,pending} to their plane-tracked equivalents. Signed-off-by: Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Change the type of cursor_plane from a weston_plane (base tracking structure) to a drm_plane (wrapper containing additional DRM-specific details), and make it a dynamically-allocated pointer. Using the standard drm_plane allows us to reuse code which already deals with drm_planes, e.g. a common cleanup function. This patch introduces a 'special plane' helper, creating a drm_plane either from a real KMS plane when using universal planes, or a fake plane otherwise. Without universal planes, the cursor and primary planes are hidden from us; this helper allows us to pretend otherwise. Signed-off-by: Daniel Stone <daniels@collabora.com>
-