[mutter] kms/update: Add unassign_plane() API
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms/update: Add unassign_plane() API
- Date: Tue, 11 Feb 2020 17:43:43 +0000 (UTC)
commit 851024f7300b0b9a996f27ab830d6ac596eaf0f8
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Nov 1 15:23:19 2019 +0100
kms/update: Add unassign_plane() API
Meant to disable a plane.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/930
src/backends/native/meta-kms-update.c | 23 +++++++++++++++++++++++
src/backends/native/meta-kms-update.h | 4 ++++
2 files changed, 27 insertions(+)
---
diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c
index c946aa7a2..c2a5cc440 100644
--- a/src/backends/native/meta-kms-update.c
+++ b/src/backends/native/meta-kms-update.c
@@ -102,6 +102,29 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
return plane_assignment;
}
+MetaKmsPlaneAssignment *
+meta_kms_update_unassign_plane (MetaKmsUpdate *update,
+ MetaKmsCrtc *crtc,
+ MetaKmsPlane *plane)
+{
+ MetaKmsPlaneAssignment *plane_assignment;
+
+ g_assert (!meta_kms_update_is_sealed (update));
+
+ plane_assignment = g_new0 (MetaKmsPlaneAssignment, 1);
+ *plane_assignment = (MetaKmsPlaneAssignment) {
+ .update = update,
+ .crtc = crtc,
+ .plane = plane,
+ .fb_id = 0,
+ };
+
+ update->plane_assignments = g_list_prepend (update->plane_assignments,
+ plane_assignment);
+
+ return plane_assignment;
+}
+
void
meta_kms_update_mode_set (MetaKmsUpdate *update,
MetaKmsCrtc *crtc,
diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h
index 1b6942f27..bb663addb 100644
--- a/src/backends/native/meta-kms-update.h
+++ b/src/backends/native/meta-kms-update.h
@@ -66,6 +66,10 @@ MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *upd
MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect);
+MetaKmsPlaneAssignment * meta_kms_update_unassign_plane (MetaKmsUpdate *update,
+ MetaKmsCrtc *crtc,
+ MetaKmsPlane *plane);
+
void meta_kms_update_page_flip (MetaKmsUpdate *update,
MetaKmsCrtc *crtc,
const MetaKmsPageFlipFeedback *feedback,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]