Commit Graph

559 Commits

Author SHA1 Message Date
Marius Vlad
7d070ca0ba Fix compiler warnings generated by older toolchains/compiler
This fixes warnings like ``may be used uninitialized''

libweston/compositor-drm.c: In function 'drm_device_is_kms':
libweston/compositor-drm.c:6374:12: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
  b->drm.id = id;

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
2018-12-15 18:37:53 +02:00
Daniel Stone
8011b0fa03 Add Meson build system
Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.

More information at http://mesonbuild.com

Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.

This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.

It is expected that the autotools build system will be removed soon
after the next Weston release.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
2018-12-09 14:50:54 +02:00
David Fort
7b7d9d316a rdp-compositor: fix compilation with FreeRDP 2.0-rc4
Some members have been removed from FreeRDP structs, so let's use local
variables.
2018-12-04 23:42:27 +01:00
Marius Vlad
00a6e01d53 compositor: Make pixel format printing in human-friendly form
This would make weston-debug much more readable when looking at
the pixel format of the buffer.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
2018-11-20 18:00:25 +02:00
Marius Vlad
a9a630401f pixel-formats: Added pixel_format_get_info_shm() helper for printing SHM buffers
In current form SHM buffers pixel format can only be printed as 0 and 1.
With the help of this helper we align with DRM_FORMAT_ pixel format.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
2018-11-20 18:00:09 +02:00
Pekka Paalanen
62a9436417 compositor-drm: parse all DRM format names
Use the pixel format table to parse format names. This makes the parser
recognize almost all DRM format names.

Not all formats are usable, but we rely on the use to fail
appropriately. What we can use depends on the drivers anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-11-20 12:05:11 +02:00
Pekka Paalanen
f5ed7431e5 pixel-formats: search by name
Add a function to find a format description by the DRM format name. This
will be useful when parsing configuration strings.

While at it, fix the two function formattings in pixel-formats.h to
match everything else in the file.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-11-20 12:05:11 +02:00
Pekka Paalanen
e7c91b61c7 pixel-formats: add name string
There is often a need to print the name of a pixel format. Printing the
raw numeric value is hard to decipher, printing the four ASCII
characters is slightly more human-friendly but still needs a decoder
table. Add a name that can be printed easily.

The bulk of this patch was done with:
sed -i -e 's/\.format = DRM_FORMAT_\(.\+\),/DRM_FORMAT(\1),/' libweston/pixel-formats.c

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-11-20 12:05:11 +02:00
Arkadiusz Hiler
5a5cbc0245 compositor-drm: Log atomic commits and flips
Add a couple log points for tracking atomic commits and flip processing.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-11-03 09:13:09 +00:00
Vasilis Liaskovitis
486b463a18 gl-renderer, pixman: disconnect the client on unhandled buffer type.
Introduce a helper function to disconnect the client on unhandled
buffer types, and use it in the gl and pixman renderers. The function
is modeled after linux_dmabuf_buffer_send_server_error.

Also print the egl error state in the gl renderer, in case the
unrecognized buffer error happens when querying an egl buffer.

https://gitlab.freedesktop.org/wayland/weston/issues/148
2018-11-02 14:28:05 +00:00
Deepak Rawat
a864f58f44 compositor-drm: Read FB2_MODIFIERS capability
Not all drivers support fb2 modifiers so read the capability before
using drmModeAddFB2WithModifiers.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
2018-11-02 13:28:34 +00:00
Tomohito Esaki
b1fb00dbcd compositor-drm: Add Support virtual output
Add support virtual output for streaming image to remote output by
remoting-plugin which will be added by the patch:
"Add remoting plugin for output streaming."
The gbm bo of virtual output is the linear format.

Virtual output is implemented based on a patch by Grigory Kletsko
<grigory.kletsko@cogentembedded.com>.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2018-10-30 17:09:01 +09:00
Tomohito Esaki
718a40b49c compositor-drm: store gbm bo flags in drm_output
Store usage flags of gbm bo in drm_output in order to specify the bo
format for each output. A following patch will add a new type of
drm_output which requires different gbm_bo_flags.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2018-10-30 17:09:01 +09:00
Tomohito Esaki
1506e99fd3 gl-renderer: provide fence sync fd for synchronizing with GPU rendering
Add new API to gl-renderer interface for providing fence sync fd. the
backend can wait for GPU rendering by this API.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2018-10-30 17:09:01 +09:00
Tomohito Esaki
4976b09a7e compositor-drm: add num_planes to drm_fb structure
Add new member to store number of planes to drm_fb structure.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
2018-10-30 17:09:01 +09:00
Emil Velikov
da4f185faa libweston: print EGL information as early as possible
In the case where CreateContext/MakeCurrent fails, we still want to
know what the EGL driver is capable of.

Move the EGL info printing, just after the eglInitialize() call to
ensure that.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-10-18 16:14:05 +01:00
Emil Velikov
3bb047b605 libweston: split EGL and GL info logging
Split the two into separate functions. Former requires an initialized
EGL display, while the latter a current context.

We will use that distinction with the next patch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-10-18 16:14:03 +01:00
Daniel Stone
bff27cb835 compositor-drm: Don't warn about missing backlight control
Not every output will have a backlight control, and even if it does we
may just not be able to find it. Not having backlight control isn't an
error, so don't spam the log with it, as doing so can confuse users into
thinking this is an actual error which is responsible for their real
problems.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-09-23 11:21:40 +02:00
Daniel Stone
a65d55e133 gl-renderer: Remove warning on missing extensions
Not having swap_buffers_with_damage could cause a performance impact on
some backends, but at least on GBM it causes no issues. It also seems to
confuse users into thinking it's a legitimate error which could explain
session slowness.

Similarly with buffer_age, whilst we do lose a little bit of performance
by not being able to do partial renders, it is not a great deal, and the
user is unlikely to be able to do anything about it in any event.

Remove the warning; we print the full extension list at startup, so we
already have enough information from the logs to easily diagnose any
real errors.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-09-23 11:21:40 +02:00
Philipp Zabel
61dc4ca92e compositor-drm: check connector non-desktop property and mark head accordingly
Use the DRM connector "non-desktop" property to mark weston_heads that
represent head mounted displays and other non-standard displays that the
desktop should not be extended to.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2018-09-23 09:18:00 +00:00
Philipp Zabel
c18ffd3939 libweston: add weston_head_{is,set}_non_desktop()
Add non-desktop property for weston_heads representing displays that the
desktop should not be extended to by default, e.g. head mounted displays.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2018-09-23 09:18:00 +00:00
Philipp Zabel
fff2797c88 compositor-drm: use weston_view_is_opaque()
Implement drm_view_is_opaque() using weston_view_is_opaque(). Also, use
weston_view_is_opaque() directly in drm_output_propose_state(), with the
clipped_view.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2018-09-18 19:22:20 +02:00
Philipp Zabel
70decd5b2b libweston: add weston_view_is_opaque()
Use the weston_surface is_opaque property, the opaque region, and the view
alpha value to determine whether the weston_view is opaque in a specific
region.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2018-09-18 19:21:46 +02:00
Philipp Zabel
195dadeb2a libweston: add weston_surface is_opaque property
Add an is_opaque property that is set to true if the attached buffer does not
have an alpha component, or if the solid color is non-transparent.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2018-09-18 19:21:46 +02:00
Changwoo Cho
f97d250847 libweston: fix typo in comment 2018-09-18 09:58:35 +00:00
Daniel Stone
1cbe1f952d compositor-drm: Add drm-backend log debug scope
Add a 'drm-debug' scope which prints verbose information about the DRM
backend's repaint cycle, including the decision tree on how views are
assigned (or not) to planes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-09-17 13:29:48 +01:00
Daniel Stone
64dbbee7f6 compositor-drm: Add backend pointer to drm_output
Add this for convenience, so it's easier to access when we add the DRM
backend debug scope.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-09-17 13:29:48 +01:00
Daniel Stone
3158a2d42e compositor-drm: Calculate atomic-commit flags earlier
Shift up our calculation of the flags we use for atomic commits. We will
later use this to differentiate between test-only and full commits when
printing debug information inside drm_output_state_apply_atomic.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-09-17 13:29:48 +01:00
Daniel Stone
ce62cb3d05 compositor: Add scene-graph debug scope
Add a 'scene-graph' debug scope which will dump out the current set of
outputs, layers, and views and as much information as possible about how
they are rendered and composited.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-09-17 13:29:48 +01:00
Daniel Stone
3b7756351d compositor: Add weston_layer_mask_is_infinite
As a counterpart to weston_layer_set_mask_infinite(), returning if the
mask is the same as what is set.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-09-17 13:29:48 +01:00
Pekka Paalanen
a5630eafec libweston: add weston_debug API and implementation
weston_debug is both a libweston API for relaying debugging messages,
and the compositor-debug wayland protocol implementation for accessing those
debug messages from a Wayland client.

weston_debug_compositor_{create,destroy}() are private API, hence not
exported.

Signed-off-by: Pekka Paalanen <pq@iki.fi>

append the debug scope name along with the timestamp in
weston_debug_scope_timestamp API

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Add explicit advertisement of debug scope names.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2018-09-17 13:29:23 +01:00
Pekka Paalanen
4fc1ee8d5b protocol: add weston-debug.xml
This is a new debugging extension for non-production environments. The
aim is to replace all build-time choosable debug prints in the
compositor with runtime subscribable debug streams.

Signed-off-by: Pekka Paalanen <pq@iki.fi>

Added new libweston-$MAJOR-protocols.pc file and install that
for external projects to find the XML files installed by libweston.

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>

Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop
unnecessary EXTRA_DIST of weston-debug.xml.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Add explicit advertisement of available debug interfaces.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2018-09-11 15:24:46 +01:00
Matteo Valdina
3ebbc6b5df gl-renderer: Explicitly zeroing the offset for 2^ plane of SHM_FOMRAT_YUYV
This fix a crash, when gl-renderer uploads the 2^ texture for YUYV.
The pixels buffer was offset of a random value.
2018-08-31 09:47:59 -05:00
Stefan Agner
30e283de70 compositor-drm: add DPI connector type
Linux v4.7 introduced a new connector type for display parallel
interface (DPI). Add DPI to the list of connectors in the DRM
backend of Weston as well. This avoid DPI connectors showing up
as UNNAMED.

Signed-off-by: Stefan Agner <stefan@agner.ch>
2018-08-20 17:11:38 +02:00
Derek Foreman
76829fc4ea input: Send unique keymap file descriptors to clients
Client may map any file descriptor opened for writing with PROT_WRITE
themselves.  On linux, even a read-only file descriptor to an unlinked
file can be re-opened with write permission through /proc/self/fd.

The only way to prevent this is to create a memfd which
is subsequently write-sealed.  Unfortunately this prevents clients
from mapping with MAP_SHARED, which is already in widespread usage.

To isolate and protect the keymap, whilst allowing MAP_SHARED clients
to continue to work, use a unique file descriptor for each
wl_keyboard resource.

Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-08-17 09:25:24 -05:00
Derek Foreman
f8f7fd69df input: add weston_keyboard_send_keymap helper function
We've always had "send_keymap" internally, but some places failed to use
it.  Since we also use this in the text backend, export it.

Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-08-17 09:25:21 -05:00
Daniel Stone
48687982b5 compositor-drm: Remove addfb warning for user buffers
THe KMS AddFB call can fail for any reason at all: format/modifier not
suitable, stride not aligned, allocation not contiguous, etc. If this
happens with Weston's own buffers, the result is bad - no composition
output.

Failing AddFB from user-supplied buffers though, is not an error. The
user can't necessarily allocate suitable buffers, nor does it have to.
Don't spam the log with warnings when we fail on user buffers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-07-27 11:21:10 -05:00
Daniel Stone
1178922590 compositor-drm: Don't test render-only atomic configuration
In the RENDERER_ONLY state proposal mode, we don't actually have a
viable configuration to test, because we won't get a renderer buffer
until after assign_planes - where we're called from - has completed.

This can result in us trying to test a configuration with the CRTC and
connectors active, but no planes active, which the kernel can
legitimately fail.

If we're working in renderer-only mode, just return the state we have
without trying to test it first, and let the kernel fill it in later.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-07-27 11:20:47 -05:00
Daniel Stone
8c9556c57d compositor-drm: Remove unnecessary libdrm defines
The backend begins with a series of #defines of libdrm tokens, in case
the libdrm we build against is too old.

Commit efdebbc4e8 ("configure.ac: bump libdrm requirement to 2.4.68")
did what it said on the box; since we now depend on a relatively modern
libdrm, we can get rid of most of our compatibility defines.

DRM_CAP_TIMESTAMP_MONOTONIC was added in libdrm 2.4.47 (f8f1f6e37ae2).
DRM_CLIENT_CAP_UNIVERSAL_PLANES was added in libdrm 2.4.55
(8fc62ca8ac01).
DRM_CAP_CURSOR_WIDTH and HEIGHT were added in libdrm 2.4.68
(cc9a53f076d4).

Remove these four fallback definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-07-27 11:20:25 -05:00
Daniel Stone
678aabe829 compositor-drm: Enable planes for atomic
Now that we can sensibly test proposed plane configurations with atomic,
sprites are not broken.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 14:17:52 +01:00
Daniel Stone
9fe4bf8863 compositor-drm: Relax plane restrictions for atomic
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>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 14:17:52 +01:00
Daniel Stone
b41abf9c84 compositor-drm: Allow scanout plane to be occluded by overlay
a0f8276fe8 ("compositor-drm: Disallow overlapping overlay planes") was
a little too pessimistic in rejecting occluded views. Whilst it
correctly prevented overlay planes from occluding each other, it also
prevented overlay planes from occluding the scanout plane.

This is undesirable: the primary/scanout plane is specified to stack
strictly below all overlay planes, so there is no need to reject a plane
from consideration for scanout due to being occluded by an overlay
plane.

Shift the check downwards so it only applies to overlay rather than
scanout planes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 14:17:52 +01:00
Daniel Stone
a284d271f1 compositor-drm: Incrementally test plane states in mixed mode
In the plane-only mode, we try to place every view on a hardware plane,
and fail if we can't do this. This requires a full walk of the scene
graph to come up with a complete configuration in order to be able to
test.

In mixed mode, we know at least some visible views will fail to be
promoted to planes and must be composited via the renderer. In order to
still use some planes where possible, we use atomic modesetting's
test-only mode to incrementally test configurations.

We know that the renderer output will always be visible, and because it
is the renderer, that it will be occupying the scanout plane underneath
everything else. The actual renderer buffer doesn't materialise until
after assign_planes, because it cannot know what to render until then.

However, in order to test whether a configuration is valid, we need the
renderer buffer in the scanout plane. For testing, we fake this by
temporarily stealing the old buffer - if it seems sufficiently
compatible - and placing it in the state we construct. This is used to
test whether or not a renderer buffer will work with the addition of
overlay planes.

Doing this incremental testing will allow us to enable plane usage for
atomic by default, since we know ahead of time that our chosen plane
configuration will work.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 14:17:52 +01:00
Daniel Stone
d12e51646a compositor-drm: Add planes-only mode to state proposal
Add a new mode, which attempts to construct a scene exclusively using
planes. This is a building block for incrementally testing and
constructing state: in the plane-only mode, we test the state exactly
once, when we have constructed a full set of planes and want to know if
it works or not.

When using the renderer, we need to incrementally test views one by one
to see if they will work on planes, falling back to the renderer if not.
This test is different, since the scanout plane will be occupied by the
renderer's buffer. Testing using the renderer or client buffers may have
completely different characteristics, so we need two passes: first,
constructing a state with only planes and testing if that succeeds,
falling back later to a mixed renderer/plane mode which tests
incrementally.

This implements the first mode, and preferentially attempts to use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 13:08:57 +01:00
Daniel Stone
ca6fbe3c93 compositor-drm: Never lift solid surfaces to planes
This will never work, so don't even try to do it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:50:23 +01:00
Daniel Stone
bb6c19f7bb compositor-drm: Add test-only mode to state application
The atomic API can allow us to test state before we apply it, to see if
it will be valid. Use this when we construct a plane configuration, to
see if it has a chance of ever working. If not, we can fail
assign_planes early.

This will be used in later patches to incrementally build state by
proposing and testing potential configurations one at a time.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:49:53 +01:00
Daniel Stone
f829062ef4 compositor-drm: Return plane state from plane preparation
Return a pointer to the plane state, rather than returning its
underlying weston_plane. This eliminates any ambiguity between placing
client buffers on planes, and placing them through the renderer.

drm_output_propose_state is only concerned with preparing, testing, and
returning DRM state objects. Assigning views to weston_planes only
happens later, inside drm_assign_planes. This makes that split more
clear.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:45:07 +01:00
Daniel Stone
f7a2f835ae compositor-drm: Add modes to drm_output_propose_state
Add support for multiple modes to drm_output_propose_state. Currently we
intend to operate in three modes: planes-only (no renderer buffer,
client buffers in planes only), mixed-mode (promote client buffers to
planes where possible, falling back to the renderer where not), and
renderer-only (no plane usage at all).

We want to use the first (planes-only) mode where possible: it can avoid
us having to allocate buffers for the renderer, and it also gives us the
best chance of the optimal configuration, with no composition. In this
mode, we walk the scene looking at all views, trying to put them in
planes, and failing as soon as we find a view we cannot place in a
plane.

In the second mode, rather than failing, we assign those views which
cannot be on a plane to the renderer, and allow the renderer to
composite them.

In the third mode, planes are not usable, so everything but the cursor
goes to the renderer. We will use this when we cannot use the planes-only
mode (because some views cannot be placed in planes), but also cannot
use the 'mixed' mode because we have no renderer buffer yet. Since we
walk the scene graph from top to bottom, using atomic modesetting we
will determine if planes can be promoted in mixed mode by placing a
renderer buffer at the bottom of the scene, placing a cursor buffer if
applicable, then testing if we can add overlay planes to this mode.

Without a buffer from the renderer, we cannot do these tests, so we push
everything through the renderer and then switch to mixed mode on the
next repaint.

This patch implements the mixed and renderer-only modes (previously
differentiated only by the sprites_are_broken flag), with the
planes-only mode being left for a later patch.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:24:55 +01:00
Daniel Stone
44abfaaffd compositor-drm: Use sprites_are_broken for scanout plane
When the sprites_are_broken variable is set, do not attempt to promote
client surfaces to the scanout plane.

We are currently assuming that every client buffer will be compatible
with the scanout plane, but that is not the case, particularly with more
exotic tiled/compressed buffers. Once we promote the client buffer to
scanout, there is no going back: if the repaint fails, we do not mark
this as failed and go back to repaint through composition.

This permanently removes the ability for scanout bypass when using the
non-atomic path. Future patches lift the restriction when using atomic
modesetting, as we can actually test and ensure that the view is
compatible with scanout.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:24:55 +01:00
Daniel Stone
a0f8276fe8 compositor-drm: Disallow overlapping overlay planes
The scanout plane strictly stacks under all overlay planes, and the
cursor plane above. However, the stacking of overlay planes with respect
to each other is undefined.

We can control the stacking order of overlay planes with the zpos
property, though this significantly complicates plane assignment. In the
meantime, simply disallow assigning a view to an overlay, when it
overlaps another view which is already on an overlay. This ensures
stacking order is irrelevant, since the planes never intersect each
other.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-11 12:24:55 +01:00