* Error in running gtk example on cross compiled GTK with DirectFB on MIPS board
@ 2007-12-17 8:31 kaka
2007-12-17 17:26 ` [directfb-dev] " Denis Oliver Kropp
0 siblings, 1 reply; 5+ messages in thread
From: kaka @ 2007-12-17 8:31 UTC (permalink / raw)
To: linux-mips, uclinux-dev, celinux-dev, linux-fbdev-users,
directfb-users, directfb-dev
[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]
HI ALL,
We have successfully cross compiled GTK and DIRECTFB with all its
dependencies for MIPS board.
On running the basic test example of GTK, it is getting struck in the thread
loop infinitely.
We had put the "debug printf" statement in the gtkmain.c and debugged the
test example.
It is getting struck in the * g_main_loop_run (loop);* given below is
the code(code
snippet from gtkmain.c)
void
gtk_main (void)
{
GList *tmp_list;
GList *functions;
GtkInitFunction *init;
GMainLoop *loop;
printf("\n%s :: %d\n",__FILE__,__LINE__);
gtk_main_loop_level++;
loop = g_main_loop_new (NULL, TRUE);
main_loops = g_slist_prepend (main_loops, loop);
printf("\n%s :: %d\n",__FILE__,__LINE__);
tmp_list = functions = init_functions;
init_functions = NULL;
while (tmp_list)
{
init = tmp_list->data;
tmp_list = tmp_list->next;
(* init->function) (init->data);
g_free (init);
}
g_list_free (functions);
printf("\n%s :: %d\n",__FILE__,__LINE__);
if (g_main_loop_is_running (main_loops->data))
{
* printf("\n%s :: %d\n",__FILE__,__LINE__);
GDK_THREADS_LEAVE ();
g_main_loop_run (loop);
GDK_THREADS_ENTER ();
* printf("\n%s :: %d\n",__FILE__,__LINE__);
gdk_flush ();
}
printf("\n%s :: %d\n",__FILE__,__LINE__);
if (quit_functions)
{
GList *reinvoke_list = NULL;
GtkQuitFunction *quitf;
Given below is the src code for test example of GTK:
#include <gtk/gtk.h>
int main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *pMainWidget;
GdkPixbuf *image;
gboolean ret = 0;
gtk_init (&argc, &argv);
printf("\n\n\ngtk_init (&argc, &argv);\n\n\n");
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
//gtk_container_set_border_width (GTK_CONTAINER (window), 10);
image = gdk_pixbuf_new_from_file ("test.gif", NULL);
if (!image)
return FALSE;
pMainWidget = gtk_image_new_from_pixbuf(image);
printf("\n\n\npMainWidget = gtk_image_new_from_pixbuf(image);\n\n\n");
gtk_widget_show (pMainWidget);
gtk_container_add (GTK_CONTAINER (window), pMainWidget);
printf("\n\n\ngtk_container_add (GTK_CONTAINER (window),
pMainWidget);\n\n\n") ;
gtk_widget_show (window);
printf("\n\n\nABHISHEK START OF gtk_main\n\n\n");
gtk_main ();
printf("\n\n\nABHISHEK END OF gtk_main\n\n\n");
return 0;
}
Can anybody Plz throw some light on it?
Thanks in advcance
--
Thanks & Regards,
kaka
[-- Attachment #2: Type: text/html, Size: 3545 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [directfb-dev] Error in running gtk example on cross compiled GTK with DirectFB on MIPS board
2007-12-17 8:31 Error in running gtk example on cross compiled GTK with DirectFB on MIPS board kaka
@ 2007-12-17 17:26 ` Denis Oliver Kropp
2007-12-17 18:40 ` kaka
2007-12-20 18:08 ` kaka
0 siblings, 2 replies; 5+ messages in thread
From: Denis Oliver Kropp @ 2007-12-17 17:26 UTC (permalink / raw)
To: kaka
Cc: linux-mips, uclinux-dev, celinux-dev, linux-fbdev-users,
directfb-users, directfb-dev
kaka wrote:
> HI ALL,
>
> We have successfully cross compiled GTK and DIRECTFB with all its
> dependencies for MIPS board.
> On running the basic test example of GTK, it is getting struck in the thread
> loop infinitely.
> We had put the "debug printf" statement in the gtkmain.c and debugged the
> test example.
> It is getting struck in the * g_main_loop_run (loop);* given below is
> the code(code
> snippet from gtkmain.c)
>
> void
> gtk_main (void)
> {
> GList *tmp_list;
> GList *functions;
> GtkInitFunction *init;
> GMainLoop *loop;
> printf("\n%s :: %d\n",__FILE__,__LINE__);
> gtk_main_loop_level++;
>
> loop = g_main_loop_new (NULL, TRUE);
> main_loops = g_slist_prepend (main_loops, loop);
> printf("\n%s :: %d\n",__FILE__,__LINE__);
> tmp_list = functions = init_functions;
> init_functions = NULL;
>
> while (tmp_list)
> {
> init = tmp_list->data;
> tmp_list = tmp_list->next;
>
> (* init->function) (init->data);
> g_free (init);
> }
> g_list_free (functions);
> printf("\n%s :: %d\n",__FILE__,__LINE__);
> if (g_main_loop_is_running (main_loops->data))
> {
> * printf("\n%s :: %d\n",__FILE__,__LINE__);
> GDK_THREADS_LEAVE ();
> g_main_loop_run (loop);
> GDK_THREADS_ENTER ();
> * printf("\n%s :: %d\n",__FILE__,__LINE__);
That's normal. If you want runtime you have to create a timer or register idle or timeout functions.
> gtk_container_add (GTK_CONTAINER (window), pMainWidget);
> printf("\n\n\ngtk_container_add (GTK_CONTAINER (window),
> pMainWidget);\n\n\n") ;
> gtk_widget_show (window);
> printf("\n\n\nABHISHEK START OF gtk_main\n\n\n");
> gtk_main ();
> printf("\n\n\nABHISHEK END OF gtk_main\n\n\n");
> return 0;
Simply/weakly put: it should not return before the application is quit.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [directfb-dev] Error in running gtk example on cross compiled GTK with DirectFB on MIPS board
2007-12-17 17:26 ` [directfb-dev] " Denis Oliver Kropp
@ 2007-12-17 18:40 ` kaka
2007-12-20 18:08 ` kaka
1 sibling, 0 replies; 5+ messages in thread
From: kaka @ 2007-12-17 18:40 UTC (permalink / raw)
To: Denis Oliver Kropp
Cc: linux-mips, uclinux-dev, celinux-dev, linux-fbdev-users,
directfb-users, directfb-dev
[-- Attachment #1: Type: text/plain, Size: 2560 bytes --]
Hi Denis,
Thanks for the reply.
I am running same example on X86 and it is running successfully and
displaying image.
On the other hand when i am running the same example on MIPS(GTK over
DirecTFB)
image is not being displayed.
Could u plz provide some clue on it.
Thanks.
Kaka
On 12/17/07, Denis Oliver Kropp <dok@directfb.org> wrote:
>
> kaka wrote:
> > HI ALL,
> >
> > We have successfully cross compiled GTK and DIRECTFB with all its
> > dependencies for MIPS board.
> > On running the basic test example of GTK, it is getting struck in the
> thread
> > loop infinitely.
> > We had put the "debug printf" statement in the gtkmain.c and debugged
> the
> > test example.
> > It is getting struck in the * g_main_loop_run (loop);* given below is
> > the code(code
> > snippet from gtkmain.c)
> >
> > void
> > gtk_main (void)
> > {
> > GList *tmp_list;
> > GList *functions;
> > GtkInitFunction *init;
> > GMainLoop *loop;
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > gtk_main_loop_level++;
> >
> > loop = g_main_loop_new (NULL, TRUE);
> > main_loops = g_slist_prepend (main_loops, loop);
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > tmp_list = functions = init_functions;
> > init_functions = NULL;
> >
> > while (tmp_list)
> > {
> > init = tmp_list->data;
> > tmp_list = tmp_list->next;
> >
> > (* init->function) (init->data);
> > g_free (init);
> > }
> > g_list_free (functions);
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > if (g_main_loop_is_running (main_loops->data))
> > {
> > * printf("\n%s :: %d\n",__FILE__,__LINE__);
> > GDK_THREADS_LEAVE ();
> > g_main_loop_run (loop);
> > GDK_THREADS_ENTER ();
> > * printf("\n%s :: %d\n",__FILE__,__LINE__);
>
> That's normal. If you want runtime you have to create a timer or register
> idle or timeout functions.
>
> > gtk_container_add (GTK_CONTAINER (window), pMainWidget);
> > printf("\n\n\ngtk_container_add (GTK_CONTAINER (window),
> > pMainWidget);\n\n\n") ;
> > gtk_widget_show (window);
> > printf("\n\n\nABHISHEK START OF gtk_main\n\n\n");
> > gtk_main ();
> > printf("\n\n\nABHISHEK END OF gtk_main\n\n\n");
> > return 0;
>
> Simply/weakly put: it should not return before the application is quit.
>
> --
> Best regards,
> Denis Oliver Kropp
>
> .------------------------------------------.
> | DirectFB - Hardware accelerated graphics |
> | http://www.directfb.org/ |
> "------------------------------------------"
>
--
Thanks & Regards,
kaka
[-- Attachment #2: Type: text/html, Size: 4061 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [directfb-dev] Error in running gtk example on cross compiled GTK with DirectFB on MIPS board
2007-12-17 17:26 ` [directfb-dev] " Denis Oliver Kropp
2007-12-17 18:40 ` kaka
@ 2007-12-20 18:08 ` kaka
2007-12-20 19:09 ` Mike Emmel
1 sibling, 1 reply; 5+ messages in thread
From: kaka @ 2007-12-20 18:08 UTC (permalink / raw)
To: Denis Oliver Kropp
Cc: linux-mips, uclinux-dev, celinux-dev, linux-fbdev-users,
directfb-users, directfb-dev
[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]
Hi Denis,
I am writing gfx driver for DirectFB on BroadCom chip.
Right now i am using FBdev system to display graphics on BCM chip(MIPS
platform) which should use software fallbacks from DirectFB.Later on i 'll
add hardware accelerartion also.
My framebuffer driver for BCM chip is working fine. I have checked it by
running a small example. Also the gfxdriver for directFB is working fine for
Video and Image.
The problem which i am facing right now is that i am running the fill
rectangle example.
IT is not filling any color in the rectangle. I am always getting the black
screen.
Could you plz provide some clue on it ?
Also could you plz specify the file name and function in which directFB
library is writing into the framebuffer memory the color pixel information?
Thanks in Advance.
kaka
On 12/17/07, Denis Oliver Kropp <dok@directfb.org> wrote:
>
> kaka wrote:
> > HI ALL,
> >
> > We have successfully cross compiled GTK and DIRECTFB with all its
> > dependencies for MIPS board.
> > On running the basic test example of GTK, it is getting struck in the
> thread
> > loop infinitely.
> > We had put the "debug printf" statement in the gtkmain.c and debugged
> the
> > test example.
> > It is getting struck in the * g_main_loop_run (loop);* given below is
> > the code(code
> > snippet from gtkmain.c)
> >
> > void
> > gtk_main (void)
> > {
> > GList *tmp_list;
> > GList *functions;
> > GtkInitFunction *init;
> > GMainLoop *loop;
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > gtk_main_loop_level++;
> >
> > loop = g_main_loop_new (NULL, TRUE);
> > main_loops = g_slist_prepend (main_loops, loop);
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > tmp_list = functions = init_functions;
> > init_functions = NULL;
> >
> > while (tmp_list)
> > {
> > init = tmp_list->data;
> > tmp_list = tmp_list->next;
> >
> > (* init->function) (init->data);
> > g_free (init);
> > }
> > g_list_free (functions);
> > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > if (g_main_loop_is_running (main_loops->data))
> > {
> > * printf("\n%s :: %d\n",__FILE__,__LINE__);
> > GDK_THREADS_LEAVE ();
> > g_main_loop_run (loop);
> > GDK_THREADS_ENTER ();
> > * printf("\n%s :: %d\n",__FILE__,__LINE__);
>
> That's normal. If you want runtime you have to create a timer or register
> idle or timeout functions.
>
> > gtk_container_add (GTK_CONTAINER (window), pMainWidget);
> > printf("\n\n\ngtk_container_add (GTK_CONTAINER (window),
> > pMainWidget);\n\n\n") ;
> > gtk_widget_show (window);
> > printf("\n\n\nABHISHEK START OF gtk_main\n\n\n");
> > gtk_main ();
> > printf("\n\n\nABHISHEK END OF gtk_main\n\n\n");
> > return 0;
>
> Simply/weakly put: it should not return before the application is quit.
>
> --
> Best regards,
> Denis Oliver Kropp
>
> .------------------------------------------.
> | DirectFB - Hardware accelerated graphics |
> | http://www.directfb.org/ |
> "------------------------------------------"
>
--
Thanks & Regards,
kaka
[-- Attachment #2: Type: text/html, Size: 4644 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [directfb-dev] Error in running gtk example on cross compiled GTK with DirectFB on MIPS board
2007-12-20 18:08 ` kaka
@ 2007-12-20 19:09 ` Mike Emmel
0 siblings, 0 replies; 5+ messages in thread
From: Mike Emmel @ 2007-12-20 19:09 UTC (permalink / raw)
To: kaka
Cc: Denis Oliver Kropp, linux-mips, uclinux-dev, linux-fbdev-users,
directfb-dev, celinux-dev, directfb-users
I suspect this is related to the creation of a top level ARGB surface
when gtk is initialized.
You probably should dig around a bit but it looks to me like its a
issue with surface formats.
Since your doing the driver you should try and make sure that you get
a accelerated surface
working for Gtk/Cairo this would need to be either RGB/ARGB because of
limited pixel
format support in Cairo.
gdk_display_open in
gdkdisplay-directfb.c
See how it finally initializes and I suspect that if you do the same
in a simple DirectFB app you get the black screen
and can debug.
On Dec 20, 2007 10:08 AM, kaka <share.kt@gmail.com> wrote:
> Hi Denis,
>
> I am writing gfx driver for DirectFB on BroadCom chip.
> Right now i am using FBdev system to display graphics on BCM chip(MIPS
> platform) which should use software fallbacks from DirectFB.Later on i 'll
> add hardware accelerartion also.
> My framebuffer driver for BCM chip is working fine. I have checked it by
> running a small example. Also the gfxdriver for directFB is working fine for
> Video and Image.
> The problem which i am facing right now is that i am running the fill
> rectangle example.
> IT is not filling any color in the rectangle. I am always getting the black
> screen.
>
> Could you plz provide some clue on it ?
> Also could you plz specify the file name and function in which directFB
> library is writing into the framebuffer memory the color pixel information?
>
> Thanks in Advance.
> kaka
>
>
>
> On 12/17/07, Denis Oliver Kropp <dok@directfb.org> wrote:
>
> > kaka wrote:
> > > HI ALL,
> > >
> > > We have successfully cross compiled GTK and DIRECTFB with all its
> > > dependencies for MIPS board.
> > > On running the basic test example of GTK, it is getting struck in the
> thread
> > > loop infinitely.
> > > We had put the "debug printf" statement in the gtkmain.c and debugged
> the
> > > test example.
> > > It is getting struck in the * g_main_loop_run (loop);* given below is
> > > the code(code
> > > snippet from gtkmain.c)
> > >
> > > void
> > > gtk_main (void)
> > > {
> > > GList *tmp_list;
> > > GList *functions;
> > > GtkInitFunction *init;
> > > GMainLoop *loop;
> > > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > > gtk_main_loop_level++;
> > >
> > > loop = g_main_loop_new (NULL, TRUE);
> > > main_loops = g_slist_prepend (main_loops, loop);
> > > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > > tmp_list = functions = init_functions;
> > > init_functions = NULL;
> > >
> > > while (tmp_list)
> > > {
> > > init = tmp_list->data;
> > > tmp_list = tmp_list->next;
> > >
> > > (* init->function) (init->data);
> > > g_free (init);
> > > }
> > > g_list_free (functions);
> > > printf("\n%s :: %d\n",__FILE__,__LINE__);
> > > if (g_main_loop_is_running (main_loops->data))
> > > {
> > > * printf("\n%s :: %d\n",__FILE__,__LINE__);
> > > GDK_THREADS_LEAVE ();
> > > g_main_loop_run (loop);
> > > GDK_THREADS_ENTER ();
> > > * printf("\n%s :: %d\n",__FILE__,__LINE__);
> >
> > That's normal. If you want runtime you have to create a timer or register
> idle or timeout functions.
> >
> > > gtk_container_add (GTK_CONTAINER (window), pMainWidget);
> > > printf("\n\n\ngtk_container_add (GTK_CONTAINER (window),
> > > pMainWidget);\n\n\n") ;
> > > gtk_widget_show (window);
> > > printf("\n\n\nABHISHEK START OF gtk_main\n\n\n");
> > > gtk_main ();
> > > printf("\n\n\nABHISHEK END OF gtk_main\n\n\n");
> > > return 0;
> >
> > Simply/weakly put: it should not return before the application is quit.
> >
> > --
> > Best regards,
> > Denis Oliver Kropp
> >
> > .------------------------------------------.
> > | DirectFB - Hardware accelerated graphics |
> > | http://www.directfb.org/ |
> > "------------------------------------------"
> >
>
>
>
> --
> Thanks & Regards,
> kaka
> _______________________________________________
> directfb-dev mailing list
> directfb-dev@directfb.org
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-20 19:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 8:31 Error in running gtk example on cross compiled GTK with DirectFB on MIPS board kaka
2007-12-17 17:26 ` [directfb-dev] " Denis Oliver Kropp
2007-12-17 18:40 ` kaka
2007-12-20 18:08 ` kaka
2007-12-20 19:09 ` Mike Emmel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.