mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
tests/kms/updates: Use async update API
We ignored the feedback and entered a temporary main loop, so no need to do things sync. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
parent
15a91e9fd4
commit
bedec579b8
@ -368,7 +368,6 @@ meta_test_kms_update_page_flip (void)
|
|||||||
g_autoptr (MetaDrmBuffer) primary_buffer2 = NULL;
|
g_autoptr (MetaDrmBuffer) primary_buffer2 = NULL;
|
||||||
MetaKmsPlane *primary_plane;
|
MetaKmsPlane *primary_plane;
|
||||||
PageFlipData data = {};
|
PageFlipData data = {};
|
||||||
MetaKmsFeedback *feedback;
|
|
||||||
|
|
||||||
device = meta_get_test_kms_device (test_context);
|
device = meta_get_test_kms_device (test_context);
|
||||||
crtc = meta_get_test_kms_crtc (device);
|
crtc = meta_get_test_kms_crtc (device);
|
||||||
@ -401,10 +400,8 @@ meta_test_kms_update_page_flip (void)
|
|||||||
&data,
|
&data,
|
||||||
page_flip_data_destroy);
|
page_flip_data_destroy);
|
||||||
|
|
||||||
feedback =
|
meta_kms_device_post_update (device, update,
|
||||||
meta_kms_device_process_update_sync (device, update,
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
|
||||||
meta_kms_feedback_unref (feedback);
|
|
||||||
|
|
||||||
g_main_loop_run (data.loop);
|
g_main_loop_run (data.loop);
|
||||||
g_assert_cmpint (data.state, ==, DESTROYED);
|
g_assert_cmpint (data.state, ==, DESTROYED);
|
||||||
@ -426,10 +423,8 @@ meta_test_kms_update_page_flip (void)
|
|||||||
&data,
|
&data,
|
||||||
page_flip_data_destroy);
|
page_flip_data_destroy);
|
||||||
|
|
||||||
feedback =
|
meta_kms_device_post_update (device, update,
|
||||||
meta_kms_device_process_update_sync (device, update,
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
|
||||||
meta_kms_feedback_unref (feedback);
|
|
||||||
|
|
||||||
g_main_loop_run (data.loop);
|
g_main_loop_run (data.loop);
|
||||||
g_assert_cmpint (data.state, ==, DESTROYED);
|
g_assert_cmpint (data.state, ==, DESTROYED);
|
||||||
@ -661,7 +656,6 @@ off_thread_page_flip_thread_func (gpointer user_data)
|
|||||||
g_autoptr (MetaDrmBuffer) primary_buffer1 = NULL;
|
g_autoptr (MetaDrmBuffer) primary_buffer1 = NULL;
|
||||||
g_autoptr (MetaDrmBuffer) primary_buffer2 = NULL;
|
g_autoptr (MetaDrmBuffer) primary_buffer2 = NULL;
|
||||||
PageFlipData page_flip_data = {};
|
PageFlipData page_flip_data = {};
|
||||||
MetaKmsFeedback *feedback;
|
|
||||||
|
|
||||||
g_mutex_lock (&data->init_mutex);
|
g_mutex_lock (&data->init_mutex);
|
||||||
g_mutex_unlock (&data->init_mutex);
|
g_mutex_unlock (&data->init_mutex);
|
||||||
@ -685,10 +679,8 @@ off_thread_page_flip_thread_func (gpointer user_data)
|
|||||||
&page_flip_data,
|
&page_flip_data,
|
||||||
page_flip_data_destroy);
|
page_flip_data_destroy);
|
||||||
|
|
||||||
feedback =
|
meta_kms_device_post_update (device, update,
|
||||||
meta_kms_device_process_update_sync (device, update,
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
|
||||||
meta_kms_feedback_unref (feedback);
|
|
||||||
|
|
||||||
g_main_loop_run (page_flip_data.loop);
|
g_main_loop_run (page_flip_data.loop);
|
||||||
g_assert_cmpint (page_flip_data.state, ==, DESTROYED);
|
g_assert_cmpint (page_flip_data.state, ==, DESTROYED);
|
||||||
@ -705,10 +697,8 @@ off_thread_page_flip_thread_func (gpointer user_data)
|
|||||||
&page_flip_data,
|
&page_flip_data,
|
||||||
page_flip_data_destroy);
|
page_flip_data_destroy);
|
||||||
|
|
||||||
feedback =
|
meta_kms_device_post_update (device, update,
|
||||||
meta_kms_device_process_update_sync (device, update,
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
|
||||||
meta_kms_feedback_unref (feedback);
|
|
||||||
|
|
||||||
g_main_loop_run (page_flip_data.loop);
|
g_main_loop_run (page_flip_data.loop);
|
||||||
g_assert_cmpint (page_flip_data.state, ==, DESTROYED);
|
g_assert_cmpint (page_flip_data.state, ==, DESTROYED);
|
||||||
@ -811,7 +801,6 @@ meta_test_kms_update_feedback (void)
|
|||||||
MetaKmsDevice *device;
|
MetaKmsDevice *device;
|
||||||
MetaKmsUpdate *update;
|
MetaKmsUpdate *update;
|
||||||
g_autoptr (MetaDrmBuffer) buffer = NULL;
|
g_autoptr (MetaDrmBuffer) buffer = NULL;
|
||||||
g_autoptr (MetaKmsFeedback) kms_feedback = NULL;
|
|
||||||
|
|
||||||
data.main_thread_loop = g_main_loop_new (NULL, FALSE);
|
data.main_thread_loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
@ -837,8 +826,8 @@ meta_test_kms_update_feedback (void)
|
|||||||
on_callback_thread_result,
|
on_callback_thread_result,
|
||||||
&data);
|
&data);
|
||||||
|
|
||||||
kms_feedback = meta_kms_device_process_update_sync (device, update,
|
meta_kms_device_post_update (device, update,
|
||||||
META_KMS_UPDATE_FLAG_NONE);
|
META_KMS_UPDATE_FLAG_NONE);
|
||||||
|
|
||||||
g_main_loop_run (data.main_thread_loop);
|
g_main_loop_run (data.main_thread_loop);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user