kms/impl-device: Remove deadline timer arming from queue_update()
queue_update() in a previous iteration was called in two situations:
* A page flip was already pending, meaning if we would commit an
update, it'd fail with EBUSY.
* A update was marked as "always-defer" meaning it should only be
processed from the deadline callback (would there be one). These were
used for cursor-only updates.
In the latter, we had to arm the deadline timer when queuing a new
update, if it wasn't armed already, while in the former, we would
currently idle, waiting for the page flip callback. At that callback
would the deadline timer be re-armed again.
Since we're only handling the former now, we'll never need to arm the
timer again, so remove code doing so. The code removed were never
actually executed anymore, after the "always-defer" flag on updates was
removed.
Fixes: 27ed069766
("kms/impl-device: Add deadline based KMS commit scheduling")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2940
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3150>
This commit is contained in:
parent
deaa49e16f
commit
112cca75e2
1 changed files with 3 additions and 38 deletions
|
@ -1411,36 +1411,13 @@ ensure_crtc_frame (MetaKmsImplDevice *impl_device,
|
|||
return crtc_frame;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
queue_update (MetaKmsImplDevice *impl_device,
|
||||
CrtcFrame *crtc_frame,
|
||||
MetaKmsUpdate *update)
|
||||
{
|
||||
int64_t next_presentation_us = 0;
|
||||
int64_t next_deadline_us = 0;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
g_assert (update);
|
||||
|
||||
if (is_using_deadline_timer (impl_device) &&
|
||||
!crtc_frame->deadline.armed)
|
||||
{
|
||||
if (!meta_kms_crtc_determine_deadline (crtc_frame->crtc,
|
||||
&next_deadline_us,
|
||||
&next_presentation_us,
|
||||
&error))
|
||||
{
|
||||
MetaKmsImplDevicePrivate *priv =
|
||||
meta_kms_impl_device_get_instance_private (impl_device);
|
||||
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||
g_warning ("Failed to determine deadline: %s", error->message);
|
||||
|
||||
priv->deadline_timer_failed = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (crtc_frame->pending_update)
|
||||
{
|
||||
meta_kms_update_merge_from (crtc_frame->pending_update, update);
|
||||
|
@ -1450,18 +1427,6 @@ queue_update (MetaKmsImplDevice *impl_device,
|
|||
{
|
||||
crtc_frame->pending_update = update;
|
||||
}
|
||||
|
||||
if (is_using_deadline_timer (impl_device) &&
|
||||
!crtc_frame->pending_page_flip &&
|
||||
!crtc_frame->await_flush &&
|
||||
next_deadline_us)
|
||||
{
|
||||
arm_crtc_frame_deadline_timer (crtc_frame,
|
||||
next_deadline_us,
|
||||
next_presentation_us);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1511,8 +1476,8 @@ meta_kms_impl_device_handle_update (MetaKmsImplDevice *impl_device,
|
|||
meta_kms_crtc_get_id (latch_crtc),
|
||||
priv->path);
|
||||
|
||||
if (queue_update (impl_device, crtc_frame, update))
|
||||
return;
|
||||
queue_update (impl_device, crtc_frame, update);
|
||||
return;
|
||||
}
|
||||
|
||||
if (crtc_frame->pending_update)
|
||||
|
|
Loading…
Reference in a new issue