[mutter/gnome-3-34] kms-impl/simple: Fix meta_set_fallback_feedback_idle



commit 6f02d2ead01aab8ac5647755bcda5c0e77760653
Author: Pekka Paalanen <pekka paalanen collabora com>
Date:   Fri Nov 29 14:15:32 2019 +0200

    kms-impl/simple: Fix meta_set_fallback_feedback_idle
    
    Presumably this function is supposed to be like
    meta_kms_impl_simple_handle_page_flip_callback() but the condition in the
    if-statement is inverted. Fix the inversion to make these two functions look
    alike.
    
    This is part 2 of 2 fixing a complete desktop freeze when drmModePageFlip()
    fails with EINVAL and the fallback to drmModeSetCrtc() succeeds but the success
    is not registered correctly as completed "flip". The freeze occurs under
    wait_for_pending_flips() which calls down into meta_kms_impl_device_dispatch()
    which ends up poll()'ing the DRM fd even though drmModeSetCrtc() will not
    produce a DRM event, hence the poll() never returns. The freeze was observed
    when hotplugging a DisplayLink dock for the first time on Ubuntu 19.10.
    
    This patch makes meta_set_fallback_feedback_idle() actually end up calling into
    notify_view_crtc_presented() which decrements
    secondary_gpu_state->pending_flips so that wait_for_pending_flips() can finish.
    
    CC stable: gnome-3-34
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/953
    (cherry picked from commit 832a522cce4a40a520d21b1c67472a6e4d2ea382)

 src/backends/native/meta-kms-impl-simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-kms-impl-simple.c b/src/backends/native/meta-kms-impl-simple.c
index 78d5cc445..cd18ce736 100644
--- a/src/backends/native/meta-kms-impl-simple.c
+++ b/src/backends/native/meta-kms-impl-simple.c
@@ -519,7 +519,7 @@ mode_set_fallback_feedback_idle (gpointer user_data)
   g_clear_pointer (&impl_simple->mode_set_fallback_feedback_source,
                    g_source_unref);
 
-  if (!impl_simple->pending_page_flip_retries)
+  if (impl_simple->pending_page_flip_retries)
     {
       impl_simple->postponed_mode_set_fallback_datas =
         g_steal_pointer (&impl_simple->mode_set_fallback_page_flip_datas);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]