ping ! Any ETA on the recompiled libion lib?

On 31 March 2015 at 11:39, Xuzixin <xuzixin@hisilicon.com> wrote:

loop ZhaoDan

 

发件人: xinliang [mailto:xin3liang@qq.com]
发送时间: 2015330 11:11
收件人: Xuzixin
抄送: Vishal Bhoj; Guillaume.Tucker; dev
主题: Re: [Dev] Kernel build issue: hikey-mali branch fails to build...

 

Loop zhixin,

On Monday, March 30, 2015 11:00 AM, Vishal Bhoj wrote:

Hi,

 

On 30 March 2015 at 07:57, xinliang <xin3liang@qq.com> wrote:

 

On Monday, March 30, 2015 12:00 AM, Vishal Bhoj wrote:

 

On 29 March 2015 at 21:07, Vishal Bhoj <vishal.bhoj@linaro.org> wrote:

I have compiled the Mali kernel module for Android and tried to boot Android based on Scott's proposed change.I am able to load the mali kernel module but I am getting an error while surfaceflinger tries load the GLES libs and use the same. The logcat and dmesg output is here:

 

Did some changes to pick the right gralloc lib and the ion library. It still fails. Here is the logcat:

 

https://pastebin.linaro.org/view/6e7d5ca4

 

Gralloc tries to request fb with triplebuffering configuration but current FB is configured for single buffer (looks like):

<3>[   51.649450] [drm:hisi_drm_fb_helper_check_var] *ERROR* fb userspace request width/height/bpp is greater than current fb request 1280x720-32 (virtual 1280x2160) > 1280x1440-32

<7>[   81.907649] calling  init_module+0x0/0x6c [mali] @ 1755

<6>[   81.908408] ion: heap info : id 10 name fb phy 0x37300000 size 26214400

<4>[   81.917596] Mali: GPU version: CF070000

<4>[   81.930435] Mali: Mali device driver loaded

<7>[   81.934911] initcall init_module+0x0/0x6c [mali] returned 0 after 26431 usecs

<14>[  101.000830] healthd: battery none chg=

<3>[  111.007480] [drm:hisi_drm_fb_helper_check_var] *ERROR* fb userspace request width/height/bpp is greater than current fb request 1280x720-32 (virtual 1280x2160) > 1280x1440-32

 

 

Please open this file: drivers/gpu/drm/hisilicon/hisi_drm_fb.h and change bellow macro value to 3 then we can get triplebuffer. Please have a try. Thanks.
15 #define HISI_NUM_FRAMEBUFFERS  2

 

Thanks ! I don't see the FB related error not but I still get the ION errors:

 

E/ion     ( 2111): ioctl fd 10 c0404908(unknown) failed with code -1: Invalid argument

E/ion     ( 2111): map iommu failed!

E/[Gralloc-ERROR]( 2111): int alloc_backend_alloc(alloc_device_t*, int, int, size_t, int, const native_handle_t**):101 ion_map_iommu( 10 ) failed, usage ( 1e02 ), byte_w ( 8192 )

W/GraphicBufferAllocator( 2111): alloc(1280, 720, 1, 00001e02, ...) failed -1 (Operation not permitted)

E/        ( 2111): GraphicBufferAlloc::createGraphicBuffer(w=1280, h=720) failed (Operation not permitted), handle=0x0

E/BufferQueueProducer( 2111): [FramebufferSurface] dequeueBuffer: createGraphicBuffer failed

@xuzixin current ion doesn't use iommu and we use reserved memory instead. Could you please rebuild an ion lib that alloc memory in reserved way? Thanks.

E/[EGL-ERROR]( 2111): void __egl_platform_dequeue_buffer(egl_surface*):1609: failed to dequeue buffer from native window 0x7fb6b1be10; err = -1, buf = 0x0,max_allowed_dequeued_buffers 2

E/libEGL  ( 2111): eglMakeCurrent:777 error 3003 (EGL_BAD_ALLOC)

E/libEGL  ( 2111): call to OpenGL ES API with no current context (logged once per thread)

D/SurfaceFlinger( 2111): Set power mode=2, type=0 flinger=0x7fb7764000

E/BufferQueueProducer( 2111): [FramebufferSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

E/[EGL-ERROR]( 2111): void __egl_platform_dequeue_buffer(egl_surface*):1609: failed to dequeue buffer from native window 0x7fb6b1be10; err = -38, buf = 0x0,max_allowed_dequeued_buffers 2

E/libEGL  ( 2111): eglMakeCurrent:777 error 3003 (EGL_BAD_ALLOC)

W/SurfaceFlinger( 2111): DisplayDevice::makeCurrent failed. Aborting surface composition for display Built-in Screen

E/BufferQueueProducer( 2111): [FramebufferSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

E/[EGL-ERROR]( 2111): void __egl_platform_dequeue_buffer(egl_surface*):1609: failed to dequeue buffer from native window 0x7fb6b1be10; err = -38, buf = 0x0,max_allowed_dequeued_buffers 2

E/libEGL  ( 2111): eglMakeCurrent:777 error 3003 (EGL_BAD_ALLOC)

E/SurfaceFlinger( 2111): DisplayDevice::makeCurrent on default display failed. Aborting.

E/BufferQueueProducer( 2111): [FramebufferSurface] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

E/[EGL-ERROR]( 2111): void __egl_platform_dequeue_buffer(egl_surface*):1609: failed to dequeue buffer from native window 0x7fb6b1be10; err = -38, buf = 0x0,max_allowed_dequeued_buffers 2

E/libEGL  ( 2111): eglMakeCurrent:777 error 3003 (EGL_BAD_ALLOC)

 

 

Is there source available for gralloc and libion ? Can someone in Hisilicon LT help with this ?

 

 

Regards,

Vishal

 

On 27 March 2015 at 19:02, Guillaume Tucker <guillaume.tucker@arm.com> wrote:


On 26/03/15 17:48, Jorge Ramirez-Ortiz wrote:

On 03/26/2015 11:15 AM, Scott Bambrough wrote:

I've been going around with Jorge for a couple of days with this.  He
doesn't see the error but I do using make 4.0.  I have spoken with
Vishal and he sees this error with make 3.81, and tells me Fathi sees
this error in local builds.

 


Works for me with GNU Make 3.81 on Ubuntu 12.04.  I didn't remove
anything from Kbuild in the patch I sent you as I didn't hit this issue,
but the bit of logic involved only tends to make sense when the driver
is built out-of-tree.  So in this context I think it can be simplified
as Scott suggested (i.e. by removing the license test) as we know it's
all GPL.

 

on my side it builds fine (I havent been able to reproduce the error using the
following)

[jramirez@calypso-2 ~]$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

[jramirez@calypso-2 ~]$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu


and
[jramirez@calypso ~]$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.10
DISTRIB_CODENAME=utopic
DISTRIB_DESCRIPTION="Ubuntu 14.10"

[jramirez@calypso ~]$ make -v
GNU Make 4.0
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

 

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782