Commit graph

18 commits

Author SHA1 Message Date
Simon Ser
a3dc9c48e4 Don't use planes currently in-use on other CRTCs on first commit
When doing the first commit, libliftoff will try to disable all
candidate planes. This is necessary to make sure we start atomic
test commits from a clean state, and are able to incrementally come
up with a combination which works.

However, disabling a plane currently in-use on another CRTC (e.g.
a primary plane) will result in failed commits. We can't steal that
plane without removing it from the other CRTC first.

Add a new liftoff_plane.crtc_id field populated with the current
CRTC ID for the plane.
2022-08-19 09:38:50 +02:00
Simon Ser
1d425f542c plane: ignore pixel blend mode when set to Pre-multiplied
This behaves the same when the property isn't supported.
2022-08-03 23:00:13 +02:00
Simon Ser
4d6989b389 plane: ignore FB_DAMAGE_CLIPS if plane is missing prop
Reporting the damage is optional, if the driver doesn't expose the
prop it means it doesn't care about damage.
2022-08-03 22:55:35 +02:00
Simon Ser
0ce48717b4 plane: ignore SCALING_FILTER when set to Default
This behaves the same when the property isn't supported.
2022-08-03 22:55:33 +02:00
Simon Ser
70eca070b6 Make plane_get_property static 2021-09-30 14:57:19 +02:00
Simon Ser
32683879e7 Add newline after function return type
Aligns our style with Linux' and Weston's.
2021-08-13 22:02:33 +02:00
Simon Ser
f5a2b541ce Make liftoff_device_register_all_planes return an int
For consistency with liftoff_output_apply.
2021-07-30 16:19:29 +02:00
Simon Ser
61fd4c099a Make liftoff_output_apply return an int
Callers may want to get more details about the failure, in
particular EPERM indicates that the user isn't DRM master (can
happen on VT switch).
2021-07-27 12:28:00 +02:00
Simon Ser
8260fa67d7 Introduce liftoff_plane_get_id
This allow users calling liftoff_device_register_all_planes to
easily figure out what a liftoff_plane represents.
2021-07-01 11:39:52 +02:00
Simon Ser
562f8b0af6 Allow to choose which planes are managed by libliftoff
Closes: https://github.com/emersion/libliftoff/issues/10
2021-07-01 11:37:10 +02:00
Simon Ser
95da3ee649
Add support for the rotation property 2020-05-26 11:35:50 +02:00
Simon Ser
44946c44d8
Add support for the alpha property
If the layer is completely opaque, we don't need a plane with the alpha
property.
2020-05-22 17:40:33 +02:00
Simon Ser
dcca965fc1
Remove chatty debug log 2019-12-12 23:26:05 +01:00
Simon Ser
99ef3d5b2e
Unset plane->layer and layer->plane on destroy
This fixes a use-after-free when destroying a layer/plane early.
2019-12-06 15:06:14 +01:00
Simon Ser
b0e2b083f9
Rename display to device
"Display" can also mean "screen"/"monitor", so it's kind of confusing for
this usage.
2019-11-24 12:59:10 +01:00
Simon Ser
ef29d341cb
Move plane allocation algorithm to alloc.c
And move plane-related functions to plane.c.
2019-10-19 13:43:09 +03:00
Simon Ser
ba80e32054
Introduce liftoff_log_errno
Like perror, but uses the liftoff logging infrastructure.
2019-10-19 13:35:14 +03:00
Simon Ser
aacbcf40b4
Split plane functions into a separate file 2019-10-11 17:09:35 +03:00