[mutter] kms/plane: Make get_primary_plane() actually get the primary plane
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms/plane: Make get_primary_plane() actually get the primary plane
- Date: Fri, 22 Jan 2021 17:08:30 +0000 (UTC)
commit 6bda72e3eb241c5eee41143ff708b58deb546c4b
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Oct 9 22:06:19 2020 +0200
kms/plane: Make get_primary_plane() actually get the primary plane
The plane was not type checked, so it retrieved whatever plane happened
to come first.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
src/backends/native/meta-kms-update.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c
index 95f480bccc..9d32a0da29 100644
--- a/src/backends/native/meta-kms-update.c
+++ b/src/backends/native/meta-kms-update.c
@@ -466,8 +466,14 @@ meta_kms_update_get_primary_plane_assignment (MetaKmsUpdate *update,
{
MetaKmsPlaneAssignment *plane_assignment = l->data;
- if (plane_assignment->crtc == crtc)
- return plane_assignment;
+ if (meta_kms_plane_get_plane_type (plane_assignment->plane) !=
+ META_KMS_PLANE_TYPE_PRIMARY)
+ continue;
+
+ if (plane_assignment->crtc != crtc)
+ continue;
+
+ return plane_assignment;
}
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]