kms/impl-device: Queue result when discarding submitted update
The result will allow adequate state tracking to take place where the update was posted. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
This commit is contained in:
parent
0d9fd1ead7
commit
af250506fb
3 changed files with 23 additions and 2 deletions
|
@ -2038,13 +2038,29 @@ disarm_all_frame_sources (MetaKmsImplDevice *impl_device)
|
|||
g_hash_table_iter_init (&iter, priv->crtc_frames);
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &crtc_frame))
|
||||
{
|
||||
MetaKmsUpdate *submitted_update;
|
||||
|
||||
crtc_frame->deadline.is_deadline_page_flip = FALSE;
|
||||
crtc_frame->await_flush = FALSE;
|
||||
crtc_frame->pending_page_flip = FALSE;
|
||||
g_clear_pointer (&crtc_frame->pending_update, meta_kms_update_free);
|
||||
disarm_crtc_frame_deadline_timer (crtc_frame);
|
||||
|
||||
g_clear_pointer (&crtc_frame->submitted_update.kms_update, meta_kms_update_free);
|
||||
submitted_update =
|
||||
g_steal_pointer (&crtc_frame->submitted_update.kms_update);
|
||||
if (submitted_update)
|
||||
{
|
||||
MetaKmsFeedback *feedback = NULL;
|
||||
GError *error;
|
||||
|
||||
error = g_error_new (META_KMS_ERROR,
|
||||
META_KMS_ERROR_DISCARDED,
|
||||
"Timer disarmed");
|
||||
feedback = meta_kms_feedback_new_failed (NULL, error);
|
||||
queue_result_feedback (impl_device, submitted_update, feedback);
|
||||
meta_kms_feedback_unref (feedback);
|
||||
g_clear_pointer (&submitted_update, meta_kms_update_free);
|
||||
}
|
||||
g_clear_pointer (&crtc_frame->submitted_update.source, g_source_destroy);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ enum
|
|||
META_KMS_ERROR_DENY_LISTED,
|
||||
META_KMS_ERROR_NOT_SUPPORTED,
|
||||
META_KMS_ERROR_EMPTY_UPDATE,
|
||||
META_KMS_ERROR_DISCARDED,
|
||||
};
|
||||
|
||||
typedef enum _MetaKmsFlags
|
||||
|
|
|
@ -343,7 +343,11 @@ page_flip_feedback_discarded (MetaKmsCrtc *kms_crtc,
|
|||
if (error &&
|
||||
!g_error_matches (error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_PERMISSION_DENIED))
|
||||
G_IO_ERROR_PERMISSION_DENIED) &&
|
||||
!g_error_matches (error,
|
||||
META_KMS_ERROR,
|
||||
META_KMS_ERROR_DISCARDED))
|
||||
|
||||
g_warning ("Page flip discarded: %s", error->message);
|
||||
|
||||
frame_info = cogl_onscreen_peek_head_frame_info (onscreen);
|
||||
|
|
Loading…
Reference in a new issue