kms: Mark mode set updates as such

This is currently unused, but will be later used to distinguish betwen
per frame/CRTC updates and device wide ones.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2022-12-21 18:37:18 +01:00
parent a7954f4a75
commit 587da92b0a
3 changed files with 7 additions and 5 deletions

View File

@ -80,6 +80,7 @@ typedef enum _MetaKmsUpdateFlag
{
META_KMS_UPDATE_FLAG_NONE = 0,
META_KMS_UPDATE_FLAG_TEST_ONLY = 1 << 0,
META_KMS_UPDATE_FLAG_MODE_SET = 1 << 1,
} MetaKmsUpdateFlag;
typedef enum _MetaKmsPlaneType MetaKmsPlaneType;

View File

@ -873,8 +873,9 @@ post_mode_set_updates (MetaRendererNative *renderer_native)
NULL,
NULL);
feedback = meta_kms_device_process_update_sync (kms_device, kms_update,
META_KMS_UPDATE_FLAG_NONE);
feedback =
meta_kms_device_process_update_sync (kms_device, kms_update,
META_KMS_UPDATE_FLAG_MODE_SET);
}
}

View File

@ -283,7 +283,7 @@ meta_test_kms_device_mode_set (void)
meta_get_mode_rect (mode),
META_KMS_ASSIGN_PLANE_FLAG_NONE);
feedback = meta_kms_device_process_update_sync (device, update,
META_KMS_UPDATE_FLAG_NONE);
META_KMS_UPDATE_FLAG_MODE_SET);
meta_kms_feedback_unref (feedback);
g_assert_nonnull (meta_kms_crtc_get_current_state (crtc));
@ -347,7 +347,7 @@ meta_test_kms_device_power_save (void)
meta_get_mode_rect (mode),
META_KMS_ASSIGN_PLANE_FLAG_NONE);
feedback = meta_kms_device_process_update_sync (device, update,
META_KMS_UPDATE_FLAG_NONE);
META_KMS_UPDATE_FLAG_MODE_SET);
meta_kms_feedback_unref (feedback);
g_assert_true (meta_kms_crtc_is_active (crtc));
@ -384,7 +384,7 @@ meta_test_kms_device_power_save (void)
meta_get_mode_rect (mode),
META_KMS_ASSIGN_PLANE_FLAG_NONE);
feedback = meta_kms_device_process_update_sync (device, update,
META_KMS_UPDATE_FLAG_NONE);
META_KMS_UPDATE_FLAG_MODE_SET);
meta_kms_feedback_unref (feedback);
g_assert_true (meta_kms_crtc_is_active (crtc));