When the caller wants to perform a modeset, they will need to pass
DRM_MODE_ATOMIC_ALLOW_MODESET in the atomic commit flags, otherwise the driver
will fail the commit. libliftoff also needs to provide these flags in its
test-only commits.
In file included from ../log.c:4:
In file included from ../include/log.h:4:
In file included from ../include/libliftoff.h:8:
/usr/local/include/xf86drmMode.h:551:19: error: zero size arrays are an extension [-Werror,-Wzero-length-array]
uint32_t lessees[0];
^
/usr/local/include/xf86drmMode.h:558:19: error: zero size arrays are an extension [-Werror,-Wzero-length-array]
uint32_t objects[0];
^
test/bench.c:99:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &start);
^
test/bench.c:106:16: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &end);
^
This fixes a misunderstanding of the DRM API. Only a regular commit applies
properties.
Fixes: b16078769e ("test/libdrm_mock: a test-only commit applies properties")
The previous mock library assumed the DRM client would always set all
properties in the atomic request. However, if a previous test-only commit
has set a property, there's no need to set it again.
Accomodate for this in libdrm_mock. This will be useful when we'll skip
setting properties that haven't changed in libliftoff.
References: https://github.com/emersion/libliftoff/issues/37
Makes sure libliftoff doesn't allocate a plane for the layer and doesn't crash.
References: 799f694587 ("Fix segfault when FB_ID isn't set")
References: 53a7bfebc9 ("Don't allocate planes for layers without a FB")
Compositors need to drive multiple connectors, each with its own vblank timings.
For each device, there's one separate rendering loop per output.
It's not possible to call liftoff_device_apply each time we want to submit a new
frame to one output, because this could touch another's output state, submitting
a new frame there in the process. When the other output will submit a new frame,
it'll get EBUSY (can't submit two frames without waiting for vblank).
Closes: https://github.com/emersion/libliftoff/issues/21
Start from scratch since we may be able to come up with a better allocation
(if the layer made another layer fall back to composition for instance).
Closes: https://github.com/emersion/libliftoff/issues/30
This is a pretty basic benchmark measuring the time spent in
liftoff_display_apply.
The current behaviour tries to reproduce the worst case scenario: layers don't
intersect and one plane is incompatible with all layers.
This test continuously updates a layer's FB for some time, and keeps another
layer static. The continously updated layer should be put in a plane.
The test is disabled for now because priorities aren't implemented yet.
Make sure we don't use planes with lower zpos for layers over the previous ones,
unless there is no collision.
This adds the last intersection check.
Closes: https://github.com/emersion/libliftoff/issues/3
And restore the original zpos-4x-disjoint test. Depending on the constraints on
the last two layers, one branch of the layer zpos check or the other is taken.
Fixes: 8617ddfd05 ("Add intersection check for planes under the current one")
has_composited_layer_on_top is now less strict and performs plane intersection
checks before returning true.
This allows for more layers to be assigned to planes, the relevant tests have
been enabled.
References: https://github.com/emersion/libliftoff/issues/3
This test makes sure composited layers make layers underneath fall back to
composition too, in a transitive manner. That is, if plane A is under plane B
which is itself under plane C, plane A falling back to composition means that
both planes B and C fall back to composition too (even if C isn't directly
underneath A).
If a layer cannot be mapped to a plane, make it so all layers under it also fail
plane allocation so that they can be properly composited on the primary plane.
A test was incorrect and has been fixed. Another test had two possible solutions
and has been updated with the one libliftoff yields.