onscreen/native: Process TEST_ONLY updates directly on the device

No point in going via a thin meta_kms_* wrapper.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854>
This commit is contained in:
Jonas Ådahl 2022-10-20 22:08:07 +02:00 committed by Marge Bot
parent b1b9a9aac1
commit 5dbd9cc1b8
3 changed files with 3 additions and 21 deletions

View File

@ -282,21 +282,6 @@ meta_kms_post_pending_update_sync (MetaKms *kms,
return feedback; return feedback;
} }
MetaKmsFeedback *
meta_kms_post_test_update_sync (MetaKms *kms,
MetaKmsUpdate *update)
{
MetaKmsDevice *device = meta_kms_update_get_device (update);
MetaKmsUpdateFlag flags;
g_assert (!meta_kms_update_get_page_flip_listeners (update));
g_assert (!meta_kms_update_get_mode_sets (update));
g_assert (!meta_kms_update_get_connector_updates (update));
flags = META_KMS_UPDATE_FLAG_TEST_ONLY;
return meta_kms_device_process_update_sync (device, update, flags);
}
static gpointer static gpointer
meta_kms_discard_pending_page_flips_in_impl (MetaKmsImpl *impl, meta_kms_discard_pending_page_flips_in_impl (MetaKmsImpl *impl,
gpointer user_data, gpointer user_data,

View File

@ -46,9 +46,6 @@ MetaKmsFeedback * meta_kms_post_pending_update_sync (MetaKms *kms,
MetaKmsDevice *device, MetaKmsDevice *device,
MetaKmsUpdateFlag flags); MetaKmsUpdateFlag flags);
MetaKmsFeedback * meta_kms_post_test_update_sync (MetaKms *kms,
MetaKmsUpdate *update);
void meta_kms_discard_pending_page_flips (MetaKms *kms); void meta_kms_discard_pending_page_flips (MetaKms *kms);
void meta_kms_notify_modes_set (MetaKms *kms); void meta_kms_notify_modes_set (MetaKms *kms);

View File

@ -1241,7 +1241,6 @@ meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
MetaGpuKms *gpu_kms; MetaGpuKms *gpu_kms;
MetaKmsDevice *kms_device; MetaKmsDevice *kms_device;
MetaKmsCrtc *kms_crtc; MetaKmsCrtc *kms_crtc;
MetaKms *kms;
MetaKmsUpdate *test_update; MetaKmsUpdate *test_update;
g_autoptr (MetaKmsFeedback) kms_feedback = NULL; g_autoptr (MetaKmsFeedback) kms_feedback = NULL;
MetaKmsFeedbackResult result; MetaKmsFeedbackResult result;
@ -1249,7 +1248,6 @@ meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc)); gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc));
kms_device = meta_gpu_kms_get_kms_device (gpu_kms); kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
kms_crtc = meta_crtc_kms_get_kms_crtc (crtc_kms); kms_crtc = meta_crtc_kms_get_kms_crtc (crtc_kms);
kms = meta_kms_device_get_kms (kms_device);
test_update = meta_kms_update_new (kms_device); test_update = meta_kms_update_new (kms_device);
meta_crtc_kms_assign_primary_plane (crtc_kms, fb, test_update); meta_crtc_kms_assign_primary_plane (crtc_kms, fb, test_update);
@ -1259,7 +1257,9 @@ meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
meta_kms_crtc_get_id (kms_crtc), meta_kms_crtc_get_id (kms_crtc),
meta_kms_device_get_path (kms_device)); meta_kms_device_get_path (kms_device));
kms_feedback = meta_kms_post_test_update_sync (kms, test_update); kms_feedback =
meta_kms_device_process_update_sync (kms_device, test_update,
META_KMS_UPDATE_FLAG_TEST_ONLY);
meta_kms_update_free (test_update); meta_kms_update_free (test_update);
result = meta_kms_feedback_get_result (kms_feedback); result = meta_kms_feedback_get_result (kms_feedback);