Hi Peter,

Thank you for taking the time to reply.

On Mon, Apr 29, 2013 at 10:39:00PM -0700, Peter Chang wrote:
> Hi Jeremy,
> 
>   The "Failed to lock buffer_handle" error means device couldn't get the 
> graphic buffer from gralloc module.
> How did you build the gralloc module for B2G?

Included in the manifest:

<project path="hardware/libhardware" name="platform/hardware/libhardware" />

sourced from:

  <default revision="refs/tags/android-4.0.4_r2.1"
           remote="caf"
           sync-j="4" />

[jsr@hermes B2G]$ find . -name "gralloc.default.so"
./out/target/product/am335xevm_sk/obj/lib/gralloc.default.so
./out/target/product/am335xevm_sk/obj/SHARED_LIBRARIES/gralloc.default_intermediates/LINKED/gralloc.default.so
./out/target/product/am335xevm_sk/symbols/system/lib/hw/gralloc.default.so
./out/target/product/am335xevm_sk/system/lib/hw/gralloc.default.so

Do you mean this one:  hw/gralloc.omap3.so ?  This one came from the running 
Android system.

I see where things might be going wrong.  The kernel is identical on both 
systems so copying the kernel modules across shouldn't be a problem, correct?  
We include hardware/ti/sgx in our manifest but I don't think it is being built 
as there is no Android build machinery.  Instead,  we copy the artifacts as 
below from the running Android system.  Obviously I am showing a 
misunderstanding of the B2G HAL.  Is there a compile time dependency between 
some of the libraries I've taken from the running system and parts of the B2G 
HAL?  There would possibly be a mismatch.

If it's any clue, I see no /dev/fb0 device and when I try to unload the kernel 
modules with rc.pvr restart I get:

root@android:/ # /system/bin/sgx/rc.pvr restart                                
[ 5768.321899] omaplfb: OMAPLFBDeInitDev: Device 0: PVR Device 1: Couldn't 
remove device from PVR Services
[ 5768.331787] omaplfb: OMAPLFB_Cleanup: OMAPLFBDeInit failed
rmmod: delete_module 'pvrsrvkm' failed (errno 11)
Couldn't unload modules

> 
> And Please dump the file list from your device( "adb shell ls -R > xxx.txt").
> It is helpful for debugging.

Attached.

> 
> By the way, the following are log when graphic system starts up. Do you see 
> the similar log in your device?
> 

No.  I see this:

--------- beginning of /dev/log/system
I/Vold    (   66): Vold 2.1 (the revenge) firing up
D/Vold    (   66): Volume sdcard state changing -1 (Initializing) -> 0 
(No-Media)
D/Vold    (   66): Volume usb state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (   66): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
E/DirectVolume(   66): Dv:partAdd: ignoring part_num = 4 (max: 3)
D/Vold    (   66): Volume sdcard state changing 2 (Pending) -> 1 
(Idle-Unmounted)
I/        (   74): ServiceManager: 0x18910
I/        (   75): ServiceManager: 0xf958
E/audio_hw_primary(   75): Route MIXER CTRL name: PCM Playback Volume
I/AudioFlinger(   75): Loaded primary audio interface from Omap3 audio HW HAL 
(audio)
I/AudioFlinger(   75): Using 'Omap3 audio HW HAL' (audio.primary) as the 
primary audio interface
I/AudioFlinger(   75): Loaded a2dp audio interface from A2DP Audio HW HAL 
(audio)
I/CameraService(   75): CameraService started (pid=75)
I/AudioFlinger(   75): AudioFlinger's thread 0x175d0 ready to run
W/AudioFlinger(   75): Thread AudioOut_1 cannot connect to the power manager 
service
I/AudioPolicyService(   75): Loaded audio policy from LEGACY Audio Policy HAL 
(audio_policy)
I/power   (   69): *** set_screen_state 1
E/FramebufferNativeWindow(   69): couldn't open framebuffer HAL (Bad address)
E/uim-sysfs(   67): uim: Inside st_uart_config
E/uim-sysfs(   67): uim: Un-Installed N_TI_WL Line displine
E/uim-sysfs(   67): uim:cleanup


Regards...Jeremy


> [Log]
> I/Gecko   (20515): Logging GL tracing output to /system/b2g/firefox.trace
> I/Gecko   (20515): Attempting load of /data/local/egltrace.so
> I/Gecko   (20515): Attempting load of libEGL.so
> I/Adreno200-EGL(20515): <qeglDrvAPI_eglInitialize:295>: EGL 1.4 QUALCOMM 
> build:  (Merge)
> I/Adreno200-EGL(20515): Build Date: 03/04/13 Mon
> I/Adreno200-EGL(20515): Local Branch: b2g_autogen_ephemeral_branch
> I/Adreno200-EGL(20515): Remote Branch: 
> I/Adreno200-EGL(20515): Local Patches: 
> I/Adreno200-EGL(20515): Reconstruct Branch: 
> D/CALCFPS (20515): DEBUG_CALC_FPS: 0
> D/CALCFPS (20515): period: 10
> D/CALCFPS (20515): ignorethresh_us: 500000
> E/GeckoConsole(20515): OpenGL LayerManager Initialized Succesfully.
> E/GeckoConsole(20515): Version: OpenGL ES 2.0 [email protected] AU@  (CL@)
> E/GeckoConsole(20515): Vendor: Qualcomm
> E/GeckoConsole(20515): Renderer: Adreno (TM) 200
> E/GeckoConsole(20515): FBO Texture Target: TEXTURE_2D
>


 
> ----- Original Message -----
> From: "Jeremy Reeve" <[email protected]>
> To: [email protected]
> Sent: Monday, April 29, 2013 11:30:37 PM
> Subject: Re: [b2g] TI am335xevm_sk B2G port graphics subsystem problem
> 
> 
> Apologies, please see message inline:
> 
> 
> Hi there,
> 
> After having built (seemingly successfully) a B2G build and started a system 
> running there appear to be a few problems but for now the most important is 
> that the graphics subsystem doesn't appear to be working as it should.
> 
> As part of the porting process I diffed a running Android ICS system with the 
> B2G build output and found the following material (what I believe are 
> material, this may not be the case) differences:
> 
> BINS="pvrsrvinit        \
> sgx_init_test           \
> sgx_flip_test           \
> sgx_render_flip_test    \
> sgx/omaplfb.ko          \
> sgx/pvrsrvkm.ko         \
> sgx/rc.pvr"
> 
> LIBS="hw/gralloc.omap3.so                  \
>     hw/lights.am335xevm_sk.so              \
>     hw/sensors.am335xevm.so                \
>     egl/libEGL_POWERVR_SGX530_125.so       \
>     egl/libGLESv1_CM_POWERVR_SGX530_125.so \
>     egl/libGLESv2_POWERVR_SGX530_125.so    \
>     egl/egl.cfg                            \
>     libIMGegl.so                       \
>     libpvr2d.so                        \
>     libpvrANDROID_WSEGL.so             \
>     libPVRScopeServices.so             \
>     libPVRShell_OGLES2ChameleonMan.so  \
>     libPVRShell_OGLES2Coverflow.so     \
>     libPVRShell_OGLES2Shaders.so       \
>     libPVRShell_OGLESVase.so           \
>     libsrv_init.so                     \
>     libsrv_um.so                       \
>     libusc.so                          \
>     libglslcompiler.so"
> 
> We then copy these to the target filesystem in the same locations as I found 
> them on the Android ICS image.
>  
> dmesg output contains:
> 
> <6>[    1.049957] No daughter card found on AM335x EVM
> <6>[    1.054809] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 
> bytes/write
> <6>[    1.070007] Board name: A335X_SK
> <6>[    1.073394] Board version: 1.2B
> <6>[    1.076660] The board is a AM335x Starter Kit.
> <4>[    1.081573]  omap_hsmmc.0: alias fck already exists
> <4>[    1.086883]  omap_hsmmc.1: alias fck already exists
> <4>[    1.092773]  da8xx_lcdc.0: alias fck already exists
> <6>[    1.098052] da8xx_lcdc da8xx_lcdc.0: GLCD: Found NHD-4.3-ATXI#-T-1 panel
> <4>[    1.114196]  davinci-mcasp.1: alias fck already exists
> <6>[    1.119750] am335xevm: bt init
> 
> 
> lsmod on the running system shows:
> 
> root@android:/ # lsmod
> omaplfb 10654 0 - Live 0xbf031000 (O)
> pvrsrvkm 159157 5 omaplfb, Live 0xbf000000 (O)
> 
> b2g-ps reports:
> 
> root@android:/ # b2g-ps                                                       
>  
> APPLICATION      USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
> b2g              root      69    1     115612 37720 ffffffff 400e84e0 S 
> /system/b2g/b2g
> (Preallocated a  root      179   69    56508  18916 ffffffff 400fe4e0 S 
> /system/b2g/plugin-container
> 
> Attempting to start an application directly using:
> 
> root@android:/ # b2g.sh --runapp clock                                        
>  
> [  361.648773] request_suspend_state: wakeup (0->0) at 361647957261 
> (2000-01-01 07:26:28.026276400 UTC)
> 946711588419   Marionette           INFO   MarionetteComponent loaded
> 946711588427   Marionette           INFO   marionette enabled
> 946711589196   Marionette           INFO   marionette initializing at 
> final-ui-startup
> 946711589338   Marionette           INFO   marionette-actors.js loaded
> 946711589343   Marionette           INFO   marionette listener opened
> exception: [Exception... "Component returned failure code: 0xc1f30001 
> (NS_ERROR_NOT_INITIALIZED) [nsICrashReporter.annotateCrashReport]"  nsresult: 
> "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: 
> chrome://browser/content/shell.js :: <TOP_LEVEL> :: line 222"  data: 
> no]###################################### forms.js loaded
> ############################### browserElementPanning.js loaded
> ######################## BrowserElementChildPreload.js loaded
> 
> results in the attached logcat output.
> 
> I noticed that gonk-misc hadn't copied over bootanimation.zip and after doing 
> so I still see nothing on the display but get:
> 
> W/Gonk    (   69): Failed to lock buffer_handle_t
> 
> repeatedly in the log.  Is the zipfile not being present an indication that 
> our build is incomplete/broken (I don't see the file explicitly mentioned in 
> Android.mk)?
> 
> The init.rc we're using is the TI Android supplied version altered to import 
> init.b2g.rc.
> 
> Are there more diagnostic checks I can perform on the graphics subsystem?  
> I'm not after a 'fix it like this' response, just some pointers to help 
> troubleshoot.
> 
> 
> With kind regards...Jeremy
>  
> 
>  
> 
> On Mon, Apr 29, 2013 at 03:04:40PM +0200, Jeremy Reeve wrote:
> > 
> 
> > 
> > I/power   (  251): *** set_screen_state 1
> > E/profiler(  251): Registering start signal
> > W/Gonk    (  251): Could not open boot animation
> > I/Gecko   (  251): 946711588419       Marionette    INFO    
> > MarionetteComponent loaded
> > I/Gecko   (  251): 946711588427       Marionette    INFO    marionette 
> > enabled
> > I/Gonk    (  251): Socket open for RIL
> > I/VolumeManager(  251): changing state from 'Uninitialized' to 'Starting'
> > I/VolumeManager(  251): Connected to vold
> > I/VolumeManager(  251): Volume sdcard: changing state from Init to Idle (1 
> > observers)
> > I/VolumeManager(  251): Volume usb: changing state from Init to NoMedia (1 
> > observers)
> > I/VolumeManager(  251): changing state from 'Starting' to 'Volumes Ready'
> > I/AutoMounter(  251): UpdateState: umsAvail:1 umsEnabled:0 mode:0 
> > usbCablePluggedIn:0 tryToShare:0
> > I/AutoMounter(  251): UpdateState: Volume sdcard is Idle and inserted
> > D/VoldCmdListener(   66): volume list
> > I/VolumeManager(  251): Volume sdcard: changing state from Idle to Checking 
> > (3 observers)
> > I/VolumeManager(  251): Volume sdcard: changing state from Checking to Idle 
> > (3 observers)
> > E/AutoMounter(  251): Command 'volume mount sdcard' failed: 406 'volume 
> > operation failed (No such file or directory)'
> > I/AutoMounter(  251): UpdateState: umsAvail:1 umsEnabled:0 mode:0 
> > usbCablePluggedIn:0 tryToShare:0
> > I/AutoMounter(  251): UpdateState: Volume sdcard is Idle and inserted
> > I/VolumeManager(  251): Volume sdcard: changing state from Idle to Checking 
> > (3 observers)
> > I/VolumeManager(  251): Volume sdcard: changing state from Checking to Idle 
> > (3 observers)
> > E/AutoMounter(  251): Command 'volume mount sdcard' failed: 406 'volume 
> > operation failed (No such file or directory)'
> > I/AutoMounter(  251): UpdateState: umsAvail:1 umsEnabled:0 mode:0 
> > usbCablePluggedIn:0 tryToShare:0
> > I/AutoMounter(  251): UpdateState: Volume sdcard is Idle and inserted
> > I/VolumeManager(  251): Volume sdcard: changing state from Idle to Checking 
> > (3 observers)
> > I/VolumeManager(  251): Volume sdcard: changing state from Checking to Idle 
> > (3 observers)
> > E/AutoMounter(  251): Command 'volume mount sdcard' failed: 406 'volume 
> > operation failed (No such file or directory)'
> > D/VoldCmdListener(   66): volume mount sdcard
> > I/Vold    (   66): /dev/block/vold/179:3 being considered for volume sdcard
> > D/Vold    (   66): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 
> > (Checking)
> > W/Vold    (   66): Skipping fs checks
> > E/Vold    (   66): /dev/block/vold/179:3 failed to mount via VFAT (No such 
> > file or directory)
> > E/Vold    (   66): Volume sdcard found no suitable devices for mounting :(
> > D/Vold    (   66): Volume sdcard state changing 3 (Checking) -> 1 
> > (Idle-Unmounted)
> > D/VoldCmdListener(   66): volume mount sdcard
> > I/Vold    (   66): /dev/block/vold/179:3 being considered for volume sdcard
> > D/Vold    (   66): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 
> > (Checking)
> > W/Vold    (   66): Skipping fs checks
> > E/Vold    (   66): /dev/block/vold/179:3 failed to mount via VFAT (No such 
> > file or directory)
> > E/Vold    (   66): Volume sdcard found no suitable devices for mounting :(
> > D/Vold    (   66): Volume sdcard state changing 3 (Checking) -> 1 
> > (Idle-Unmounted)
> > D/VoldCmdListener(   66): volume mount sdcard
> > I/Vold    (   66): /dev/block/vold/179:3 being considered for volume sdcard
> > D/Vold    (   66): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 
> > (Checking)
> > W/Vold    (   66): Skipping fs checks
> > E/Vold    (   66): /dev/block/vold/179:3 failed to mount via VFAT (No such 
> > file or directory)
> > E/Vold    (   66): Volume sdcard found no suitable devices for mounting :(
> > D/Vold    (   66): Volume sdcard state changing 3 (Checking) -> 1 
> > (Idle-Unmounted)
> > I/Gonk    (  251): Connected to netd
> > D/        (  251): int open_sensors(const hw_module_t*, const char*, 
> > hw_device_t**)[269]
> > D/        (  251): sensors_poll_context_t::sensors_poll_context_t()[138]
> > E/EventHub(  251): could not get driver version for /dev/input/mice, Not a 
> > typewriter
> > D/        (  251): int sensors__get_sensors_list(sensors_module_t*, const 
> > sensor_t**)[79]
> > D/        (  251): int sensors_poll_context_t::activate(int, int)[168]
> > D/EventHub(  251): No input device configuration file found for device 'ST 
> > LIS3LV02DL Accelerometer'.
> > D/EventHub(  251): No input device configuration file found for device 
> > 'gpio-keys'.
> > I/EventHub(  251): New device: id=2, fd=41, path='/dev/input/event2', 
> > name='gpio-keys', classes=0x1, configuration='', 
> > keyLayout='/system/usr/keylayout/gpio-keys.kl', 
> > keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
> > D/EventHub(  251): No input device configuration file found for device 
> > 'ti-tsc-adcc'.
> > I/EventHub(  251): New device: id=3, fd=44, path='/dev/input/event1', 
> > name='ti-tsc-adcc', classes=0x4, configuration='', keyLayout='', 
> > keyCharacterMap='', builtinKeyboard=false
> > E/EventHub(  251): could not get driver version for /dev/input/mouse0, Not 
> > a typewriter
> > I/InputReader(  251): Device reconfigured: id=3, name='ti-tsc-adcc', 
> > surface size is now 480x272, mode is 3
> > I/InputReader(  251): Device added: id=3, name='ti-tsc-adcc', 
> > sources=0x00002002
> > I/InputReader(  251): Device added: id=2, name='gpio-keys', 
> > sources=0x00000101
> > D/        (  251): int sensors__get_sensors_list(sensors_module_t*, const 
> > sensor_t**)[79]
> > D/        (  251): int sensors__get_sensors_list(sensors_module_t*, const 
> > sensor_t**)[79]
> > E/GeckoConsole(  251): [JavaScript Warning: "Unknown property 
> > '-moz-align-self'.  Declaration dropped." {file: 
> > "resource://gre-resources/ua.css" line: 44}]
> > I/Gecko   (  251): 946711589196        Marionette        INFO     
> > marionette initializing at final-ui-startup
> > I/Gecko   (  251): 946711589338        Marionette        INFO     
> > marionette-actors.js loaded
> > I/Gecko   (  251): 946711589343        Marionette        INFO     
> > marionette listener opened
> > I/FMRadio (  251): FMRadio is initialized.
> > D/NetUtils(  251): failed to remove default route for wlan0: No such device
> > W/AudioFlinger(   75): Thread AudioOut_1 cannot connect to the power 
> > manager service
> > I/GeckoDump(  251): exception: [Exception... "Component returned failure 
> > code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) 
> > [nsICrashReporter.annotateCrashReport]"  nsresult: "0xc1f30001 
> > (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: 
> > chrome://browser/content/shell.js :: <TOP_LEVEL> :: line 222"  data: no]
> > I/Gecko   (  251): ###################################### forms.js loaded
> > I/Gecko   (  251): ############################### browserElementPanning.js 
> > loaded
> > I/Gecko   (  251): ######################## BrowserElementChildPreload.js 
> > loaded
> > I/Gecko   (  251): [AccessFu] INFO attach
> > E/profiler(  310): Registering start signal
> > E/GeckoConsole(  310): [JavaScript Warning: "Unknown property 
> > '-moz-align-self'.  Declaration dropped." {file: 
> > "resource://gre-resources/ua.css" line: 44}]
> > I/Gecko   (  310): ###################################### forms.js loaded
> > I/Gecko   (  310): ############################### browserElementPanning.js 
> > loaded
> > I/Gecko   (  310): ######################## BrowserElementChildPreload.js 
> > loaded
> 
> > _______________________________________________
> > dev-b2g mailing list
> > [email protected]
> > https://lists.mozilla.org/listinfo/dev-b2g
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to