Enabling radeonsi on Android-x86 lollipop

5,168 views
Skip to first unread message

pstglia

unread,
Apr 21, 2015, 10:34:49 PM4/21/15
to andro...@googlegroups.com
Hi everyone,

I've managed to compile radeonsi on Lollipop using Mesa 10.4.2 (which not means that will work when testing on hardware :D )
At first I tried kitkat, but older llvm version was giving me problems. That's why I tried lollipop, which uses a "mix" of version 3.4 / 3.5...

I had basically to change/create Android makefiles on "external/mesa" and "external/llvm" (the the last one is a requirement for radeonsi). 

I had also to create manually "format_srgb.c" file by executing these cmds (not the first time I face this issue, but still can't figure out how to solve it in order to generate it on compile time - Python doesn't like me... ):
cd external/mesa/src/util/
python format_srgb.py > format_srgb.c

I've attached patches. If you want to build by your own, don't forget to create format_srgb.c as described above (or by fixing Android.mk files, your choice)

I had not the chance to test it (no hardware to test). If you have a CGN AMD GPU (R7/R9 series) or an CGN APU (like A10 7850K, A4 1200, etc) and you are aware of the risks (damage/data loss), here's a testing ISO:

Working or not, if possible collect this info to check gallium is being used:

# Check gallium renderer and version:
logcat | grep "SurfaceFlinger" | grep -E "renderer|version|extensions"

# Check if radeondrmfb is being used
cat /proc/fb

Thanks,
Pstglia


0001-Enable-radeonsi-on-Android-x86-lollipop.patch
0001-Enable-R600-support-on-Android-x86-mesa-gallium-rade.patch
Message has been deleted

Mauro Rossi

unread,
Apr 22, 2015, 7:08:00 AM4/22/15
to andro...@googlegroups.com
Hi Paulo,

great!
Things are moving with consistent results

Did you had to change /hardware/drm_gralloc.git/Android.mk in order to support radeonsi?

# Android.mk for drm_gralloc
 
DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
 
 freedreno_drivers := freedreno
 intel_drivers := i915 i965 i915g ilo
-radeon_drivers := r300g r600g
+radeon_drivers := r300g r600g radeonsi
 nouveau_drivers := nouveau
 vmwgfx_drivers := vmwgfx


Thanks for the info.

For me it's time to find a Southern Island videocard to support testing.
Mauro

Blumi Milch

unread,
Apr 22, 2015, 7:11:06 AM4/22/15
to andro...@googlegroups.com
Yay, great!

First time ever i see a speedy display with android-x86 on my desktop hardware. =)
There are still various crashes (Browser Setup, Sleep Mode, Antutu Install/Run)
but imho the most important step is done.

BTW, I had to add the -d parameter to logcat, the commandline did not work for me without it.


# logcat -d | grep "SurfaceFlinger" | grep -E "renderer|version|extensions"

I/SurfaceFlinger( 1777): Using composer version 1.0
I/SurfaceFlinger( 1777): version : 1.4 Android META-EGL
I/SurfaceFlinger( 1777): extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_image_base EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer
I/SurfaceFlinger( 1777): renderer : Gallium 0.4 on AMD PITCAIRN
I/SurfaceFlinger( 1777): version : OpenGL ES 2.0 Mesa 10.4.2 (git-0d114a7)
I/SurfaceFlinger( 1777): extensions: GL_EXT_debug_marker GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_vertex_array_object GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_KHR_context_flush_control


# cat /proc/fb

0 radeondrmfb


Additional Hardware Info:

* AMD Radeon HD 7850, Catalyst Control Center:

Graphics Chipset AMD Radeon HD 7800 Series
Device ID 6819
Vendor ID 1002
Subsystem ID 3260
Subsystem Vendor ID 1682
Revision ID 00
Graphics Bus Capability PCI Express 3.0
Maximum Bus Setting PCI Express 2.0x16
BIOS Version 015.016.000.001
BIOS Part Number 113-785ACDF71_113-C4010400-X06
BIOS Date 2012/03/13
Memory Size 3455 MB
Memory Type HyperMemory
Core Clock in MHz 860 MHz
Memory Clock in MHz 1200 MHz


* Mainboard Asus P5E, CPU-Z Info:

CPU Intel Core 2 Duo E6750 @2.66GHz
Northbridge Intel X38 rev. 01
Southbridge Intel 82801IR (ICH9R) rev. 02
Graphic Interface PCI-Express
PCI-E Link Width x16
Memory Type DDR2
Memory Size 4096 MBytes

Chih-Wei Huang

unread,
Apr 22, 2015, 8:42:45 AM4/22/15
to Android-x86
Great work, Paulo!
Could you rebase the patches to the 10.6 branch?
It's the target mesa of lollipop-x86.

pstglia

unread,
Apr 22, 2015, 9:14:33 AM4/22/15
to andro...@googlegroups.com
Hi Chi Wei. Sure I can!

I'll try to start this evening

pstglia

unread,
Apr 22, 2015, 8:23:31 PM4/22/15
to andro...@googlegroups.com
Hi Mauro, 


Did you had to change /hardware/drm_gralloc.git/Android.mk in order to support radeonsi?

# Android.mk for drm_gralloc
 
DRM_GPU_DRIVERS := $(strip $(filter-out swrast, $(BOARD_GPU_DRIVERS)))
 
 freedreno_drivers := freedreno
 intel_drivers := i915 i965 i915g ilo
-radeon_drivers := r300g r600g
+radeon_drivers := r300g r600g radeonsi

Yes. Also enabled on device/generic/common/BoardConfig.mk

BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g radeonsi



For me it's time to find a Southern Island videocard to support testing.

AMD could donate some for us... lol

pstglia

unread,
Apr 22, 2015, 10:26:17 PM4/22/15
to andro...@googlegroups.com
Great work, Paulo!
Could you rebase the patches to the 10.6 branch?
It's the target mesa of lollipop-x86.

Hi again,

Here's the patches:

# to be applied under external/mesa
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.6.patch 

# to be applied under external/llvm (attached on the initial post)
0001-Enable-R600-support-on-Android-x86-mesa-gallium-rade.patch

# to be applied under hardware/drm_gralloc (add radeonsi on radeon_drivers)
0001-Enable-radeonsi-on-Android-x86.patch

And also include it on device/generic/common/BoardConfig.mk
BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g radeonsi

I've compiled, but not tested.

Regards,
Pstglia
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.6.patch
0001-Enable-radeonsi-on-Android-x86.patch
0001-Enable-R600-support-on-Android-x86-mesa-gallium-rade.patch

Jarvis Chung

unread,
Apr 23, 2015, 6:33:35 AM4/23/15
to andro...@googlegroups.com
Hi Pstglia,

Good job!!
Thanks for your share.

I couldn't run mesa 10.6 for HD6670 and R7 240.
but, I could run mesa 10.4.2 use your patch.

For mesa 10.6, I success boot Android, but always get error log as below:
<6>[   48.332792] RenderThread[2805]: segfault at 8 ip ae403d52 sp a168c838 error 6 in Roboto-Regular.ttf[ae403000+3b000]
<3>[   48.360088] binder: 2202: binder_alloc_buf, no vma
<6>[   48.360093] binder: 1915:1915 transaction failed 29201, size 100-0
<3>[   48.360739] binder: 2202: binder_alloc_buf, no vma
<6>[   48.360742] binder: 1915:1915 transaction failed 29201, size 100-0 

For mesa 10.4.2, I can run Angry Bird, but not run Aututu and watch video from browser.

I attached log files.

Jarvis

pstglia於 2015年4月23日星期四 UTC+8上午10時26分17秒寫道:
dmesg_lollipop_mesa_10.4.2_hd6670_201504231400.log
logcat_lollipop_mesa_10.4.2_hd6670_201504231400.log

pstglia

unread,
Apr 23, 2015, 7:31:50 AM4/23/15
to andro...@googlegroups.com
Hi Jarvis,


Good job!!
Thanks for your share.

I couldn't run mesa 10.6 for HD6670 and R7 240.
but, I could run mesa 10.4.2 use your patch.

You used kernel 3.10.58 right? Maybe you could try a newer one ( 3.18 or 4.0 ). Many features for radeon are only implemented on newer kernels

Regards,
pstglia 

Jarvis Chung

unread,
Apr 23, 2015, 9:29:06 PM4/23/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your reply.

I tested 3.18 and 4.0 kernel for mesa 10.6. I got the same issue.
I attached log use kernel 4.0.

Thanks.
Jarvis

pstglia於 2015年4月23日星期四 UTC+8下午7時31分50秒寫道:
logcat_lollipop_mesa_10.6_201504232103.log
dmesg_lollipop_mesa_10.6_201504232103.log

Mauro Rossi

unread,
Apr 24, 2015, 1:41:51 PM4/24/15
to andro...@googlegroups.com
Hi Jarvis,

logcat shows some errors to be further investigated:

E/OpenGLRenderer( 2968): GL error:  GL_INVALID_OPERATION

here EGL trace could show some EGL primitive detail about the GL error code (GL_INVALID_OPERATION i.e.  0x0502),
it can be done in settings or  via [ALT]+[F1] command line:

setprop debug.egl.trace error


Regarding this error:

<3>[   48.360739] binder: 2202: binder_alloc_buf, no vma

if I'm not wrong we had a workaround to set grub line at boot: vmalloc=256M



We may also need to check why fonts rendering is causing segfault (SIGSEV MAPERR) like this:

D/OpenGLRenderer( 3946): setting property extraRasterBucket to 0.95
D/OpenGLRenderer( 3946):     failed
D/OpenGLRenderer( 3946): setting property extraRasterBucket to 0.0
D/OpenGLRenderer( 3946):     failed
F/libc    ( 3946): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 4002 (RenderThread)
I/DEBUG   ( 1636): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1636): Build fingerprint: 'Android-x86/android_x86/x86:5.1/LMY47I/jarvis04231119:eng/test-keys'
I/DEBUG   ( 1636): Revision: '0'
I/DEBUG   ( 1636): ABI: 'x86'
I/DEBUG   ( 1636): pid: 3946, tid: 4002, name: RenderThread  >>> com.android.systemui <<<
I/DEBUG   ( 1636): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
E/DEBUG   ( 1636): AM write failure (32 / Broken pipe)
I/DEBUG   ( 1636):     eax 00000007  ebx b703353c  ecx 00000001  edx b7015861
I/DEBUG   ( 1636):     esi a168a924  edi 00000003
I/DEBUG   ( 1636):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 000000ef  xss 0000007b
I/DEBUG   ( 1636):     eip ae403d52  ebp 00000005  esp a168a838  flags 00010202
I/DEBUG   ( 1636):
I/DEBUG   ( 1636): backtrace:
I/DEBUG   ( 1636):     #00 pc 00000d52  /android/system/fonts/Roboto-Regular.ttf
W/libbacktrace( 1636): virtual bool Backtrace::VerifyReadWordArgs(uintptr_t, word_t*): invalid pointer 0xb3766a91
W/libbacktrace( 1636): virtual bool Backtrace::VerifyReadWordArgs(uintptr_t, word_t*): invalid pointer 0xb6a14823


M.

Chih-Wei Huang

unread,
Apr 30, 2015, 1:09:50 PM4/30/15
to Android-x86
Hi pstglia,
I've applied the patches locally and built it.
Basically it builds as expected.
Thank you for the great work.


2015-04-23 10:26 GMT+08:00 pstglia <pst...@gmail.com>:
>> Great work, Paulo!
>> Could you rebase the patches to the 10.6 branch?
>> It's the target mesa of lollipop-x86.
>
> Hi again,
>
> Here's the patches:
>
> # to be applied under external/mesa
> 0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.6.patch

I think the patch has to be refined a little.
I'll take it.

> # to be applied under external/llvm (attached on the initial post)
> 0001-Enable-R600-support-on-Android-x86-mesa-gallium-rade.patch

I have a little concern you changed
libLLVMExecutionEngine and libLLVMJIT
from the host lib to the target lib.

> # to be applied under hardware/drm_gralloc (add radeonsi on radeon_drivers)
> 0001-Enable-radeonsi-on-Android-x86.patch
> And also include it on device/generic/common/BoardConfig.mk
> BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g radeonsi

OK.

> I've compiled, but not tested.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

pstglia

unread,
Apr 30, 2015, 10:58:09 PM4/30/15
to andro...@googlegroups.com

 
I think the patch has to be refined a little.
I'll take it.

Thanks for this. Still trying to improve it (making better patches)
 
I have a little concern you changed
libLLVMExecutionEngine and libLLVMJIT
from the host lib to the target lib. 

Correct. I noticed gallivm requires some functions/methods declared under LLVM's ExecutionEngine and JIT:

target SharedLib: gallium_dri (out/target/product/x86/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so)
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:155: error: undefined reference to 'llvm::JITMemoryManager::~JITMemoryManager()'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:155: error: undefined reference to 'llvm::JITMemoryManager::~JITMemoryManager()'
external/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:595: error: undefined reference to 'llvm::EngineBuilder::InitEngine()'
external/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:723: error: undefined reference to 'llvm::EngineBuilder::selectTarget()'
external/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:723: error: undefined reference to 'llvm::EngineBuilder::create(llvm::TargetMachine*)'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:155: error: undefined reference to 'llvm::JITMemoryManager::~JITMemoryManager()'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:550: error: undefined reference to 'llvm::JITMemoryManager::CreateDefaultMemManager()'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:155: error: undefined reference to 'llvm::JITMemoryManager::~JITMemoryManager()'
out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_gallium_intermediates/libmesa_gallium.a(lp_bld_misc.o):lp_bld_misc.cpp:vtable for DelegatingJITMemoryManager: error: undefined reference to 'llvm::RTDyldMemoryManager::getSymbolAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_gallium_intermediates/libmesa_gallium.a(lp_bld_misc.o):lp_bld_misc.cpp:vtable for ShaderMemoryManager: error: undefined reference to 'llvm::RTDyldMemoryManager::getSymbolAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:168: error: undefined reference to 'LLVMDisposeExecutionEngine'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:377: error: undefined reference to 'LLVMLinkInJIT'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:240: error: undefined reference to 'LLVMGetExecutionEngineTargetData'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:168: error: undefined reference to 'LLVMDisposeExecutionEngine'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:377: error: undefined reference to 'LLVMLinkInJIT'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:168: error: undefined reference to 'LLVMDisposeExecutionEngine'
external/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c:609: error: undefined reference to 'LLVMGetPointerToGlobal'

As host libraries, these functions are not included inside shared library libLLVM (which I referenced on mesa). That's why I changed it to target (the only way I could figure out at that moment)

I don't know if we can build these both as host and target libraries or even link with the host libraries to solve these dependencies. Do you know if this is possible? Any other option maybe?

Regards
Pstglia


 

Chih-Wei Huang

unread,
May 1, 2015, 8:04:33 AM5/1/15
to Android-x86
2015-05-01 10:58 GMT+08:00 pstglia <pst...@gmail.com>:
>
>> I think the patch has to be refined a little.
>> I'll take it.
>
> Thanks for this. Still trying to improve it (making better patches)
>
>> I have a little concern you changed
>> libLLVMExecutionEngine and libLLVMJIT
>> from the host lib to the target lib.
>
> I don't know if we can build these both as host and target libraries or even
> link with the host libraries to solve these dependencies. Do you know if
> this is possible? Any other option maybe?

Surely it can.
Many llvm libs are built in this way, e.g.,
lib/IR/Android.mk, lib/Linker/Android.mk.
So it's better to do the same way.

pstglia

unread,
May 1, 2015, 7:38:05 PM5/1/15
to andro...@googlegroups.com
>> I have a little concern you changed
>> libLLVMExecutionEngine and libLLVMJIT
>> from the host lib to the target lib.
>
> I don't know if we can build these both as host and target libraries or even
> link with the host libraries to solve these dependencies. Do you know if
> this is possible? Any other option maybe?

Surely it can.
Many llvm libs are built in this way, e.g.,
lib/IR/Android.mk, lib/Linker/Android.mk.
So it's better to do the same way.

Thank you again for the explanation! I've updated the llvm patch (attached) in order to fix this.


0001-Enable-R600-support-on-Android-x86-mesa-gallium-radeon_lollipop_20150501.patch

Mauro Rossi

unread,
May 2, 2015, 3:06:50 PM5/2/15
to andro...@googlegroups.com
Hi pstglia,

In configure.ac file mesa checks for llvm 3.4.2 to allow building radeonsi.

I'm trying to build llvm R600 targets with version that comes with kitkat-x86,
which is  llvm 3.4-0 from AOSP android-4.4.4_r2.0.1

I wonder if 3.4.0 will suffice, doing the trick to feed mesa with declaration that llvm 3.4.2 is avalable.


I have seen that you had to change llvm-gen-intrinsics.mk in order to comply with tblgen option: -gen-intrinsic

tblgen --help

...
    -gen-intrinsic       - Generate intrinsic information
    -gen-tgt-intrinsic   - Generate target intrinsic information




[patched llvm-gen-intrinsics.mk]
ifeq ($(LOCAL_IS_HOST_MODULE),true)
    $(call transform-host-td-to-out,intrinsic)
else
    $(call transform-device-td-to-out,intrinsic)
endif


Do I need to replace the second intrinsic with tgt-intrinsic  to properly call
transform-device-td-to-out for the device (target)?

If that is the case the same ifeq..else..end construct should be used in llvm-tblgen-rules.mk,
in order to build generic "%GenIntrinsics" (? some weeks needed just to understand what they are ...) differently for host and device.

Mauro

pstglia

unread,
May 2, 2015, 5:20:33 PM5/2/15
to andro...@googlegroups.com
Hi Mauro


Em sábado, 2 de maio de 2015 16:06:50 UTC-3, Mauro Rossi escreveu:
Hi pstglia,

In configure.ac file mesa checks for llvm 3.4.2 to allow building radeonsi.

I'm trying to build llvm R600 targets with version that comes with kitkat-x86,
which is  llvm 3.4-0 from AOSP android-4.4.4_r2.0.1

I wonder if 3.4.0 will suffice, doing the trick to feed mesa with declaration that llvm 3.4.2 is avalable.

Not so sure forcing version 3.4.2... Some required extensions by mesa (radeonsi/gallivm) seems to be missing on this llvm version. 
In certains parts of code, Mesa checks the declared llvm version in use (directives -DHAVE_LLVM and DLLVM_VERSION_PATCH) and decides which include file or piece of code to be used. Also, if not matched with a minimum version, it forces an error on compiling.

This is what I think, but I can be wrong.

Plus, by enabling the required llvm features needed by radeonsi (ExecutionEngine, JIT, R600) You'll probably face these errors on llvm compiling:

external/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp: In constructor '{anonymous}::StatSymbols::StatSymbols()':
external/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp:810:66: error: 'open64' was not declared in this scope
...
target  C++: libLLVMR600CodeGen <= external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp: In member function 'int {anonymous}::AMDGPUCFGStructurizer::handleJumpintoIfImp(llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*)':
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp:1236:57: error: lvalue required as increment operand
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp: In member function 'void {anonymous}::AMDGPUCFGStructurizer::removeRedundantConditionalBranch(llvm::MachineBasicBlock*)':
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp:1716:49: error: lvalue required as increment operand
make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDILCFGStructurizer.o] Error 1

This will require a lot of work and tricks. 
 


I have seen that you had to change llvm-gen-intrinsics.mk in order to comply with tblgen option: -gen-intrinsic


tblgen --help

...
    -gen-intrinsic       - Generate intrinsic information
    -gen-tgt-intrinsic   - Generate target intrinsic information




[patched llvm-gen-intrinsics.mk]
ifeq ($(LOCAL_IS_HOST_MODULE),true)
    $(call transform-host-td-to-out,intrinsic)
else
    $(call transform-device-td-to-out,intrinsic)
endif


Do I need to replace the second intrinsic with tgt-intrinsic  to properly call
transform-device-td-to-out for the device (target)?

In fact I had changed only llvm-tblgen-rules.mk because it was configured with this:

-       $(call transform-td-to-out,tgt_intrinsics)

this resulted param "gen-tgt_intrinsics" producing an error. I replaced with this:

+       $(call transform-td-to-out,tgt-intrinsic)

which results param "gen-tgt-intrinsic" matching what tblgen accepts. I'd say it is a typo...




Regards
pstglia

Mauro Rossi

unread,
May 2, 2015, 10:17:47 PM5/2/15
to andro...@googlegroups.com
Plus, by enabling the required llvm features needed by radeonsi (ExecutionEngine, JIT, R600) You'll probably face these errors on llvm compiling:

external/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp: In constructor '{anonymous}::StatSymbols::StatSymbols()':
external/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp:810:66: error: 'open64' was not declared in this scope
...

This one I could solve by using part of this patch: 

In the attachment the only two changes applicable.

 
target  C++: libLLVMR600CodeGen <= external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp: In member function 'int {anonymous}::AMDGPUCFGStructurizer::handleJumpintoIfImp(llvm::MachineBasicBlock*, llvm::MachineBasicBlock*, llvm::MachineBasicBlock*)':
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp:1236:57: error: lvalue required as increment operand
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp: In member function 'void {anonymous}::AMDGPUCFGStructurizer::removeRedundantConditionalBranch(llvm::MachineBasicBlock*)':
external/llvm/lib/Target/R600/AMDILCFGStructurizer.cpp:1716:49: error: lvalue required as increment operand
make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDILCFGStructurizer.o] Error 1

This will require a lot of work and tricks.

Not solved yet :-( 

I also encountered some errors due to missing LOCAL_C_INCLUDES, in InstPrinter/Android.mk,  MCTargetDesc/Android.mk and TargetInfo/Android.mk

 LOCAL_C_INCLUDES := \
  $(LOCAL_PATH)/.. \
  $(intermediates)/../libLLVMR600CodeGen_intermediates \
+ $(intermediates)/../libLLVMCore_intermediates


>-       $(call transform-td-to-out,tgt_intrinsics)
>
>this resulted param "gen-tgt_intrinsics" producing an error. I replaced with this:
>
>+       $(call transform-td-to-out,tgt-intrinsic)
>
>which results param "gen-tgt-intrinsic" matching what tblgen accepts. I'd say it is a typo...

I noticed when the generated file was not created, do the scripts llvm-gen-intrinsics.mk and llvm-gen-intrinsics.mk need to check LOCAL_MODULE_IS_HOST to select between intrinsic (for host librearies) and tgt-intrinsic (for target ones)?
Thanks

I also tested your lollipop ISO with mesa radeonsi 10.4.2 it works with AMD R7 250 and AMD HD7750.
I could not check OpenGL apps (besides the animated wallpapers) because I'm having problems in setting up an HDD installation with gapps 5.1. 

When I built ISO with mesa-10.6, I had problems at boot, do you have an ISO with with mesa radeonsi 10.6 gallium_dri ? Thanks

I'm trying to test OpenGL using AndroidStudio run/debug, like I did for kitkat-x86, by importing part of framework/native/opengl/tests (GLdual, testPauseResume, testViewport) and the infamous harism_effects

Mauro

Mauro Rossi

unread,
May 2, 2015, 10:19:50 PM5/2/15
to andro...@googlegroups.com
Here is micropatch that solved the 'open64' problem.

M.
0002-patches-for-android-toolchain.patch

Mauro Rossi

unread,
May 2, 2015, 10:29:30 PM5/2/15
to andro...@googlegroups.com
>It works with AMD R7 250 and AMD HD7750

Correction: tested with HD7750 (equal to R7 250) and HD7950

Mauro

pstglia

unread,
May 2, 2015, 11:41:40 PM5/2/15
to andro...@googlegroups.com
Good catch!
 

I noticed when the generated file was not created, do the scripts llvm-gen-intrinsics.mk and llvm-gen-intrinsics.mk need to check LOCAL_MODULE_IS_HOST to select between intrinsic (for host librearies) and tgt-intrinsic (for target ones)?
Thanks

All that I could figure out is that llvm-tblgen-rules.mk tries to find files under generated dir with mask "*GenIntrinsics.inc". If found, it uses llvm-tblgen to create some outputs. 
Honestly, I have no idea the rule used to determine if it's a host or a target.

I just changed it to fix this error I had during compiling:

make: Entering directory `/home/paulo/Downloads/android-x86-lollipop'
Host TableGen: libLLVMR600CodeGen (gen-tgt_intrinsics) <= external/llvm/lib/Target/R600/AMDGPU.td
llvm-tblgen: Unknown command line argument '-gen-tgt_intrinsics'.  Try: 'out/host/linux-x86/bin/llvm-tblgen -help'
llvm-tblgen: Did you mean '-gen-tgt-intrinsic'?
make: *** [out/target/product/x86/gen/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDGPUGenIntrinsics.inc] Error 1
make: Leaving directory `/home/paulo/Downloads/android-x86-lollipop'


 

I also tested your lollipop ISO with mesa radeonsi 10.4.2 it works with AMD R7 250 and AMD HD7750.
I could not check OpenGL apps (besides the animated wallpapers) because I'm having problems in setting up an HDD installation with gapps 5.1. 
Something related to the fs type? Some other threads mention the need for ext4...
 


When I built ISO with mesa-10.6, I had problems at boot, do you have an ISO with with mesa radeonsi 10.6 gallium_dri ? Thanks
My ISO with 10.6 gives me an unusable flickering image and these errors:

# This crashes RenderThread
05-02 14:14:17.683  2129  2129 D OpenGLRenderer: setting property extraRasterBucket to 0.95
05-02 14:14:17.683  2129  2129 D OpenGLRenderer:     failed
05-02 14:14:17.683  2129  2129 D OpenGLRenderer: setting property extraRasterBucket to 0.0
05-02 14:14:17.683  2129  2129 D OpenGLRenderer:     failed


# Also have lots of GL_INVALID_OPERATION
05-02 14:14:20.646  2587  2776 E OpenGLRenderer: GL error:  GL_INVALID_OPERATION

Don't know if these commits are related or if some include is missing on Android Makefiles...:

commit 627991dbf74ce5aee9ce75155fc27a429bdd0548
Author: Brian Paul <bri...@vmware.com>
Date:   Wed Mar 18 12:25:03 2015 -0600

    dri: add _glapi_set_nop_handler(), _glapi_new_nop_table() to dri_test.c

commit 4bdbb588a9d385509f9168e38bfdb76952ba469c
Author: Brian Paul <bri...@vmware.com>
Date:   Fri Mar 13 11:43:44 2015 -0600

    mesa: reimplement dispatch table no-op function handling

commit 201e36e77d6ca616f75f14d5f1c31f0062ae4366
Author: Brian Paul <bri...@vmware.com>
Date:   Fri Mar 13 10:20:29 2015 -0600

    mapi: add new _glapi_new_nop_table() and _glapi_set_nop_handler()



Mauro Rossi

unread,
May 3, 2015, 5:18:54 PM5/3/15
to andro...@googlegroups.com
Thanks for the infos


>>make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDILCFGStructurizer.o] Error 1
>>
>>This will require a lot of work and tricks.

>Not solved yet :-(

In order to solve this problem I defined the full list of sources and replicated the makefile behavior for building all .inc generated files for the three R600 sub targets (InstPrinter, MCTargetDesc and TargetInfo)

https://github.com/maurossi/llvm/commits/kitkat-x86_radeonsi_llvm34_WIP


Now I see a new, but old :-) problem, C++11 is required also to build llvm R600 targets, as pointed out here: https://trac.macports.org/ticket/41548
STLport will not help according to people discussing this problem.

target  C++: libLLVMR600CodeGen <= external/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp
external/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp: In member function 'virtual llvm::SDNode* {anonymous}::AMDGPUDAGToDAGISel::Select(llvm::SDNode*)':
external/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp:254:42: error: 'class std::vector<llvm::SDValue>' has no member named 'data'
...
external/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp:472:19: error: 'class std::vector<llvm::SDValue>' has no member named 'data'
build/core/binary.mk:432: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDGPUISelDAGToDAG.o' failed
make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libLLVMR600CodeGen_intermediates/AMDGPUISelDAGToDAG.o] Error 1
make: Leaving directory '/home/utente/kitkat-x86'


Is lollipop's  llvm3.5 using C++11 ?
Thanks

Mauro

pstglia

unread,
May 3, 2015, 6:27:48 PM5/3/15
to andro...@googlegroups.com
Good to know you are progressing on this.


Is lollipop's  llvm3.5 using C++11 ?

Yes it is.  It uses external/libcxx, which is part of llvm package

Also, if you check llvm lollipop Makefiles (llvm-host-build.mk and llvm-device-build.mk), they set "-std=c++11" flags

Regards,
Pstglia

pstglia

unread,
May 5, 2015, 10:56:15 AM5/5/15
to andro...@googlegroups.com
If anyone is interested, I've uploaded a new build (lollipop, kernel 4.0, mesa 10.5.4). Also there's a patch applied as an attempt to fix the video playback issue on Lollipop. radeonsi is also enabled.

# ISO link

# Patch file for mesa 10.5.4
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.5.4.patch

# Patch for libstagefright (conversion color format forced to HAL_PIXEL_FORMAT_RGB_565)
# apply on frameworks/av/media/libstagefright/colorconversion
0001-Use-HAL_PIXEL_FORMAT_RGB_565-as-default-conversion-f.patch

Did a very basic test on my machine (executed Antutu and some youtube videos on embedded browser). Worked ok

Regards,
Pstglia
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.5.4.patch
0001-Use-HAL_PIXEL_FORMAT_RGB_565-as-default-conversion-f.patch

rbg

unread,
May 5, 2015, 3:31:48 PM5/5/15
to andro...@googlegroups.com
is this also needed?????

device/generic/common/BoardConfig.mk

#BOARD_GPU_DRIVERS ?= i915 i965 ilo r300g r600g nouveau vmwgfx
- BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g
+ BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g radeonsi

pstglia

unread,
May 5, 2015, 4:01:08 PM5/5/15
to andro...@googlegroups.com
Hi Rbg,


device/generic/common/BoardConfig.mk

#BOARD_GPU_DRIVERS ?= i915 i965 ilo r300g r600g nouveau vmwgfx
- BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g
+ BOARD_GPU_DRIVERS ?= i915 i965 swrast r300g r600g radeonsi

To enable radeonsi yes, it's required.

Let me make a more detailed list what is necessary in order to enable it on a lollipop compiling:

# Mesa patches (external/mesa):

a) If you are going to build mesa 10.6, use this (posted April, 22th):
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.6.patch

b) If building with 10.5.4, use this (posted May, 5th):
0001-Enable-radeonsi-on-Android-x86-lollipop_mesa_10.5.4.patch

# LLVM patch (external/llvm)

Apply this patch (posted on May, 1st):
0001-Enable-R600-support-on-Android-x86-mesa-gallium-radeon_lollipop_20150501.patch

# drm gralloc (hardware/drm_gralloc)
Use this (posted April, 22th):
0001-Enable-radeonsi-on-Android-x86.patch

# BoardConfig.mk (device/generic/common)
Include radeonsi in BOARD_GPU_DRIVERS variable

* * *

Optionally (no relation with radeonsi), if you want a fix (hopefully - no warranties yet :D ) for video playback on Lollipop, apply this patch 
# Patch for libstagefright (conversion color format forced to HAL_PIXEL_FORMAT_RGB_565)
# apply on frameworks/av/media/libstagefright/colorconversion
0001-Use-HAL_PIXEL_FORMAT_RGB_565-as-default-conversion-f.patch

Pstglia

rbg

unread,
May 6, 2015, 12:40:01 AM5/6/15
to andro...@googlegroups.com
>Optionally (no relation with radeonsi), if you want a fix (hopefully - no warranties yet :D ) for video playback on Lollipop, apply this patch 
># Patch for libstagefright (conversion color format forced to HAL_PIXEL_FORMAT_RGB_565)
># apply on frameworks/av/media/libstagefright/colorconversion
>0001-Use-HAL_PIXEL_FORMAT_RGB_565-as-default-conversion-f.patch

confirmed on lollipop 5.1.1 / mesa 10.4.2, using browser
the only web site I had issues with playing videos was espn.....still only get black screen instead of video

Yahoo / MSN / CNN and other sites showed video fine...

Youtube.com showed video fine...

tested on: asus PBZ77-M motherboard, Integrated Intel Graphics HD 4000
                 asus P5G41-M motherboard, Intel G41 Express ICH7 chipset, Integrated Intel Graphics Media Accelerator(Intel® GMA X4500) 

before this patch was unable to get any video anywhere............

Mike R

unread,
May 6, 2015, 5:16:55 PM5/6/15
to andro...@googlegroups.com
So does that mean we have a working video Playback on 5.1/4.0 Intel??

Mike
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

pstglia

unread,
May 6, 2015, 5:44:54 PM5/6/15
to andro...@googlegroups.com
So does that mean we have a working video Playback on 5.1/4.0 Intel??
I'd say yes. But it's better to test more hw just to make sure. 

Mikerx86

unread,
May 6, 2015, 5:47:30 PM5/6/15
to andro...@googlegroups.com

Cool. OK. I'll do an install on GM45 chipset and report back.

Good work!

Mike

Sent with AquaMail for Android
http://www.aqua-mail.com

On May 6, 2015 4:44:58 PM pstglia <pst...@gmail.com> wrote:

So does that mean we have a working video Playback on 5.1/4.0 Intel??
I'd say yes. But it's better to test more hw just to make sure. 

--

pstglia

unread,
May 6, 2015, 5:50:30 PM5/6/15
to andro...@googlegroups.com

Cool. OK. I'll do an install on GM45 chipset and report back.

Good work!

Mike

Tks... Just to make sure. Rbg tested a good amount of intel plataforms already.

I've tested on my A10 5800K, working without problems I could notice.

Now let's try to conquer more issues :)
 

Mikerx86

unread,
May 6, 2015, 6:03:01 PM5/6/15
to andro...@googlegroups.com

Ya no doubt. Its coming together. RBG's builds work great. I have the latest 5.1/4.0 from RBG, and it has about replaced my old RC2 install,  Honestly the video playback is about the only issue , for me,  as I've said I don't stream much. And videos I do play VLC  works fine...

hashirt

unread,
May 6, 2015, 6:40:13 PM5/6/15
to andro...@googlegroups.com
Hi
I tested that iso (android-x86-5.1_kernel_4.0_mesa_10.5.4_radeonsi_test_20150505.iso) on two machines (pc and laptop).

Pc wouldn't pass through "android logo screen".
motherboard: biostar g31m
pentium 4
intel gma 3100
intel g33/g31 express chipset family 
attaching: pc-log.txt, pc-dmesg.txt

On laptop, system boot was successful (as far as i can tell). I tested some kernel 4.0 builds before, this build was the first one that boots. I checked some video sites like youtube, dailymotion and had no issue playing videos.
model: toshiba satellite a300
core 2 duo
ati mobility radeon hd 3470
attaching: laptop-log.txt, laptop-dmesg.txt

I used grub4dos for both cases.

I also have doubt that I am doing something wrong while acquiring dmesg and log files. Just wanted to confirm. Here is what I did for this case.
-Boot into debug mode
-After boot is successful or boot fails-> #alt+f2
#mkdir /mnt/zzz
#mount /dev/sdb1 /mnt/zzz
#dmesg > /mnt/zzz/dmesg.txt
after dmesg.txt is on usb
-boot puppylinux, mount the partition android-x86 is installed
-copy android-2015-05-05/data/log.txt to usb

Regards

5 Mayıs 2015 Salı 17:56:15 UTC+3 tarihinde pstglia yazdı:
pc-log.txt
pc-dmesg.txt
laptop-log.txt
laptop-dmesg.txt

pstglia

unread,
May 6, 2015, 7:06:31 PM5/6/15
to andro...@googlegroups.com
Hi hashirt


Pc wouldn't pass through "android logo screen".
motherboard: biostar g31m
pentium 4
intel gma 3100
intel g33/g31 express chipset family 
attaching: pc-log.txt, pc-dmesg.txt

Take a look at the logcat. A core process (Zygote) is on an endless loop, receiving a SIGILL signal.
This signal means there's a some instruction is invalid/not supported. As this is an old processor (Pentium 4) which lacks support for newer instructions used on this build (SSE 4.1 for mesa is one of them).
This is the most probably reason it's not working.
 

On laptop, system boot was successful (as far as i can tell). I tested some kernel 4.0 builds before, this build was the first one that boots. I checked some video sites like youtube, dailymotion and had no issue playing videos.
model: toshiba satellite a300
core 2 duo
ati mobility radeon hd 3470
attaching: laptop-log.txt, laptop-dmesg.txt

I used grub4dos for both cases.

Great. Thanks for sharing your results
 

I also have doubt that I am doing something wrong while acquiring dmesg and log files. Just wanted to confirm. Here is what I did for this case.
-Boot into debug mode
-After boot is successful or boot fails-> #alt+f2
#mkdir /mnt/zzz
#mount /dev/sdb1 /mnt/zzz
#dmesg > /mnt/zzz/dmesg.txt
after dmesg.txt is on usb
-boot puppylinux, mount the partition android-x86 is installed
-copy android-2015-05-05/data/log.txt to usb
 
It's ok. But you don't need to boot Linux in order to get log.txt. You can get it from Android itself, from /data directory
 

pstglia

unread,
May 6, 2015, 7:20:46 PM5/6/15
to andro...@googlegroups.com
Take a look at the logcat. A core process (Zygote) is on an endless loop, receiving a SIGILL signal.
This signal means there's a some instruction is invalid/not supported. As this is an old processor (Pentium 4) which lacks support for newer instructions used on this build (SSE 4.1 for mesa is one of them).
This is the most probably reason it's not working.

In fact, not really sure about SSE4.1 usage (although it's possible)... But SSSE3 is really used. Pentium 4 just supports SSE3. 

UCyborg

unread,
May 10, 2015, 2:40:31 AM5/10/15
to andro...@googlegroups.com
I've tried the ISO with Mesa 10.5.4 and it's still not working on AMD Radeon R2. Kernel messages say radeon driver initialized successfully but logcat spits out the following:

I/SurfaceFlinger( 2005): SurfaceFlinger is starting
I/SurfaceFlinger( 2005): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL ( 2005): loaded /system/lib/egl/libGLES_mesa.so
E/GRALLOC-RADEON( 2005): unknown device ID 0x9853
W/EGL-GALLIUM( 2005): failed to create DRM screen
W/EGL-GALLIUM( 2005): will fall back to other EGL drivers if any
E/GRALLOC-RADEON( 2005): unknown device ID 0x9853
W/EGL-DRI2( 2005): fail to get drm fd
I/EGL-GALLIUM( 2005): using SW screen
E/GRALLOC-RADEON( 2005): unknown device ID 0x9853
E/GRALLOC-RADEON( 2005): unknown device ID 0x9853
E/hwcomposer( 2005): framebuffer_open failed (Invalid argument)
W/hwcomposer( 2005): getting VSYNC period from thin air: 16666666
D/hwcomposer( 2005): Intel hwcomposer module
E/SurfaceFlinger( 2005): ERROR: failed to open framebuffer (Invalid argument), aborting

pstglia

unread,
May 10, 2015, 1:27:54 PM5/10/15
to andro...@googlegroups.com
Thank you for your feedback.

This message (from drm gralloc) is telling your gpu chip id (0x9853 - Mullins) was not found in the supported list (see hardware/drm_gralloc/radeon/radeon.h and hardware/drm_gralloc/radeon/radeon_chipinfo_gen.h)

I've added this (and others - HAWAII and KAVERY) to drm gralloc. Patch attached:
# To be applied under hardware/drm_gralloc
0001-Include-newer-missing-chipset-families.patch

When possible, could you test again with this new ISO?

Thanks,
Pstglia


0001-Include-newer-missing-chipset-families.patch

Chih-Wei Huang

unread,
May 10, 2015, 9:48:21 PM5/10/15
to Android-x86
2015-05-11 1:27 GMT+08:00 pstglia <pst...@gmail.com>:
>
> I've added this (and others - HAWAII and KAVERY) to drm gralloc. Patch
> attached:
> # To be applied under hardware/drm_gralloc
> 0001-Include-newer-missing-chipset-families.patch

Thank you for the patches.
I've applied it.

However, I'm considering whether if we should
maintain our own pci_id table in drm_gralloc.
Actually only radeon ids are maintained
in drm_gralloc. All the others (intel, nouveau, ...)
use id from mesa/drm directly.
Probably the radeon should be changed to
the similar way as well so we won't suffer
such a problem in the future.

UCyborg

unread,
May 10, 2015, 11:15:40 PM5/10/15
to andro...@googlegroups.com
It boots now and the interface is smooth, but video playback is problematic. On YouTube in default browser, there is just black screen. Trying to play a local file either in VLC or MXPlayer makes the RenderThread in libhwui.so segfault. Video plays for few seconds before it happens, screen temporarily freezes, Android logo shows up for few seconds and then I'm back at the home screen.

Dne nedelja, 10. maj 2015 19.27.54 UTC+2 je oseba pstglia napisala:
logcat_lollipop_video.txt

Luigi Capriotti

unread,
May 11, 2015, 3:52:40 AM5/11/15
to andro...@googlegroups.com
I have been testing this new build on a desktop computer connected via LAN.
Upon starting, no IP is leased to the computer and I have to manually start dhcpcd to receive IP configuration (switching to console with alt+F1).

Once IP and DNS settings are received, I can ping and traceroute, but DNS resolution is not working. nslookup fails as well, even if I specify a proper DNS server:

$nslookup www.google.it 8.8.8.8
Server:       0.0.0.0
Address 1:    0.0.0.0
nslookup: can't resolve 'www.google.it'

This is exactly what is described here, but being this issue not reported by other testers I wonder if it's really the same problem.

Luigi Capriotti

unread,
May 11, 2015, 11:01:43 AM5/11/15
to andro...@googlegroups.com
I tried android-x86-4.4-RC2 on same configuration and I have the same issue, it's not this specific build.
Opening a new thread to seek for advices.

pstglia

unread,
May 11, 2015, 11:47:48 AM5/11/15
to andro...@googlegroups.com
Hi Chih-Wei,

However, I'm considering whether if we should
maintain our own pci_id table in drm_gralloc.
Actually only radeon ids are maintained
in drm_gralloc. All the others (intel, nouveau, ...)
use id from mesa/drm directly.
Probably the radeon should be changed to
the similar way as well so we won't suffer
such a problem in the future.

 Yes it would avoid this update process every release. The only thing is how to deal with flags associated for each chipset (in special mobility and igp):

typedef struct {
    uint32_t pci_device_id;
    RADEONChipFamily chip_family;
    int mobility;
    int igp;
    int nocrtc2;
    int nointtvout;
    int singledac;
} RADEONCardInfo;

they are populated inside gralloc_drm_radeon.c, but apparently not directly used. 
xf86-video-ati appears just to declare these flags also


Mauro Rossi

unread,
May 11, 2015, 7:56:46 PM5/11/15
to andro...@googlegroups.com
Hi,
good news about radeonsi tests with mesa 10.5.4
 
# Patch file for mesa 10.5.4
....
Did a very basic test on my machine (executed Antutu and some youtube videos on embedded browser). Worked ok

Regards,
Pstglia

I've tested lollipop with mesa 10.5.4 on HD7750 and HD7950, the result are equivalent for the two videocards.

Working perfectly OK:

OpenGLES animated wallpapers
Graphics with OpenGL ES (by Thorsten Thormaehlen)
GLdual
testViewport
testPauseResume
testViewport
android_effects

Little flaws (not much impact for usability):

"green leaves" default wallpaper:  gives a black wallpaper
OpenGL ES 1.0 Demo: 1st cube is rendered, following cube and demos are not visible, showing a black surface
gl_perfapp: causes GUI restart (log attached)
android_sharize: it's running slow because of cyclically repeating 0x501 errors (log attached)


Mesa 10.5.4 radeonsi shows stability with most OpenGL tests/demos, it was hard to find apps causing problems.

Mauro

PS: with mesa 10.6devel I get no GUI too, but I need to setup a stable test environment to check, I'm still not able to properly reboot lollipop with EXT4.
Since I am not able to install grub2 properly, I'm doing a "one-session only" reformat EXT4 + install and selecting "Run Android" just after installation.

mesa_10_5_4_radeonsi_report.txt

pstglia

unread,
May 11, 2015, 10:12:21 PM5/11/15
to andro...@googlegroups.com
Working perfectly OK:

OpenGLES animated wallpapers
Graphics with OpenGL ES (by Thorsten Thormaehlen)
GLdual
testViewport
testPauseResume
testViewport
android_effects

Great. Have you tested some other x86 supported apps like Angry birds series or Antutu?

android_sharize: it's running slow because of cyclically repeating 0x501 errors (log attached)
Do you have this error on other cards? 

 Thanks for your reports! Hope we have better luck with radeonsi than nouveau :D

pstglia

unread,
May 12, 2015, 1:35:26 PM5/12/15
to andro...@googlegroups.com
Hi UCyborg


It boots now and the interface is smooth, but video playback is problematic. On YouTube in default browser, there is just black screen. Trying to play a local file either in VLC or MXPlayer makes the RenderThread in libhwui.so segfault. Video plays for few seconds before it happens, screen temporarily freezes, Android logo shows up for few seconds and then I'm back at the home screen.

I noticed from your logcat is the lack of GRALLOC-KMS outputs and Gallium strings (renderer, version, etc). If possible, can you boot under debug mode and collect logcat output again please? 

Can you get the output from these cmds also?

getprop | grep "debug.mesa.software"
getprop | grep "ro.hardware.gralloc"
cat /proc/fb


How does this APU performs on a Linux distro? Everything works as expected (OpenGL accel, video playback, etc)? If not ok, I'd say it's due some features are still for this arch are under develoment on Mesa (same for KAVERI and KANIBI). Here's one of them:

# src/gallium/drivers/radeonsi/si_state.c (function si_init_config)
                case CHIP_KAVERI:
                        /* XXX todo */
                case CHIP_KABINI:
                        /* XXX todo */
                case CHIP_MULLINS:
                        /* XXX todo */


Regards,
Pstglia

Jarvis Chung

unread,
May 13, 2015, 7:49:49 AM5/13/15
to andro...@googlegroups.com
Hi Pstglia,

I build a kernel 4.0 + mesa 10.5.4 to test asus R7 240 and rund Antutu , I got error as below(Angry Birds Rio is ok):
4651        ActivityManager  I  START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.antutu.ABenchMark/.ABenchMarkStart} from uid 10014 on display 0
  4651             AudioTrack  W  AUDIO_OUTPUT_FLAG_FAST denied by client
  4420     AudioPolicyManager  E  getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
  4420     AudioPolicyManager  E  getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
  4420     AudioPolicyManager  E  getDeviceForStrategy() no device found for STRATEGY_TRANSMITTED_THROUGH_SPEAKER
  4651          WindowManager  V  addAppToken: AppWindowToken{16c1022f token=Token{2995a80e ActivityRecord{3be5ce09 u0 com.antutu.ABenchMark/.ABenchMarkStart t8}}} to stack=1 task=8 at 0
  4651          WindowManager  V  Adding window Window{6d45428 u0 Starting com.antutu.ABenchMark} at 2 of 7 (after Window{20ab45be u0 com.cyanogenmod.trebuchet/com.android.launcher3.Launcher})
  4420   audio_hw_primary_x86  D  found out /dev/snd/pcmC0D3p
  4651        ActivityManager  I  Start proc 5520:com.antutu.ABenchMark/u0a52 for activity com.antutu.ABenchMark/.ABenchMarkStart
  5520         ActivityThread  I  Switching default density from 160 to 240
  5520               Settings  W  Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
  5520         OpenGLRenderer  D  Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  5520         GRALLOC-RADEON  I  detected chipset 0x6613 family 0x38 (vram size 1948MiB, gart size 1019MiB)
  5520            GRALLOC-DRM  I  create radeon for driver radeon
  5520                  Atlas  D  Validating map...
  4651          WindowManager  V  Adding window Window{214b79 u0 com.antutu.ABenchMark/com.antutu.ABenchMark.ABenchMarkStart} at 2 of 8 (before Window{6d45428 u0 Starting com.antutu.ABenchMark})
  4420     AudioPolicyManager  E  getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
  4420     AudioPolicyManager  E  getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION
  4420     AudioPolicyManager  E  getDeviceForStrategy() no device found for STRATEGY_TRANSMITTED_THROUGH_SPEAKER
  5520            EGL-GALLIUM  I  using DRM screen
  5520            EGL-GALLIUM  I  skip unsupported native format 0x3
  5520         OpenGLRenderer  I  Initialized EGL, version 1.4
  5520         OpenGLRenderer  D  Enabling debug mode 0
  4651          WindowManager  V  Adding window Window{c10606c u0 SurfaceView} at 2 of 9 (before Window{214b79 u0 com.antutu.ABenchMark/com.antutu.ABenchMark.ABenchMarkStart})
  5520               Settings  W  Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
  4651        ActivityManager  I  Start proc 5597:com.android.defcontainer/u0a3 for service com.android.defcontainer/.DefaultContainerService
  4651        ActivityManager  I  Displayed com.antutu.ABenchMark/.ABenchMarkStart: +404ms
  5597         ActivityThread  I  Switching default density from 160 to 240
  4651         OpenGLRenderer  D  Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  4651                  Atlas  D  Validating map...
  4651            EGL-GALLIUM  I  using DRM screen
  4651            EGL-GALLIUM  I  skip unsupported native format 0x3
  4651         OpenGLRenderer  I  Initialized EGL, version 1.4
  4651         OpenGLRenderer  D  Enabling debug mode 0
  4651            EGL-GALLIUM  E  failed to import buffer 0xa0c7ad08
  4651         OpenGLRenderer  W  Error creating image (0x3000)
  4651         OpenGLRenderer  W  Could not create atlas image
  4651                   libc  F  Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 5616 (RenderThread)
  1393                  DEBUG  I  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  1393                  DEBUG  I  Build fingerprint: 'Android-x86/android_x86/x86:5.1.1/LMY47V/jarvis05111517:eng/test-keys'
  1393                  DEBUG  I  Revision: '0'
  1393                  DEBUG  I  ABI: 'x86'
  1393                  DEBUG  I  pid: 4651, tid: 5616, name: RenderThread  >>> system_server <<<
  1393                  DEBUG  I  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
  1393                  DEBUG  I  eax 00000000  ebx b6fd653c  ecx ae35803c  edx 00000000
  1393                  DEBUG  I  esi ae18bac8  edi ae38e748
  1393                  DEBUG  I  xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000018f  xss 0000007b
  1393                  DEBUG  I  eip b6f3c08c  ebp 9c8ffac8  esp 9c8ffa60  flags 00210246
  1393                  DEBUG  I  backtrace:
  1393                  DEBUG  I  #00 pc 0001f08c  /system/lib/libhwui.so (android::uirenderer::AssetAtlas::init(android::sp<android::GraphicBuffer>, long long*, int)+220)
  1393                  DEBUG  I  #01 pc 00092e1f  /system/lib/libhwui.so
  1393                  DEBUG  I  #02 pc 0008cfe2  /system/lib/libhwui.so
  1393                  DEBUG  I  #03 pc 00093dd3  /system/lib/libhwui.so
  1393                  DEBUG  I  #04 pc 00093ba0  /system/lib/libhwui.so
  1393                  DEBUG  I  #05 pc 00095594  /system/lib/libhwui.so
  1393                  DEBUG  I  #06 pc 00096e62  /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+162)
  1393                  DEBUG  I  #07 pc 00017de4  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+308)
  1393                  DEBUG  I  #08 pc 00070775  /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+117)
  1393                  DEBUG  I  #09 pc 000173f2  /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+130)
  1393                  DEBUG  I  #10 pc 00022168  /system/lib/libc.so (__pthread_start(void*)+56)
  1393                  DEBUG  I  #11 pc 0001cc69  /system/lib/libc.so (__start_thread+25)
  1393                  DEBUG  I  #12 pc 000137c6  /system/lib/libc.so (__bionic_clone+70)
  1393           libbacktrace  W  virtual bool Backtrace::VerifyReadWordArgs(uintptr_t, word_t*): invalid pointer 0xb750e82d
  1393           libbacktrace  W  virtual bool Backtrace::VerifyReadWordArgs(uintptr_t, word_t*): invalid pointer 0xb69b7873
  1393                  DEBUG  I  Tombstone written to: /data/tombstones/tombstone_02
  1387         ServiceManager  I  service 'wifiscanner' died
  4893            WifiManager  E  Channel connection lost
  4743            WifiManager  E  Channel connection lost
  4420           AudioFlinger  W  power manager service died !!!
  1387         ServiceManager  I  service 'clipboard' died
  1387         ServiceManager  I  service 'statusbar' died
But, I success to run on AMD HD6670, include Antutu and 3D game.

Thanks.

pstglia於 2015年5月12日星期二 UTC+8上午10時12分21秒寫道:

pstglia

unread,
May 13, 2015, 9:17:03 AM5/13/15
to andro...@googlegroups.com
Hi Jarvis, thanks for testing:

  4651         OpenGLRenderer  D  Use EGL_SWAP_BEHAVIOR_PRESERVED: true
  4651                  Atlas  D  Validating map...
  4651            EGL-GALLIUM  I  using DRM screen
  4651            EGL-GALLIUM  I  skip unsupported native format 0x3
  4651         OpenGLRenderer  I  Initialized EGL, version 1.4
  4651         OpenGLRenderer  D  Enabling debug mode 0
  4651            EGL-GALLIUM  E  failed to import buffer 0xa0c7ad08
  4651         OpenGLRenderer  W  Error creating image (0x3000)
  4651         OpenGLRenderer  W  Could not create atlas image
  4651                   libc  F  Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 5616 (RenderThread)

This error appears to be the same UCyborg reported. The first error message "failed to import buffer" is returned on external/mesa/src/gallium/state_trackers/egl/android/native_android.cpp when there is no handle resource:

static struct pipe_resource *
import_buffer(struct android_display *adpy, const struct pipe_resource *templ,
              ANativeWindowBuffer *abuf)
{
...
   if (!res)
      ALOGE("failed to import buffer %p", abuf);

   return res;


This "res" structure is populated by resource_from_handle. Handle type can be "DRM_API_HANDLE_TYPE_SHARED" or "abuf->handle" depending on "adpy->use_drm" value

I'd like to have more info on this (check if drm is being used or not for wach hw). If possible, can you overwrite native_android.cpp by the one attached here, create a new img and run again on both hardwares? 
It contains some extra ALOGE print messages that should confirm this.

Thanks!

native_android.cpp

Jarvis Chung

unread,
May 14, 2015, 12:02:08 AM5/14/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your help.

I tested my device again and attached log files.
Asus R7 240 + debug patch
    dmesg_pc_debug_kernel_4_mesa_10.5.4_20150514.log
    logcat_pc_debug_kernel_4_mesa_10.5.4_20150514

Asus R7 240
    dmesg_pc_kernel_4_mesa_10.5.4_20150514.log
    logcat_pc_kernel_4_mesa_10.5.4_20150514.log

HD6670 + debug patch
    dmesg_pc_hd6670_debug_kernel_4_mesa_10.5.4_20150514.log
    logcat_pc_hd6670_debug_kernel_4_mesa_10.5.4_20150514.log

The log had other debug log, ex: PCM, please skip it.

Thanks.
Jarvis


pstglia於 2015年5月13日星期三 UTC+8下午9時17分03秒寫道:
logcat_pc_hd6670_debug_kernel_4_mesa_10.5.4_20150514.log
dmesg_pc_hd6670_debug_kernel_4_mesa_10.5.4_20150514.log
logcat_pc_debug_kernel_4_mesa_10.5.4_20150514.log
dmesg_pc_debug_kernel_4_mesa_10.5.4_20150514.log
logcat_pc_kernel_4_mesa_10.5.4_20150514.log
dmesg_pc_kernel_4_mesa_10.5.4_20150514.log

Mauro Rossi

unread,
May 14, 2015, 3:18:01 AM5/14/15
to andro...@googlegroups.com
>  4651            EGL-GALLIUM  E  failed to import buffer 0xa0c7ad08
>  4651         OpenGLRenderer  W  Error creating image (0x3000)

Hi, could it be similar to this past problem, related to dri image formats ?  


Mauro

UCyborg

unread,
May 14, 2015, 6:56:29 AM5/14/15
to andro...@googlegroups.com
Hi everyone,

I see you're already on the right track solving this. I've been using Ubuntu 15.04 for some time on my laptop when it was still in development. 3D acceleration and hardware video decoding worked. The biggest problem when it came to graphics was that radeon driver would occasionally lock up and bring down the entire X Server and when it recovered, graphics lagged badly so a reboot was required. There was a also a glitch in Firefox, when using VAAPI for video decoding, replaying a video on YouTube would result in that video playing slowly and the picture was corrupted. Refresh of the site fixed it. Playing video in VLC using VDPAU worked as expected though.

As for Android, 3D definitely works now, without accelerated 3D graphics, OS is entirely useless, mouse takes seconds to move around. Gallium strings are missing in my logcat because I cleared it before attempting video playback. I also tried playing GL TRON game from F-Droid and it works.

pstglia

unread,
May 14, 2015, 10:36:49 AM5/14/15
to andro...@googlegroups.com
Hi Jarvis,
 
Thanks for your help.

Thank you and Mauro too for helping with debugging. I'll have to bother you a little more :)
 
drm attributes are set. Now I'd like to know why KMS is not being initialized for these cards.

Can you confirm if /proc/fb has "radeondrmfb"?

Also, can you replace these 2 files (gralloc.c and gralloc_drm_kms.c) under hardware/drm_gralloc and create a new ISO? 
It will print some info about drm_init and kms.

Another question: When do you get dmesg output? After GUI is showed or before? It seems to be incomplete.

Regards,
pstglia

gralloc_drm_kms.c
gralloc.c

pstglia

unread,
May 14, 2015, 10:50:33 AM5/14/15
to andro...@googlegroups.com
Hi Mauro,
I'm not sure.... seems to be a different issue (lack of color format in that case ) which resulted the same 0x3000 error. What do you suggest for debugging?

What I found strange is KMS was not initialized for these cards Jarvis and UCyborg tested. For your cards (which are quite similar to Blumi Milch one) kms seems to be initialized (we have GRALLOC-KMS messages and Gallium strings on  logcat)

Maybe some unimplemented feature at kernel or libdrm side. Still debugging to try to discover what's missing.

These cards lack info on Web also (Linux) which makes things a bit difficult (remember: I'm just a Google searcher :D )

regards,
Pstglia

UCyborg

unread,
May 14, 2015, 11:16:54 AM5/14/15
to andro...@googlegroups.com
I can confirm /proc/fb has "radeondrmfb". Strange thing in my case is that logcat prints out renderer, version and extension strings, but in Settings under About, it says "null" for each of those strings. Also, how do you execute commands when booting in Debug mode? It doesn't respond to anything I type in terminal.

And one more unrelated question. Is booting in UEFI mode supported? None of the boot entries work for me, nothing happens so I have to switch to Legacy BIOS mode to be able to play with it. Only the entry for Windows 8 works and boots it.

pstglia

unread,
May 14, 2015, 12:11:33 PM5/14/15
to andro...@googlegroups.com


Em quinta-feira, 14 de maio de 2015 12:16:54 UTC-3, UCyborg escreveu:
I can confirm /proc/fb has "radeondrmfb".
Good. Thanks for this info

 
Strange thing in my case is that logcat prints out renderer, version and extension strings, but in Settings under About, it says "null" for each of those strings.
It's a known issue on Lollipop. Maybe an EGL context must be initalized prior to getting info

 
Also, how do you execute commands when booting in Debug mode? It doesn't respond to anything I type in terminal.

When on debugging mode, after typing "exit" twice (when requested)  and entering GUI, you can switch back console with alt+F1 and use the cmds.
Do you mean it's freezed?

Another option is using a terminal emulator. Should work on Lollipop
 

And one more unrelated question. Is booting in UEFI mode supported? None of the boot entries work for me, nothing happens so I have to switch to Legacy BIOS mode to be able to play with it. Only the entry for Windows 8 works and boots it.
You can create images file both for tradicional booting method (bios/legacy) or UEFI. 

These imgs I made available were create with "make iso_img", so just legacy. Compiling with "make efi_img" would create an efi (non-signed)



 
Message has been deleted

UCyborg

unread,
May 14, 2015, 2:20:19 PM5/14/15
to andro...@googlegroups.com
When on debugging mode, after typing "exit" twice (when requested)  and entering GUI, you can switch back console with alt+F1 and use the cmds.

Do you mean it's freezed?

Another option is using a terminal emulator. Should work on Lollipop
 The problem was that I got into wrong terminal by pressing alt + left arrow. Pressing this combo once in normal mode accomplishes the same as alt + F1. All okay now, logcat works, but eg. "poweroff" and "reboot" just return without doing anything.


You can create images file both for tradicional booting method (bios/legacy) or UEFI.

These imgs I made available were create with "make iso_img", so just legacy. Compiling with "make efi_img" would create an efi (non-signed)
Oh okay, thanks for this info, guess I'll just setup Ubuntu to be able to make my own image, preferably with Google Apps. I noticed someone made a script for that. Never compiled whole Android from source though, so that should be fun.

pstglia

unread,
May 14, 2015, 5:53:28 PM5/14/15
to andro...@googlegroups.com
 The problem was that I got into wrong terminal by pressing alt + left arrow. Pressing this combo once in normal mode accomplishes the same as alt + F1. All okay now, logcat works, but eg. "poweroff" and "reboot" just return without doing anything.

Some commands require you add "busybox" in front of it (busybox reboot, for instance) 

Jarvis Chung

unread,
May 14, 2015, 10:03:28 PM5/14/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your help.

Sorry, I forgot to check my dmesg log.
I quickly to test and share my log as attach files.

*Antutu test:
    HD6670 is pass.
    R7 240 is failed.

*com.aim.racingmgt(3D game) test:
    HD6670 is pass.
    R7 240 is pass.

The both card are use "radeondrmfb".
# cat /proc/fb
0 radeondrmfb


Thanks.
Jarvis

pstglia於 2015年5月14日星期四 UTC+8下午10時36分49秒寫道:
logcat_pc_r7_240_20150515.log
dmesg_pc_r7_240_20150515.log
logcat_pc_hd6670_20150515.log
dmesg_pc_hd6670_20150515.log

Mauro Rossi

unread,
May 14, 2015, 10:20:20 PM5/14/15
to andro...@googlegroups.com
> I'm not sure.... seems to be a different issue (lack of color format in that case ) which resulted the same 0x3000 error. What do you suggest for debugging?

It's just a feeling, I would investigate the parameters (e.g. memtype) set at dma-buf handle creation and check if they are supported.

Regarding debug logs (1 and 2 are well known):

1) enable drm tracing

drm.debug=7     as grub line, traces will be in dmesg log


2) enable EGL tracing in logcat (after GUI started ALT+F1)

setprop debug.egl.trace error


3) apitrace, probably the best if it works, to capture and replay the whole EGL sequence

NOTE: part of the build procedure may be changed since the last time I built and tested apitrace/qapitrace.

Build apitrace x86 on Ubuntu
--------------------------------------


cd apitrace

export ANDROID_NDK=/home/utente/Downloads/android-ndk-r10d NOTE: your path to NDK

cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/android.toolchain.cmake -DANDROID_ABI=x86 -DANDROID_TOOLCHAIN_NAME=x86-4.9 \
 -DANDROID_API_LEVEL=9 -H. -Bbuild

make -C build


Upload the built egltrace.so library to Lollipop x86 device under test
-----------------------------------------------------------------------------------------

adb root
adb connect [your IP]
adb push libs/x86/egltrace.so data/
adb shell chmod 0777 /data/egltrace.so

Tracing with apitrace egltrace.so
-------------------------------------------

[example procedure for Settings - working]

adb root
PROCNAME=com.android.settings
adb shell setprop wrap.$PROCNAME LD_PRELOAD=/data/egltrace.so
adb shell setprop debug.apitrace.procname $PROCNAME
adb shell am start -S com.android.settings/.Settings

[procedure for Antutu - to be tried]

adb root
PROCNAME=com.antutu.ABenchMark
adb shell setprop wrap.$PROCNAME LD_PRELOAD=/data/egltrace.so
adb shell setprop debug.apitrace.procname $PROCNAME
adb shell am start -S com.antutu.ABenchMark/.ABenchMarkStart

Traces should be in folder data/data/com.antutu.ABenchMark/ and qapitrace application can be used to examine the trace.

I would try myself, but as we speak I'm not able to reboot EXT4 installation.
How do you manage? Are you all using GRUB2 EFI boot?

Further instructions in the following links.

Mauro

[how-to for building egltrace.so library with Android NDK]

https://github.com/apitrace/apitrace/blob/master/INSTALL.markdown



[how-to for tracing android apps]

https://github.com/apitrace/apitrace/blob/master/Dalvik.markdown


[how-to install latest version on Ubuntu to use qapitrace GUI and avoid tracefiles version compatibility problems]

sudo add-apt-repository ppa:gerboland/unity-mir
sudo apt-get update
sudo apt-get install apitrace-gl-frontend



pstglia

unread,
May 14, 2015, 11:16:21 PM5/14/15
to andro...@googlegroups.com
Jarvis / Mauro,

*Antutu test:
    HD6670 is pass.
    R7 240 is failed.

*com.aim.racingmgt(3D game) test:
    HD6670 is pass.
    R7 240 is pass.


My debugs didn't return much help. But dmesg did. I bet this is the responsible for this mess:

<3>[   45.322662] radeon 0000:01:00.0: bo edb6fc00 va 0x0000000857 conflict with (bo eb44a400 0x0000000868 0x0000000869)

This conflict seems to corrupt/crash graphic environment

By the end of April, Christian König submited some patches addressing issues I believe are related to this. Check the link bellow:


We could apply these patches on our kernel and see if this solves our problem. What do you think? If this not solves the problem we can use the tips Mauro suggested for further investigation (drm.debug set to level 7, using apitrace, etc)

Regards,
Pstglia

Jarvis Chung

unread,
May 15, 2015, 10:55:32 AM5/15/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your suggestion.

I try to patch and fixed conflict issue, but I got the same error for Antutu.

Maybe we could to try patch new kernel for drm:

Thanks.
Jarvis

pstglia於 2015年5月15日星期五 UTC+8上午11時16分21秒寫道:

pstglia

unread,
May 15, 2015, 11:50:51 AM5/15/15
to andro...@googlegroups.com
 
I try to patch and fixed conflict issue, but I got the same error for Antutu.
Have you applied his 4 patches?
 

Maybe we could to try patch new kernel for drm:

It's already commited on upstream (at least Christian König patches). We can test it of course. You'll have to apply "02d57d91aa55bc6e47f29c0622f2f77de0d86b3d" commit "HACK: drm: disable GPU authentication" and use current config 
make -C kernel O=$OUT/obj/kernel ARCH=x86 oldconfig should be enough for it).
Another option would be merge/rebase our kernel and upstream

Apart of this, try to collect some info with procedures Mauro suggested

Regards,
Pstglia
 

pstglia

unread,
May 15, 2015, 3:35:15 PM5/15/15
to andro...@googlegroups.com
It's already commited on upstream (at least Christian König patches). We can test it of course. You'll have to apply "02d57d91aa55bc6e47f29c0622f2f77de0d86b3d" commit "HACK: drm: disable GPU authentication" and use current config 
make -C kernel O=$OUT/obj/kernel ARCH=x86 oldconfig should be enough for it).
Another option would be merge/rebase our kernel and upstream

I've made a git rebase with Android-x86 4.0 kernel and 4.0.3 upstream. In case you want it:

Mauro Rossi

unread,
May 15, 2015, 6:24:07 PM5/15/15
to andro...@googlegroups.com
Build apitrace x86 on Ubuntu
-----------------------------------------

Fow those who wants to skip this part I have uploaded egltrace.so prebuilt here: https://drive.google.com/file/d/0B_OFHiIqgpSFUzVjcUF0NmdMX0U/view?usp=sharing


I could use some help with installing GRUB2 bios version to be able to reboot lollipop-x86.

I have tried procedure described here: http://andex.exton.net/?p=165
 and here:  http://www.android-x86.net/index.php?topic=255.0

I see the new boot entry but I can boot Lollipop.
I'm using a PATA hard drive on ICH7 controller, do I need to load a module at the beginning of grub 40_custom script?
Thanks

I'm having hard times, because I need to reinstall each time I need to collect logs.
Mauro

 

pstglia

unread,
May 16, 2015, 7:51:43 AM5/16/15
to andro...@googlegroups.com
I could use some help with installing GRUB2 bios version to be able to reboot lollipop-x86.

I have tried procedure described here: http://andex.exton.net/?p=165
 and here:  http://www.android-x86.net/index.php?topic=255.0

I see the new boot entry but I can boot Lollipop.
I'm using a PATA hard drive on ICH7 controller, do I need to load a module at the beginning of grub 40_custom script?
Thanks

I'm having hard times, because I need to reinstall each time I need to collect logs.
Mauro

Don't know if this helps. Here's my config entry for booting Lollipop (I keep it on /boot/grub/custom.cfg):

menuentry "Android-x86 5.1" {
   insmod ext2
   set root='(hd0,8)'
   linux /android-2015-05-14/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-2015-05-14
   initrd /android-2015-05-14/initrd.img
}

My disk is SATA and Lollipop is installed in the 8th partition (extended). I formatted it to ext4 inside Linux before installing Android:

   Device Boot      Start         End      Blocks   Id  System                                                                                                                                                                                                                 
/dev/sda1            XXXX     XXXXXXX     XXXXXXX   82  Linux swap
/dev/sda2   *        XXXX     XXXXXXX     XXXXXXX  83  Linux
...
/dev/sda5            XXXX     XXXXXXX     XXXXXXX   83  Linux
...
/dev/sda8            XXXX     XXXXXXX     XXXXXXX   83  Linux


The date "2015-05-14" corresponds to the date my img was created as you can see bellow (this is the content of my root directory):

drwxr-xr-x 4 root root  4096 May 14 17:34 android-2015-05-14

So, everytime I create a new ISO (so a new date on directory name), I have to replace on custom.cfg and run "grub-install /dev/sda"

Note: Using Slackware distro, if that mathers. 

Mauro Rossi

unread,
May 16, 2015, 10:59:12 AM5/16/15
to andro...@googlegroups.com
Thanks for your suggestions

I finally managed to understand the problem, grub has a command line with essential tools.

ls [enter]       command shows the list of hard drives

then I saw that /dev/sda1 unexpectedly became (hd1,1), while I was trying to load kernel from (hd0,1).

I was able to list the folders and  files with:

ls (hd1,1)/ [enter]

ls (hd1,1)/android-2015-MM-DD [enter]        MM and DD to be replaced with actual month and day seen  with previous command.

Now I could boot and I'm back in business with the debug / troubleshooting !!!

Mauro

Chih-Wei Huang

unread,
May 16, 2015, 12:58:51 PM5/16/15
to Android-x86
2015-05-01 10:58 GMT+08:00 pstglia <pst...@gmail.com>:
>
>> I think the patch has to be refined a little.
>> I'll take it.
>
> Thanks for this. Still trying to improve it (making better patches)

Sorry for reply late.
I've pushed the refined patch to the server.
Thank you!


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

pstglia

unread,
May 16, 2015, 2:04:42 PM5/16/15
to andro...@googlegroups.com
> Thanks for this. Still trying to improve it (making better patches)

Sorry for reply late.
I've pushed the refined patch to the server.
Thank you!

Thanks Chih-Wei! I saw the changes. Much better that way, like enabling llvm just when radeonsi is set.

Mauro Rossi

unread,
May 16, 2015, 6:56:57 PM5/16/15
to andro...@googlegroups.com
Hi,

in order to trigger the build of LLVM when radeonsi is declared in BoardConfig.mk,
if I'm not wrong, one line should be changed in external/mesa/Android.mk, because $(gallium_drivers) variable contains radeonsi by definition.

-MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(gallium_drivers)),true,false)
+MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(MESA_GPU_DRIVERS)),true,false)


M.

Luigi Capriotti

unread,
May 17, 2015, 4:05:18 AM5/17/15
to andro...@googlegroups.com
What I do as I find very convenient is to have a linux install of any sort on an ext4, then either install Android-x86 to the root partition without formatting and with no grub. 
BTW I can also copy Android-x86 files directly from the ISO/IMG as well.

With this arrangement I can have several Android-x86 builds on the same partition and switch among them simply with a symbolic link (ln -s Android-20150516 Android).

Ofc a grub custom entry needs to be added once in linux, but once done grub stays untouched and allows to boot linux - ie the Android "recovery" ;) - or any Andoid system previously linked.

Chih-Wei Huang

unread,
May 17, 2015, 12:19:45 PM5/17/15
to Android-x86
2015-05-17 6:56 GMT+08:00 Mauro Rossi <issor...@gmail.com>:
> Hi,
>
> in order to trigger the build of LLVM when radeonsi is declared in
> BoardConfig.mk,
> if I'm not wrong, one line should be changed in external/mesa/Android.mk,
> because $(gallium_drivers) variable contains radeonsi by definition.
>
> -MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(gallium_drivers)),true,false)
> +MESA_ENABLE_LLVM := $(if $(filter radeonsi,$(MESA_GPU_DRIVERS)),true,false)

You're right.
I'll correct it.
Thank you!

Jarvis Chung

unread,
May 17, 2015, 11:57:43 PM5/17/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your help.

I try to rebuild this kernel, I also got the same issue.

About this issue, maybe we need to use Mauro suggestion to collecet more log.


pstglia於 2015年5月16日星期六 UTC+8上午3時35分15秒寫道:

rbg

unread,
May 18, 2015, 5:19:50 PM5/18/15
to andro...@googlegroups.com

Mikerx86

unread,
May 18, 2015, 5:22:14 PM5/18/15
to andro...@googlegroups.com

Good to see your around 8-)

Sent with AquaMail for Android
http://www.aqua-mail.com

Никита Донецкий

unread,
May 18, 2015, 9:20:32 PM5/18/15
to andro...@googlegroups.com
Thank you! Work on Radeon R9 280.
But buggy. Not change language input for example)
Without GApps)

Chih-Wei Huang

unread,
May 18, 2015, 9:27:11 PM5/18/15
to Android-x86
2015-05-19 5:19 GMT+08:00 rbg <rbg.hp...@gmail.com>:
>
> http://git.android-x86.org/?p=platform/build.git;a=commit;h=c7c75c48ed2f6331332570cdecb32f8e62f0fe45
>
> also needs to be pushed to lollipop...

Yes, thank you for the reminding.

pstglia

unread,
May 19, 2015, 2:40:28 PM5/19/15
to andro...@googlegroups.com
Hi Jarvis / Mauro / Everyone interested,


About this issue, maybe we need to use Mauro suggestion to collecet more log.

I could do a little debug session on an Acer Aspire V5 (AMD E1 2100 - Kanibi APU).

Based on my tests, I suppose the problem is really related to this message:

<3>[  244.849191] radeon 0000:00:01.0: bo ccf78800 va 0x0000000858 conflict with (bo cec3a000 0x0000000869 0x000000086a)

"ALOGE" debug msgs showed the error occurs at external/mesa/src/gallium/drivers/radeon/r600_texture.c, function r600_texture_from_handle (which is called by "screen->resource_from_handle" on external/mesa/src/gallium/state_trackers/egl/android/native_android.cpp). Calling "buf = rscreen->ws->buffer_from_handle" is returning NULL (probably a consequence of kernel message above):

05-19 18:21:45.486  1943  3452 I MESA-DEBUG: Inside r600_texture_from_handle
05-19 18:21:45.486  1943  3452 I MESA-DEBUG:  templ->target = 2 ; templ->depth0 = 1 ; templ->last_level = 0
05-19 18:21:45.486  1943  3452 E MESA-DEBUG:  rscreen->ws->buffer_from_handle returned NULL
05-19 18:21:45.486  1943  3452 E EGL-GALLIUM: failed to import buffer 0xa0c56f88

I tried to apply all latest available radeon kernel patches:
drm/radeon: fix lockup when BOs aren't part of the VM on release 
drm/radeon: reset BOs address after clearing it. 
drm/radeon: check new address before removing old one 
drm/radeon: fix userptr return value checking (v2)

but no luck with them

Attached dmesg (kernel params: DEBUG=2; drm.debug=7 ; log_buf_len=262144) and logcat with my debugs. Could not test with egltrace Mauro proposed (had to return the machine to the owner :D)

Regards,
Pstglia
logcat_e1_2100_20150519_1522.txt
dmesg_e1_2100_20150519_1522.txt

pstglia

unread,
May 20, 2015, 10:31:01 AM5/20/15
to andro...@googlegroups.com
I filled this bug on Bugzilla (Mesa/drm) in order to get more help:

rbg

unread,
May 20, 2015, 11:25:51 AM5/20/15
to andro...@googlegroups.com
Hi Pstglia....

have you tried this also on 64bit kernel, 32bit user ......

curious as that's what most of my builds have been and I do remember providing a build you checked
and had issues with....then we concluded that the stuff was only working with 32bit kernel, 32bit user.....

It would be interesting to know as Lollipop seems to be heading in the 64bit kernel direction....

pstglia

unread,
May 20, 2015, 9:56:24 PM5/20/15
to andro...@googlegroups.com
Hi Rbg
 
have you tried this also on 64bit kernel, 32bit user ......
Not yet. Just 32/32. I'll try it as soon as possible

It would be interesting to know as Lollipop seems to be heading in the 64bit kernel direction....
I'll try first on my hardware (which is working ok with 32 bits kernel)

pstglia

pstglia

unread,
May 21, 2015, 4:22:42 PM5/21/15
to andro...@googlegroups.com
Hi everybody


I filled this bug on Bugzilla (Mesa/drm) in order to get more help:


Michel Dänzer (Mesa developer) answered the bug I filled on freedesktop and proposed a patch. I tested with this and it worked for the hw I tested (AMD E1 2100 - KANIBI)

Anyone with radeon GCN hardwares (Rx GPU families, Radeon 78xx/79xx GPU series, AMD Radeon E1, R2, and others) can test the iso bellow with Antutu and/or any other apps that were producing messages like these ones (note: uppercase letters are addresses, so the change every time)

dmesg: radeon 0000:00:01.0: bo XXXXX va YYYYYY conflict with (bo ZZZZZZZ SSSSSSS DDDDDDDD)
logcat: EGL-GALLIUM: failed to import buffer 0xAAAAAAA

# ISO Link

Note: As pointed by MIchel, this patch requires kernel 4.0.3. I have a rebased one (our kernel X mainline 4.0.3) on github:

Regards,
pstglia

André Vitor

unread,
May 22, 2015, 1:06:00 AM5/22/15
to andro...@googlegroups.com
Hey pstglia,

Tested out here with my Radeon HD 7750 and everything works ok. 0 Errors.

pstglia

unread,
May 22, 2015, 8:06:38 AM5/22/15
to andro...@googlegroups.com
Hi André,

Hey pstglia,

Tested out here with my Radeon HD 7750 and everything works ok. 0 Errors.

Thanks for the feedback. Could you run a complete Antutu test?  If possible, can you confirm if you had the same bug others were having with this previous ISO from 2015-05-10?

Thanks!

André Vitor

unread,
May 22, 2015, 8:14:09 AM5/22/15
to andro...@googlegroups.com
Yes, I had the same problems before, I couldn't run Antutu. Now I can run a complete test.

pstglia

unread,
May 22, 2015, 10:57:09 PM5/22/15
to andro...@googlegroups.com
 
Yes, I had the same problems before, I couldn't run Antutu. Now I can run a complete test.
Thanks again André.

Anyone with different GCN/radeonsi cards could give a try on this testing ISO please? We need to confirm with the proposed patch (bug 90537) is working ok.

Thanks,
Pstglia 

Jarvis Chung

unread,
May 22, 2015, 11:45:33 PM5/22/15
to andro...@googlegroups.com
Hi Pstglia,

I success to run Antutu.
Thanks your help.

Jarvis

pstglia於 2015年5月23日星期六 UTC+8上午10時57分09秒寫道:

Jarvis Chung

unread,
May 22, 2015, 11:48:21 PM5/22/15
to andro...@googlegroups.com
Test graphic card: ASUS Radeon R7 240.


Jarvis Chung於 2015年5月23日星期六 UTC+8上午11時45分33秒寫道:

Mauro Rossi

unread,
May 24, 2015, 5:13:12 AM5/24/15
to andro...@googlegroups.com
Hi,

reporting test results on HD7950.

I could launch Antutu this time but I could not complete the 3D rendering session.
 RADEON_VA_UNMAP patch is producing a regression in the stability of the GUI.

Strange thing that the green leaves default wallpaper is not showing up.

There are still cases where bo conflict appears in dmesg and I noticed crashes that produces a deadlock, the GUI restarts sometimes OK, but at some point it stays perpetually on the android logo.
In between I've seen very strange things happen, simple OpenGL apps working fine but producing restarts when pressing home button or closing them

At some point I see what we saw in nouveau lockup scenarios, but the system is not completely stucked and it was possible to collect logs.

On the other hand comparing mesa 10.5.4 and mesa 10.6rc1 (both patched with RADEON_VA_UNMAP and with kernel 4.0.3) I see the same behavior on HD7950,
Attaching also full logs for 10.5.4 and 10.6rc1 test sessions.

M.


logs_10_5_4_HD7950_24-may-2015.zip
logs_10_5_4_HD7950_full_debug.zip
logs_10_6rc1_HD7950_full_debug.zip

pstglia

unread,
May 24, 2015, 12:20:30 PM5/24/15
to andro...@googlegroups.com
Hi,

reporting test results on HD7950.
Thanks for the report Mauro. I've updated bug 90537. 

So far we have 3 working devices with this patch (no reported bugs so far):
- E1 2100 (KANIBI)
- Radeon HD 7750 (BONAIRE)
- R7 240 (OALAND)

And problems with the one you tested:
 - Radeon HD 7950 (TAHITI)

Hello UCyborg / Blumi Milch,
  Can you test the latest iso I provided (2015-05-21 post) with your AMD Radeon R2 / Radeon HD 7850 if possible? Check Antutu and other stuff (some OpenGL Games, Video playback, etc)

Thank you very much!
Pstglia

Jarvis Chung

unread,
May 25, 2015, 3:17:29 AM5/25/15
to andro...@googlegroups.com
Hi Pstglia,

I try to rebuild a new ISO use kernel 4.0.3, but I couldn't run Antutu(the same issue).
The following is my build info:
   Android-x86 5.x + mesa 10.5.4(apply radeonsi patch) + kernel 4.0.3 

Your ISO file is pass to run Antutu. Could you provide your build info to me?

Thanks.
Jarvis

Joan R. Serra

unread,
May 25, 2015, 12:06:14 PM5/25/15
to andro...@googlegroups.com
I run live image on my Athlon 5350 with Radeon R3. On about tablet-> OpenGL: Null,null,null

Thanks for your work !!!

pstglia

unread,
May 25, 2015, 12:35:12 PM5/25/15
to andro...@googlegroups.com
Hi Jarvis,


I try to rebuild a new ISO use kernel 4.0.3, but I couldn't run Antutu(the same issue).
The following is my build info:
   Android-x86 5.x + mesa 10.5.4(apply radeonsi patch) + kernel 4.0.3 

Your ISO file is pass to run Antutu. Could you provide your build info to me?

You have to apply the patch provided with bug 90537:

cd external/mesa
patch -p1 < PATH_TO_PATCH_FILE

Regards,
Pstglia

pstglia

unread,
May 25, 2015, 1:36:33 PM5/25/15
to andro...@googlegroups.com
I run live image on my Athlon 5350 with Radeon R3. On about tablet-> OpenGL: Null,null,null
Thanks for testing it. Could you run Antutu complete test, watch video, etc?

Currently, OpenGL info is not being shown. However, you can get this info from logcat 
 

André Vitor

unread,
May 25, 2015, 2:58:28 PM5/25/15
to andro...@googlegroups.com
Hi pstglia,

I just tried this ISO again and now I'm getting this after android's logo:

radeon 0000:01:00.0: bo e0b8a000 va 0x0000000857 conflict with (bo e094a000 0x0000000868 0x0000000869)

Sometimes the green background appears, other times do not.
Nothing more appears after this.

Tested on Radeon HD 7750.

dmesg and logcat attached.
dmesg.txt
logcat.txt

André Vitor

unread,
May 25, 2015, 3:09:39 PM5/25/15
to andro...@googlegroups.com
Uhh, that's weird. Now it works.

dmesg and logcat with drm.debug=7 attached.
dmesg_drm7.txt
logcat_drm7.txt

André Vitor

unread,
May 25, 2015, 3:39:14 PM5/25/15
to andro...@googlegroups.com
It's booting now but I also can't finish antutu test anymore. It crashes in the end of 3D test. I also noticed some hangs during the 3D test, it drop frames to ~21 from 60 sometimes.

dmesg file drm.debug=7  


I got it using "cat /proc/kmsg" right after android's logo until antutu 3D test end. So it's a very very very long log.

Jarvis Chung

unread,
May 25, 2015, 11:36:44 PM5/25/15
to andro...@googlegroups.com
Hi Pstglia,

Thanks for your help, I could run Antutu for my build.

About Antutu testing, I try to run full testing and shown success screen, then services will died.
I also test your ISO and got the same issue.

The attached files is my dump log.

Thanks.
Jarvis 

pstglia於 2015年5月26日星期二 UTC+8上午12時35分12秒寫道:
dmesg_r7_240_20150526.txt
logcat_r7_240_20150526.txt

Joan R. Serra

unread,
May 26, 2015, 8:40:51 AM5/26/15
to andro...@googlegroups.com
Sorry but I try to install to harddisk and after I don't see system and data folders on partition !?

pstglia

unread,
May 29, 2015, 1:32:50 PM5/29/15
to andro...@googlegroups.com

It's booting now but I also can't finish antutu test anymore. It crashes in the end of 3D test. I also noticed some hangs during the 3D test, it drop frames to ~21 from 60 sometimes.

dmesg file drm.debug=7  


I got it using "cat /proc/kmsg" right after android's logo until antutu 3D test end. So it's a very very very long log.

According to radeon devs, these conflicts are a known issue related to the kernel part. They still don't have a definitive solution for this (see https://bugs.freedesktop.org/show_bug.cgi?id=90537)

Mauro and me are trying to provide info on this bug in order to help them solving this issue.

Let's keep testing new kernel releases when they mentioned some fix about lockup

Regards,
pstglia



It is loading more messages.
0 new messages