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