Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Thu, 19 Nov 2009 03:18:10 GMT


Sponsored Links
 n Wed, Nov 18, 2009 at 7:05 AM, Alexey Roslyakov <
alexey.roslya...@gmail.com> wrote:

I am having exactly same problem with eclair on my target board. But I dont
see page flipping error might because I started logcat late.
Kernel 2.6.27+ donut is working fine on my target and now I tried to
integrate eclair inpalce of DONUT.
Got stuck after small ANDROID screen, blank script though entire boot
sequence looks fine.

As I have gone through eclair code with logcat help, framebuffer is @
eclair/*hardware/libhardware/modules/gralloc/framebuffer.cpp* in eclair,
there are some changes as compare to donut which use EGL for screen
initialization , *donut/framework/base/libs/ui/EGLSurface.cpp.
*

donut
logcat...
eclair logcat.


I/SurfaceF linger( 7 55): EGL i nformation s:
462 I/SurfaceF linger( 7 71):
Surfa ceFlinger is startin g
405 I/SurfaceF linger( 7 55): # of configs : 6
463 I/SurfaceF linger( 7
71): Surfa ceFlinger' s main thr ead ready to run. In itializing graphics
H/W...
406 I/SurfaceF linger( 7 55): vendo r : And roid
464 I/gralloc ( 771): u sing
(fd=2 3)
407 I/SurfaceF linger( 7 55): versi on : 1.3 1 Android
META-EGL 465 I/gralloc ( 771): i d =
LCDfb
408 I/SurfaceF linger( 7 55): exten sions:
466 I/gralloc (
771): x res = 240 px
409 I/SurfaceF linger( 7 55): Clien t API: Ope nGL ES
467 I/gralloc ( 771): y
res = 320 px
410 I/EGLDispl aySurface( 755): us ing (fd=22 )
468 I/gralloc ( 771): x res_virtua
l = 240 px
411 I/EGLDispl aySurface( 755): id = LCDfb
469 I/gralloc ( 771): y
res_virtua l = 640 px
412 I/EGLDispl aySurface( 755): xr es = 240 px
470 I/gralloc ( 771): b
pp = 16
413 I/EGLDispl aySurface( 755): yr es = 320 px
471 I/gralloc ( 771):
r = 11:5
414 I/EGLDispl aySurface( 755): xr es_virtual = 240 px
472 I/gralloc ( 771): g
= 5:6
415 I/EGLDispl aySurface( 755): yr es_virtual = 640 px
473 I/gralloc ( 771):
b = 0:5
416 I/EGLDispl aySurface( 755): bp p = 16
474 I/gralloc (
771): w idth = 240 mm (25.40000 0 dpi)
417 I/EGLDispl aySurface( 755): r = 11:5
475 I/gralloc ( 771): h
eight = 320 mm (25.40000 0 dpi)
418 I/EGLDispl aySurface( 755): g = 5:6
476 I/gralloc ( 771): r
efresh rat e = 60.00 Hz
419 I/EGLDispl aySurface( 755): b = 0:5
477 E/Framebuf ferNativeW
indow( 77 1):* xDpi - 2097152000*
420 I/EGLDispl aySurface( 755): wi dth = 240 mm
(25.400000 dpi) 478



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Robin Gujjar » Thu, 19 Nov 2009 17:24:48 GMT


 id you change any thing in
"clair/*hardware/libhardware/modules/gralloc/framebuffer.cpp"
? . *check #define NUM_BUFFERS its value should be 2 .i got this issue one
time if u chnage this to "1" . Just check it

--Gujjar

On Thu, Nov 19, 2009 at 12:47 AM, Porting beginner <
porting.begin...@gmail.com> wrote:


--


Sponsored Links


Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Thu, 19 Nov 2009 17:32:29 GMT


 n Thu, Nov 19, 2009 at 1:24 AM, Robin Gujjar <robin.guj...@gmail.com>wrote:


Thanks , but no of buffer is 2 in my case. I am just checking with print
logs, dont have any code change here.
Earlier I thought it was prb of page flipping (in same file ) but its not
showing page flipping error ( not going to print that LOG from same file)
so its not my fb driver issue.

I am getting -ve value of xDpi and yDpi , I think there is something wrong
here.

I/gralloc ( 771): xres = 240 px
I/gralloc ( 771): yres = 320 px
I/gralloc ( 771): xres_virtual = 240 px
I/gralloc ( 771): yres_virtual = 640 px
I/gralloc ( 771): bpp = 16
I/gralloc ( 771): r = 11:5
I/gralloc ( 771): g = 5:6
I/gralloc ( 771): b = 0:5
I/gralloc ( 771): width = 240 mm (25.400000 dpi)
I/gralloc ( 771): height = 320 mm (25.400000 dpi)
I/gralloc ( 771): refresh rate = 60.00 Hz

E/FramebufferNativeWindow( 771): *xDpi -2097152000
*E/FramebufferNativeWindow( 771): *yDpi -2097152000*






--
Thanks

--



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Alexey Roslyakov » Fri, 20 Nov 2009 02:28:38 GMT


 've got strace dump from all Android processes.

[pid 726] 04:13:26.829870 writev(3, [{"\5", 1}, {"gralloc\0", 8},
{"page flipping not supported (yres_virtual=480, requested=960)\0",
62}], 3) = 71
[pid 726] 04:13:26.833420 ioctl(23, 0x4600, 0x45182bb0) = 0
[pid 726] 04:13:26.835216 writev(3, [{"\4", 1}, {"gralloc\0", 8},
{"using (fd=23)\nid = s3c2410fb\nxres = 800 px
\nyres = 480 px\nxres_virtual = 800 px\nyres_virtual = 480 px
\nbpp = 16\nr = 11:5\ng =
5:6\nb = "..., 206}], 3 <unfinished ...>
[pid 702] 04:13:26.840404 <... recvfrom resumed> "add@/class/vc/
vcs7\0ACTION=add\0DEVPATH=/class/vc/vcs7\0SUBSYSTEM=vc
\0MAJOR=7\0MINOR=7\0SEQNUM=658\0", 65536, 0, NULL, NULL) = 93
[pid 702] 04:13:26.843282 select(11, [6 10], NULL, NULL, {3600, 0})
= 1 (in [6], left {3599, 999917})
[pid 726] 04:13:26.845958 <... writev resumed> ) = 215
[pid 726] 04:13:26.847611 writev(3, [{"\4", 1}, {"gralloc\0", 8},
{"width = 800 mm (25.400000 dpi)\nheight = 480 mm
(25.400000 dpi)\nrefresh rate = 53.04 Hz\n\0", 101}], 3
<unfinished ...>
[pid 702] 04:13:26.850797 read(-1, 0xbed8fb78, 100) = -1 EBADF (Bad
file number)
[pid 702] 04:13:26.852491 writev(3, [{"\6", 1}, {"vold\0", 5},
{"Unable to read framework command (Bad file number)\0", 51}], 3
<unfinished ...>
[pid 726] 04:13:26.855723 <... writev resumed> ) = 110
[pid 726] 04:13:26.856635 ioctl(23, 0x4602, 0x45182c50) = 0
[pid 726] 04:13:26.858208 dup(23) = 24
[pid 726] 04:13:26.859798 getpid( <unfinished ...>
[pid 702] 04:13:26.860360 <... writev resumed> ) = 57
[pid 702] 04:13:26.861327 writev(3, [{"\6", 1}, {"vold\0", 5},
{"Error processing framework command (Bad file number)\0", 53}], 3) =
59
[pid 702] 04:13:26.864975 recvfrom(6, "add@/class/vc/
vcsa7\0ACTION=add\0DEVPATH=/class/vc/vcsa7\0SUBSYSTEM=vc
\0MAJOR=7\0MINOR=135\0SEQNUM=659\0", 65536, 0, NULL, NULL) = 97
[pid 702] 04:13:26.868465 select(11, [6 10], NULL, NULL, {3600, 0}
<unfinished ...>
[pid 479] 04:13:26.869804 <... poll resumed> [{fd=4, events=POLLIN,
revents=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1)
= 1
[pid 726] 04:13:26.871238 <... getpid resumed> ) = 717
[pid 726] 04:13:26.872154 mmap2(NULL, 770048, PROT_READ|PROT_WRITE,
MAP_SHARED, 23, 0) = 0x45383000
[pid 726] 04:13:26.883462 recv(-2138029488, <unfinished ...>
[pid 479] 04:13:26.884667 recvfrom(4, "add@/class/vc/vcs1\0ACTION=add
\0DEVPATH=/class/vc/vcs1\0SUBSYSTEM=vc
\0MAJOR=7\0MINOR=1\0SEQNUM=654\0", 1024, 0, NULL, NULL) = 93
[pid 479] 04:13:26.888065 mknod("/dev/vcs1", S_IFCHR|0600, makedev
(7, 1)) = 0
[pid 479] 04:13:26.889872 chown32(0xbef9a430, 0, 0) = 0
[pid 479] 04:13:26.891564 recvfrom(4, "add@/class/vc/
vcsa1\0ACTION=add\0DEVPATH=/class/vc/vcsa1\0SUBSYSTEM=vc
\0MAJOR=7\0MINOR=129\0SEQNUM=655\0", 1024, 0, NULL, NULL) = 97
[pid 479] 04:13:26.895249 mknod("/dev/vcsa1", S_IFCHR|0600, makedev
(7, 129)) = 0
[pid 479] 04:13:26.897324 chown32(0xbef9a430, 0, 0) = 0
[pid 479] 04:13:26.898963 recvfrom(4, "remove@/class/vc/
vcs1\0ACTION=remove\0DEVPATH=/class/vc/vcs1\0SUBSYSTEM=vc
\0MAJOR=7\0MI



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Alexey Roslyakov » Fri, 20 Nov 2009 03:05:56 GMT


 I added LOGI just before return from fb_device_open.

I/gralloc (  713): fb_device_open res: 0

fb device initialized successfully. Problem is not here.
But where?

-- 



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Fri, 20 Nov 2009 06:55:07 GMT


 On Thu, Nov 19, 2009 at 2:45 PM, Alexey Roslyakov <





> website: 



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Alexey Roslyakov » Fri, 20 Nov 2009 07:57:04 GMT


 Where did you find this file?

~/mydroid$ find . -name '*ramebuffer.cpp'
./hardware/msm7k/libgralloc/framebuffer.cpp
./hardware/msm7k/libgralloc-qsd8k/framebuffer.cpp
./hardware/libhardware/modules/gralloc/framebuffer.cpp






> > website:



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Fri, 20 Nov 2009 08:09:42 GMT


 On Thu, Nov 19, 2009 at 3:56 PM, Alexey Roslyakov <



Sorry, its frameworks/base/libs/ui/FramebufferNativeWindow.cpp.

I am debugging in these two files, other one is
/hardware/libhardware/modules/gralloc/frambuffer.cpp









> > > website:



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Fri, 20 Nov 2009 11:52:42 GMT


 On Thu, Nov 19, 2009 at 7:10 PM, Alexey Roslyakov <




I/SurfaceFlinger(  784): SurfaceFlinger is starting
I/SurfaceFlinger(  784): SurfaceFlinger's main thread ready to run.
Initializing graphics H/W...
E/FramebufferNativeWindow(  784):  +++++++++++ CALLING framebuffer_open
++++++
W/gralloc (  784):  -----------  here in framebuffer, doing ioctl for page
flippping ------
W/gralloc (  784):  ----------- here in framebuffer, doing ioctl for page
flippping -------
W/gralloc (  784):  ----------- here in framebuffer, doing ioctl for page
flippping --------
I/gralloc (  784): ++++++++++++using (fd=23)
I/gralloc (  784): id           = LCDfb
I/gralloc (  784): xres         = 240 px
I/gralloc (  784): yres         = 320 px
I/gralloc (  784): xres_virtual = 240 px
I/gralloc (  784): yres_virtual = 640 px
I/gralloc (  784): bpp          = 16
I/gralloc (  784): r            = 11:5
I/gralloc (  784): g            =  5:6
I/gralloc (  784): b            =  0:5
I/gralloc (  784): width        = 240 mm (25.400000 dpi)
I/gralloc (  784): height       = 320 mm (25.400000 dpi)
I/gralloc (  784): refresh rate = 60.00 Hz
E/FramebufferNativeWindow(  784):  +++++++++++ CALLING gralloc_open ++++++
E/FramebufferNativeWindow(  784):  +++++++++++ INITIALIZE THE BUFFER FIFO
+++++
E/FramebufferNativeWindow(  784):  +++++++++++ AFTER GRDEV->ALLOC O +++++
E/FramebufferNativeWindow(  784): xDpi -2097152000
E/FramebufferNativeWindow(  784): yDpi -2097152000

On Nov 20, 12:22 am, Michael Trimarchi <trimar...@gandalf.sssup.it>



> website: 



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by AchimNohl » Sat, 21 Nov 2009 02:00:04 GMT


 Hi all,

I have see the same symptom while brining up 2.0 on an ARM926EJS based
(virtual) platform. 1.5 was working fine and my kernel remained
unchanged. In my analysis tools, I see that in my case the boot gets
stuck in  a pthread_mutex_lock. After that the CPU is just idle. The
lock is called from hardware/libhardware/modules/gralloc.cpp in
init_pmem_area. I do not know if the problem is the same as yours but
I will update you once I found out more.

Regards,
Achim

On Nov 20, 4:52am, Porting beginner <porting.begin...@gmail.com>





> > website:



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Sat, 21 Nov 2009 04:07:21 GMT


 n Fri, Nov 20, 2009 at 7:00 AM, AchimNohl <achim.n...@coware.com> wrote:

Thanks for details , me too got stuck at same place, so it looks many guys
have same problem. It shouldn't be fb driver issue or might need some
changes in fb driver to make it work but we don't know what.

Anyone has successfully migrate (bring-up) to eclair with same kernel from
donut ?






--
Thanks

--



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Sat, 21 Nov 2009 05:32:00 GMT


 n Fri, Nov 20, 2009 at 12:07 PM, Porting beginner <
porting.begin...@gmail.com> wrote:

Is there any official details what changes/new feature required from kernel
when migrating to eclair from donut ? Or differences between eclair and
donut in term of low level drivers and functionality ?




--
Thanks

--



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Alexey Roslyakov » Sat, 21 Nov 2009 06:47:23 GMT


 olution is simple: just remove lock&&unlock of mutex.
it is locked before (in the same thread), so deadlock occurs.

And probably next problem appears:(

I/gralloc ( 710): refresh rate = 53.04 Hz
I/gralloc ( 710): fb_device_open res: 0
E/gralloc ( 710): couldn't open pmem (Unknown error: -2)
E/gralloc ( 710): gralloc failed err=No such file or directory
E/FramebufferNativeWindow( 710): fb buffer 0 allocation failed w=800,
h=480, err=No such file or directory
E/gralloc ( 710): couldn't open pmem (Unknown error: -2)
E/gralloc ( 710): gralloc failed err=No such file or directory
E/FramebufferNativeWindow( 710): fb buffer 1 allocation failed w=800,
h=480, err=No such file or directory
E/FramebufferNativeWindow( 710): xDpi -2097152000
E/FramebufferNativeWindow( 710): yDpi -2097152000
D/libEGL ( 710): egl.cfg not found, using default config
D/libEGL ( 710): loaded /system/lib/egl/libGLES_android.so
I/SurfaceFlinger( 710): EGL informations:
I/SurfaceFlinger( 710): # of configs : 8
I/SurfaceFlinger( 710): vendor : Android
I/SurfaceFlinger( 710): version : 1.4 Android META-EGL
I/SurfaceFlinger( 710): extensions: EGL_KHR_image EGL_KHR_image_base
EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer
EGL_ANDROID_swap_rectangle EGL_ANDROID_get_render_buffer
I/SurfaceFlinger( 710): Client API: OpenGL ES
I/SurfaceFlinger( 710): EGLSurface: 5-6-5-0, config=0x1000000
I/SurfaceFlinger( 710): flags : 001c0000
W/SurfaceFlinger( 710): ro.sf.lcd_density not defined, using 160 dpi
by default.
I/DEBUG ( 695): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG ( 695): Build fingerprint: 'newsycat/mini2440/
mini2440/:AOSP/MASTER/eng.e-yes.20091117.221242:eng/test-keys'
I/DEBUG ( 695): pid: 710, tid: 717 >>> system_server <<<
I/DEBUG ( 695): signal 7 (SIGBUS), fault addr 00000000
I/DEBUG ( 695): r0 00000000 r1 426e4ee1 r2 0013ff20 r3 0013ebb8
I/DEBUG ( 695): r4 0013ec68 r5 accac0e8 r6 0013ec68 r7 0029b780
I/DEBUG ( 695): r8 00000320 r9 0013eda0 10 00000000 fp ac70bbdc
I/DEBUG ( 695): ip ac440358 sp 44f82cb8 lr afe0ff58 pc
acc9f568 cpsr 20000010
I/DEBUG ( 695): #00 pc 0001f568 /system/lib/egl/
libGLES_android.so
I/DEBUG ( 695): #01 pc 0001fdb8 /system/lib/egl/
libGLES_android.so
I/DEBUG ( 695): #02 pc 00006d8c /system/lib/libEGL.so
I/DEBUG ( 695): #03 pc 00015f38 /system/lib/
libsurfaceflinger.so
I/DEBUG ( 695): #04 pc 00016330 /system/lib/
libsurfaceflinger.so
I/DEBUG ( 695): #05 pc 0002741c /system/lib/
libsurfaceflinger.so
I/DEBUG ( 695): #06 pc 000299f4 /system/lib/libutils.so
I/DEBUG ( 695): #07 pc 0002994c /system/lib/libutils.so
I/DEBUG ( 695): #08 pc 00010ce8 /system/lib/libc.so
I/DEBUG ( 695): #09 pc 0001071c /system/lib/libc.so
I/DEBUG ( 695):
I/DEBUG ( 695): code around pc:
I/DEBUG ( 695): acc9f558 e5943038 e593103c e3510000 0a000002
I/DEBUG ( 695): acc9f568 e5910000 e350000c 0a00003c e3a06000
I/DEBUG ( 695): acc9f578 e58d6000 e5932020 e594c040 e58d2004
I/DEBUG ( 695):
I/DEBUG ( 695): code around lr:
I/DEBUG ( 695): afe0ff48 e5964000 e2144903 1a00000a ebfffbf8
I/DEBUG ( 695): afe0ff58 e3500001 0a000005 e5864000 e1a00006
I/DEBUG ( 695): afe0ff68 e3a01001 ebfffc1e e1a00004 e8bd81f0
I/DEBUG ( 695):
I/D



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Porting beginner » Sat, 21 Nov 2009 06:54:42 GMT


 n Fri, Nov 20, 2009 at 2:47 PM, Alexey Roslyakov <
alexey.roslya...@gmail.com> wrote:






--
Thanks
Rizavan

--



Android Eclair -- hangs after gralloc/mapFrameBufferLocked

by Alexey Roslyakov » Sat, 21 Nov 2009 10:19:32 GMT


 o - BUS is arrived:)
It seems PMEM now is required in kernel.

On 21 , 01:54, Porting beginner <porting.begin...@gmail.com> wrote:

--



Other Threads

1. about framebuffer issue in android

Hi All
         In android fb support is for 16bpp , i have target board
which doesnt support 16 bpp
         so i changed it to 32 bpp in EGLDisplaySurface.cpp , i made
following changes in that file
these are my changes

  info.bits_per_pixel = 32;
  /* Explicitly request 5/6/5 -- Not now anyway*/
   info.red.offset = 16;
  info.red.length = 8;
  info.green.offset = 8;
   info.green.length = 8;
info.blue.length = 8;
 info.transp.offset = 25;
 info.transp.length = 8;

 mFb[i].format  = GGL_PIXEL_FORMAT_RGBA_8888;

but i'm getting the display cut exactly in half size in horizontal
plane , and only upper half is visible while lower half is
not .......does anybody know where exactly i need to change the
settings to get full display ??
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. GC question.

I have a simple question, in my ctivity i define a static private as so:

private final FileFetcher ff = new FileFetcher();

what happens when this activity is destroyed, is the reference to the 
FileFetcher completly gone, and can everything be marked for GC?

Or would it better to write

private FileFetcher ff;

and the in my onCreate instantiate the FileFetcher and nullify it in the 
onDestroy method?

Jiri

--~--~---------~--~----~------------~-------~--~----~

3. Android Port based on 2.6.31 kernel on Zoom-2 board

4. intercepting email

5. Disactive animation on activity start

6. spinner item selection event

7. How to take a screencast demo of app