Jonas Ådahl
d77b5935cd
kms/update: Allow page flip callback listeners on any thread
...
This hooks into the MetaThread GMainContext callback machinery just
added; and allows receiving page flip callbacks on any thread.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777 >
2023-07-17 17:23:31 +02:00
Jonas Ådahl
ffd1e8106c
kms/update: Merge connector updates too
...
This includes privacy screen updates, underscanning etc; this is needed
when merging mode set updates that happen to change these too, which is
rather likely.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2881 >
2023-03-02 22:09:16 +01:00
Jonas Ådahl
6d043e6a8f
kms/impl-device: Let process() always take ownership of the update
...
This allows more freedom how to handle the update in the backends.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2855 >
2023-03-02 01:39:16 +01:00
Jonas Ådahl
b1b9a9aac1
kms/update: Change lock() to seal()
...
At first it was called seal(), but then updates could be amended after
being posted, given a flag. That flag has been removed, so we can go
back to sealing, since it's once again acts more as a seal.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854 >
2023-03-01 23:57:32 +00:00
Jonas Ådahl
7253ac501d
kms: Make KMS feedback struct ref counted
...
It'll later be sent asynchronously; to prepare for that make it ref
counted with an atomic ref counter.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854 >
2023-03-01 23:57:32 +00:00
Jonas Ådahl
37db905ff9
kms/update: Support merging updates with mode sets
...
Will be helpful to allow constructing each initial mode set update per
CRTC, merging them later on-demand.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854 >
2023-03-01 23:57:32 +00:00
Jonas Ådahl
9dcb28ffd1
kms/update: Add API to merge two updates
...
This is intended to be used only for plane assignment, and CRTC like
changes, so that one can e.g. change a cursor plane on a pending update
that changes the primary plane, before it has been committed to KMS.
The kms-updates test overrides the get-state function MetaKmsCrtc. This
is needd to not have the update mechanism not clamp the gamma size to 0,
as vkms reports the gamma length 0. By pretending it's 3, we can test a
simple and small gamma lut is merged correctly when merging updates.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854 >
2023-03-01 23:57:32 +00:00
Sebastian Wick
37639295db
backends/native: Rename crtc_gamma to crtc_color_updates
...
We need to update more CRTC color pipeline properties in the future.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2861 >
2023-02-23 17:20:36 +00:00
Jonas Ådahl
d1506fbb78
tests/kms/update: Add test for page flip feedbacks
...
Only tests the expected success path, i.e. when we receive a page flip
event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2853 >
2023-02-18 10:53:27 +00:00
Jonas Ådahl
2d7a8c3ce9
kms: Don't enter power saving via updates
...
The way device backends implement power saving differ, and power saving
needs to contain nothing incompatible in the same update. Make it
impossible to e.g. mode set, page flip, etc while entering power save by
not using MetaKmsUpdate's at all for this.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
feadaacfdd
kms/connector: Add getter for preferred mode
...
This replaces a helper used in tests. The intention is to use it from
other tests, and seemed like a good fit to place it under the KMS
connector object itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
6a9e2e9e2d
tests/kms-utils: Add helpers for common buffer sizes
...
This makes it more convenient to allocate and configure buffers covering
the whole primary plane given a mode.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
4276e9ddd3
tests/kms-update: Add mode setting sanity tests
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
65073c145c
tests/kms: Add basic plane assignment update tests
...
Test that adding a couple of plane assignments were correctly added to
the update.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
de06d5d9e7
kms/update: Add init helper macros for fixed 16 rects
...
META_FIXED_16_INIT(), taking MetaFixed16's, and META_FIXED_16_INIT_INT()
taking integers, converting them to MetaFixed16.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00
Jonas Ådahl
acd51a7e69
tests: Add some basic MetaKmsUpdate unit tests
...
Mostly rudimentary sanity testing.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2159 >
2022-01-25 15:47:03 +00:00