Davide Viti wrote:
Hi,


The correct format with 2.6 kernels is video=vesafb:...

Yes, i have also tried passing "video=vesafb:ywrap,mtrr vga=788"
to 2.6.8 , 2.6.12, 2.6.14 kernels but nothing changed and i got the same exact error as before. I'm starting to think that something broken must be inside Debian's current unstable distro: i'll try to build on a "testing" or "sarge" unless some patched sourcefiles davide viti said he has prepared solve the problem.


just wanted to let you know the status of things after I run my tests:

I managed to recompile all the libs:

DirectFB
cairo-1.0.2
gtk+2.8.3
libic
libpixregion
pango
slim

using the latest CVS snapshots.
cairo was patched using a patch submitted by Mike to the cairo ML, gtk+ was
patched using the gdk-directfb in CVS and finally building went fine 
(apparently new
binutils caused breakages when rebuilding cairo).
If I run gtk-demo on my machine (2.6.8 kernel) it works, but if I run it on an 
environment
such as the one used by the debian installer, which now switched to 2.6.14, I 
get the blue
background, the mouse cursor (which I can move) but the applications do not 
start up.

If I substitute the runtime libs with those precompiled a few days ago
by Attilio
(https://debian.polito.it/downloads/d-i_2-8-3_2005-11-16_dfb.tgz) everything 
works, also with
2.6.14 kernel)

i've done cross-experiments with my libs and yours, with 2.6.12 and 2.6.14 kernels, but i could no longer get DFB to work as it used to do untile some weekks ago.
I think i'll install a sarge system (2.6.8 kernel) to do some more testing.
Anyway, here is the patch to vt.c: i couldn't test because i'm now unable to run DFB apps. Basically, as mike suggested, allowing an an asynchronus signal handler to manipulate mutexes is bad, so i've turned the signal handling routine into a thread that sinchronously waits for signals to come. I'm concerned with broken cascade signal handing since debconf, the main debian installer app that initialized DFB subsytem, needs to be able to internally handle SIGUSR1 and SIGUSR2 to save its question database. Could someone have a look at this patch and fix it where broken? i'm sure something must be wrong since i've never been able to really test it.

thanks

Attilio



attilaptop:/home/attilio/zino_clean/DirectFB/systems/fbdev# diff -u vt.c.orig vt.c
--- vt.c.orig   2005-11-28 10:43:33.000000000 +0100
+++ vt.c        2005-11-28 13:14:20.000000000 +0100
@@ -391,18 +391,30 @@
      return NULL;
 }

-static void
-vt_switch_handler( int signum )
+static void *
+vt_switch_handler( void *arg )
 {
+     sigset_t signal_set;
+     int signum;
+
      D_DEBUG( "DirectFB/fbdev/vt: %s (%d)\n", __FUNCTION__, signum);

-     pthread_mutex_lock( &dfb_vt->lock );
+     sigemptyset( &signal_set );
+     sigaddset( &signal_set, SIGUSR1 );
+     sigaddset( &signal_set, SIGUSR2 );
+
+    while (1) {
+        sigwait (&signal_set, &signum);
+
+        pthread_mutex_lock( &dfb_vt->lock );

-     dfb_vt->vt_sig = signum;
+        dfb_vt->vt_sig = signum;

-     pthread_cond_signal( &dfb_vt->wait );
+        pthread_cond_signal( &dfb_vt->wait );

-     pthread_mutex_unlock( &dfb_vt->lock );
+        pthread_mutex_unlock( &dfb_vt->lock );
+    }
+    return NULL;
 }

 static DFBResult
@@ -454,11 +466,31 @@
      if (dfb_config->vt_switching) {
           struct vt_mode vt;
           struct sigaction sig_tty;
+          sigset_t signal_set;

-          memset( &sig_tty, 0, sizeof( sig_tty ) );
-          sig_tty.sa_handler = vt_switch_handler;
+          memset( &sig_tty, 0, sizeof( sigaction ) );
+//          sig_tty.sa_handler = vt_switch_handler;
           sigemptyset( &sig_tty.sa_mask );

+          sigemptyset( &signal_set );
+          sigaddset( &signal_set, SIGUSR1);
+          sigaddset( &signal_set, SIGUSR2);
+          pthread_sigmask( SIG_BLOCK, &signal_set,NULL );
+
+          /* signals are masked by the currect thread */
+          if ( pthread_sigmask (SIG_BLOCK, &signal_set, NULL) != 0) {
+              D_PERROR( "DirectFB/fbdev/vt: signal masking failed!\n" );
+              return DFB_INIT;
+          }
+
+          /* An ad-hoc thread is created to handle signals.
+           * this thread will communicate with the vt_thread()
+           * thread via the dfb_vt->wait conditional variable
+           */
+          if ( pthread_create (NULL, NULL, vt_switch_handler, NULL) != 0) {
+ D_PERROR( "DirectFB/fbdev/vt: creating signals-catching thread failed!\n" );
+              return DFB_INIT;
+          }
           if (sigaction( SIGUSR1, &sig_tty, &dfb_vt->sig_usr1 ) ||
               sigaction( SIGUSR2, &sig_tty, &dfb_vt->sig_usr2 )) {
                D_PERROR( "DirectFB/fbdev/vt: sigaction failed!\n" );

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to