fix potential dead lock (hanging out within device to client transition) 10/164010/1
authorSergey Sizonov <s.sizonov@samsung.com>
Thu, 14 Dec 2017 12:48:48 +0000 (15:48 +0300)
committerSergey Sizonov <s.sizonov@samsung.com>
Thu, 14 Dec 2017 12:48:48 +0000 (15:48 +0300)
Change-Id: I9fde7b00d0b8511cd4286ce7a3a9ad5c99d31743
Signed-off-by: Sergey Sizonov <s.sizonov@samsung.com>
src/tdm_exynos_output.c

index 99b8618f08f2d0cc35b62faf3cd383144a5061aa..b34e131691b26b493cd3ee4d4a1ff8cf84b326cb 100644 (file)
@@ -918,8 +918,13 @@ _is_device_to_client_transition_finished(struct list_head *hwc_wnds)
        tdm_exynos_hwc_window_data *hw = NULL;
 
        LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
-               if (hw->client_type == TDM_COMPOSITION_NONE)
-                       continue;
+               /* do not skip hwc_wnds with NONE composition type
+                * 'cause it may lead to dead lock state (we won't be
+                * able to exit from 'device to client transition' state);
+                *
+                * sometimes e20's wm marks ec as an invisible before it's
+                * been composited to the target buffer, so to face with
+                * such situation we don't skip NONE hwcs */
 
                if (hw->is_device_to_client_transition)
                        goto work;
@@ -932,6 +937,10 @@ _is_device_to_client_transition_finished(struct list_head *hwc_wnds)
        return 0;
 
 work:
+
+       /* as we reset ALL hwc_wnds to CLIENT when we encountered with a need to
+        * make the smooth transition we have to wait till ALL they being composited
+        * (being presented on the target window) */
        LIST_FOR_EACH_ENTRY(hw, hwc_wnds, link) {
                if (hw->client_type == TDM_COMPOSITION_NONE)
                        continue;