Patchwork [v2,2/2] directfb: add fusion patch for hangs on exit with

login
register
mail settings
Submitter Lauren Post
Date Aug. 19, 2013, 7:17 p.m.
Message ID <1376939864-4790-2-git-send-email-lauren.post@freescale.com>
Download mbox | patch
Permalink /patch/55997/
State Accepted
Commit 46b8009d668478c5ed3e8b64c65f1de2a4dc25b3
Headers show

Comments

Lauren Post - Aug. 19, 2013, 7:17 p.m.
directfb: add fusion patch for hangs on exit with
 
following tests:   direct_test, fusion_skirmish

Signed-off-by: Lauren Post <lauren.post@freescale.com>
---
 meta/recipes-graphics/directfb/directfb.inc        |    3 +-
 .../directfb/directfb/fusion.patch                 |   36 ++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100755 meta/recipes-graphics/directfb/directfb/fusion.patch

Patch

diff --git a/meta/recipes-graphics/directfb/directfb.inc b/meta/recipes-graphics/directfb/directfb.inc
index 60b12f7..a23209f 100644
--- a/meta/recipes-graphics/directfb/directfb.inc
+++ b/meta/recipes-graphics/directfb/directfb.inc
@@ -14,7 +14,8 @@  DEPENDS = "jpeg libpng freetype zlib tslib"
 INC_PR = "r0"
 
 SRC_URI = "http://directfb.org/downloads/Core/DirectFB-1.6/DirectFB-${PV}.tar.gz \
-           file://configurefix.patch"
+           file://configurefix.patch \
+           file://fusion.patch"
 
 S = "${WORKDIR}/DirectFB-${PV}"
 
diff --git a/meta/recipes-graphics/directfb/directfb/fusion.patch b/meta/recipes-graphics/directfb/directfb/fusion.patch
new file mode 100755
index 0000000..1f81a67
--- /dev/null
+++ b/meta/recipes-graphics/directfb/directfb/fusion.patch
@@ -0,0 +1,36 @@ 
+directfb: Fix for hangs in direct_test, fusion_skirmish on exit
+
+Upstream-Status: Pending
+Signed-off-by: Lauren Post <lauren.post@freescale.com>
+
+--- a/lib/fusion/fusion.c	2013-01-18 22:57:11.000000000 +0800
++++ b/lib/fusion/fusion.c	2013-07-04 10:42:56.502699119 +0800
+@@ -2853,9 +2853,14 @@
+           direct_mutex_lock( &world->event_dispatcher_mutex );
+ 
+           while (1) {
+-               if (!world->event_dispatcher_buffers)
++               if (!world->event_dispatcher_buffers){
+                     direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
+-
++                    if (world->dispatch_stop) {
++                         D_DEBUG_AT( Fusion_Main_Dispatch, "  -> IGNORING (dispatch_stop!)\n" );
++                         direct_mutex_unlock( &world->event_dispatcher_mutex );
++                         return NULL;
++                    }
++               }
+                buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;
+                D_MAGIC_ASSERT( buf, FusionEventDispatcherBuffer );
+ 
+@@ -2872,6 +2877,11 @@
+ //D_INFO("waiting...\n");
+                     D_ASSERT( buf->read_pos == buf->write_pos );
+                     direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
++		      if (world->dispatch_stop) {
++                         D_DEBUG_AT( Fusion_Main_Dispatch, "  -> IGNORING (dispatch_stop!)\n" );
++                         direct_mutex_unlock( &world->event_dispatcher_mutex );
++                         return NULL;
++                    }
+                }
+ 
+                buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;