From 2fda8ae6d9d1536c34ddf49f3f1b5ab1839608db Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 10 Jan 2024 15:00:16 +0100 Subject: [PATCH] crtc-kms: Get rid of meta_crtc_kms_copy_drm_format_list Instead get the assigned primary plane and use meta_kms_plane_copy_drm_format_list. Part-of: --- src/backends/native/meta-crtc-kms.c | 16 ---------------- src/backends/native/meta-crtc-kms.h | 3 --- src/backends/native/meta-onscreen-native.c | 3 ++- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/backends/native/meta-crtc-kms.c b/src/backends/native/meta-crtc-kms.c index 09ec7cca8..74c572121 100644 --- a/src/backends/native/meta-crtc-kms.c +++ b/src/backends/native/meta-crtc-kms.c @@ -452,22 +452,6 @@ meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms, format); } -/** - * meta_crtc_kms_copy_drm_format_list: - * @crtc_kms: a #MetaCrtc object that has to be a #MetaCrtcKms - * - * Returns a new #GArray that the caller must destroy. The array - * contains all the DRM pixel formats the CRTC supports on - * its primary plane. The array element type is uint32_t. - */ -GArray * -meta_crtc_kms_copy_drm_format_list (MetaCrtcKms *crtc_kms) -{ - g_return_val_if_fail (crtc_kms->assigned_primary_plane, NULL); - - return meta_kms_plane_copy_drm_format_list (crtc_kms->assigned_primary_plane); -} - /** * meta_crtc_kms_supports_format: * @crtc_kms: a #MetaCrtcKms diff --git a/src/backends/native/meta-crtc-kms.h b/src/backends/native/meta-crtc-kms.h index f04a6f15a..33609ba5e 100644 --- a/src/backends/native/meta-crtc-kms.h +++ b/src/backends/native/meta-crtc-kms.h @@ -50,9 +50,6 @@ MetaKmsCrtc * meta_crtc_kms_get_kms_crtc (MetaCrtcKms *crtc_kms); GArray * meta_crtc_kms_get_modifiers (MetaCrtcKms *crtc_kms, uint32_t format); -GArray * -meta_crtc_kms_copy_drm_format_list (MetaCrtcKms *crtc_kms); - gboolean meta_crtc_kms_supports_format (MetaCrtcKms *crtc_kms, uint32_t drm_format); diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index 0caf20358..6f4bbc721 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -1906,8 +1906,9 @@ get_supported_kms_formats (CoglOnscreen *onscreen) { MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen); MetaCrtcKms *crtc_kms = META_CRTC_KMS (onscreen_native->crtc); + MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms); - return meta_crtc_kms_copy_drm_format_list (crtc_kms); + return meta_kms_plane_copy_drm_format_list (plane); } static gboolean