crtc/kms: Use MetaKmsPlane to check supported rotations and formats

Instead of manually retrieving supported transforms and formats from the
primary plane of the CRTC, use the MetaKmsPlane abstraction to find the
primary plane of the CRTC and check compatibility using the
MetaKmsPlane API. This removes the last user of direct KMS API usage
except for applying configuration.

https://gitlab.gnome.org/GNOME/mutter/issues/548
https://gitlab.gnome.org/GNOME/mutter/merge_requests/525
This commit is contained in:
Jonas Ådahl
2019-03-09 18:23:28 +01:00
committed by Georges Basile Stavracas Neto
parent aba689312f
commit d84c7269b2
8 changed files with 273 additions and 262 deletions

View File

@ -43,11 +43,21 @@ MetaKmsPlane * meta_kms_plane_new (MetaKmsPlaneType type,
drmModePlane *drm_plane,
drmModeObjectProperties *drm_plane_props);
uint32_t meta_kms_plane_get_id (MetaKmsPlane *plane);
MetaKmsPlaneType meta_kms_plane_get_plane_type (MetaKmsPlane *plane);
gboolean meta_kms_plane_is_transform_handled (MetaKmsPlane *plane,
MetaMonitorTransform transform);
GArray * meta_kms_plane_get_modifiers_for_format (MetaKmsPlane *plane,
uint32_t format);
GArray * meta_kms_plane_copy_drm_format_list (MetaKmsPlane *plane);
gboolean meta_kms_plane_is_format_supported (MetaKmsPlane *plane,
uint32_t format);
gboolean meta_kms_plane_is_usable_with (MetaKmsPlane *plane,
MetaKmsCrtc *crtc);