kms/update: Add unassign_plane() API

Meant to disable a plane.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/930
This commit is contained in:
Jonas Ådahl 2019-11-01 15:23:19 +01:00
parent b23fc99655
commit 851024f730
2 changed files with 27 additions and 0 deletions

View File

@ -102,6 +102,29 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
return plane_assignment; 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 void
meta_kms_update_mode_set (MetaKmsUpdate *update, meta_kms_update_mode_set (MetaKmsUpdate *update,
MetaKmsCrtc *crtc, MetaKmsCrtc *crtc,

View File

@ -66,6 +66,10 @@ MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *upd
MetaFixed16Rectangle src_rect, MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect); MetaFixed16Rectangle dst_rect);
MetaKmsPlaneAssignment * meta_kms_update_unassign_plane (MetaKmsUpdate *update,
MetaKmsCrtc *crtc,
MetaKmsPlane *plane);
void meta_kms_update_page_flip (MetaKmsUpdate *update, void meta_kms_update_page_flip (MetaKmsUpdate *update,
MetaKmsCrtc *crtc, MetaKmsCrtc *crtc,
const MetaKmsPageFlipFeedback *feedback, const MetaKmsPageFlipFeedback *feedback,