Hi,
I had an issue with the OpenCL Driver on my Chomebook.
I followed ARM's instruction and successfully boot into Linux. However, I got an error message said that libxcb-dri2.so missing. After install libxcb-dri2.0-dev, I can compile Mali OpenCL SDK sample codes. But they won't be executed correctly under X11 or via fbdev. I past error message below. Any suggestion? Thanks.
> ./hello_world_opencl OpenCL error: CL_OUT_OF_HOST_MEMORY Creating an OpenCL context failed. common.cpp:248 Failed to create an OpenCL context. hello_world_opencl.cpp:39 > ldd hello_world_opencl libOpenCL.so => /opt/mali/fbdev/libOpenCL.so (0x76efc000) libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76e4a000) libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76e39000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d55000) /lib/ld-linux-armhf.so.3 (0x76f07000) libmali.so => /opt/mali/fbdev/libmali.so (0x76304000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x762e9000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x7627e000) librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76270000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76265000)
> ./hello_world_opencl
OpenCL error: CL_OUT_OF_HOST_MEMORY
Creating an OpenCL context failed. common.cpp:248
Failed to create an OpenCL context. hello_world_opencl.cpp:39
> ldd hello_world_opencl
libOpenCL.so => /opt/mali/fbdev/libOpenCL.so (0x76efc000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76e4a000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76e39000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d55000)
/lib/ld-linux-armhf.so.3 (0x76f07000)
libmali.so => /opt/mali/fbdev/libmali.so (0x76304000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x762e9000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x7627e000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76270000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76265000)
Even I am facing the same issue. I have build the same version of kernel specified in the guide. Mali drivers on chromebook | kr blogs shows a detail logs of clinfo devcie query failures. Scott mentioned that user-space driver can't communicate with kernel space one in this case
Hi krrishnarraj,
I just built the opencl.c he links to with "arm-linux-gnueabihf-gcc clInfo.c -I../../include -L../../lib -lOpenCL -o clinfo" and it runs fine for me, no out of memory errors. I notice that in the output in that blog, the PLUGIN output (see below) is not present, which seems to imply there's something dodgy about the way he's got his libraries set up.
Here's my output:
Found 1 platform(s).
platform[0x76ec1c30]: profile: FULL_PROFILE
platform[0x76ec1c30]: version: OpenCL 1.1
platform[0x76ec1c30]: name: ARM Platform
platform[0x76ec1c30]: vendor: ARM
platform[0x76ec1c30]: extensions: cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_arm_core_id cl_khr_egl_event cl_khr_egl_image
platform[0x76ec1c30]: Found 1 device(s).
[PLUGIN INFO] Plugin initializing
[PLUGIN DEBUG] './override.instr_config' not found, trying to open the process config file
[PLUGIN DEBUG] './clinfo.instr_config' not found, trying to open the default config file
[PLUGIN INFO] No configuration file found, attempting to use environment
[PLUGIN INFO] CINSTR GENERAL: Output directory set to: .
[PLUGIN INFO] No instrumentation features requested.
device[0x76eaf218]: NAME: Mali-T604
device[0x76eaf218]: VENDOR: ARM
device[0x76eaf218]: PROFILE: FULL_PROFILE
device[0x76eaf218]: VERSION: OpenCL 1.1
device[0x76eaf218]: EXTENSIONS: cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_arm_core_id cl_khr_egl_event cl_khr_egl_image
device[0x76eaf218]: DRIVER_VERSION: 1.1
device[0x76eaf218]: Type: GPU
device[0x76eaf218]: EXECUTION_CAPABILITIES: Kernel
device[0x76eaf218]: GLOBAL_MEM_CACHE_TYPE: Read-Write (2)
device[0x76eaf218]: CL_DEVICE_LOCAL_MEM_TYPE: Global (2)
device[0x76eaf218]: SINGLE_FP_CONFIG: 0x3f
device[0x76eaf218]: QUEUE_PROPERTIES: 0x3
device[0x76eaf218]: VENDOR_ID: 1767243777
device[0x76eaf218]: MAX_COMPUTE_UNITS: 4
device[0x76eaf218]: MAX_WORK_ITEM_DIMENSIONS: 3
device[0x76eaf218]: MAX_WORK_GROUP_SIZE: 256
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_CHAR: 16
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_SHORT: 8
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_INT: 4
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_LONG: 2
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_FLOAT: 4
device[0x76eaf218]: PREFERRED_VECTOR_WIDTH_DOUBLE: 0
device[0x76eaf218]: MAX_CLOCK_FREQUENCY: 533
device[0x76eaf218]: ADDRESS_BITS: 64
device[0x76eaf218]: MAX_MEM_ALLOC_SIZE: 525569024
device[0x76eaf218]: IMAGE_SUPPORT: 1
device[0x76eaf218]: MAX_READ_IMAGE_ARGS: 128
device[0x76eaf218]: MAX_WRITE_IMAGE_ARGS: 8
device[0x76eaf218]: IMAGE2D_MAX_WIDTH: 65536
device[0x76eaf218]: IMAGE2D_MAX_HEIGHT: 65536
device[0x76eaf218]: IMAGE3D_MAX_WIDTH: 65536
device[0x76eaf218]: IMAGE3D_MAX_HEIGHT: 65536
device[0x76eaf218]: IMAGE3D_MAX_DEPTH: 65536
device[0x76eaf218]: MAX_SAMPLERS: 16
device[0x76eaf218]: MAX_PARAMETER_SIZE: 1024
device[0x76eaf218]: MEM_BASE_ADDR_ALIGN: 1024
device[0x76eaf218]: MIN_DATA_TYPE_ALIGN_SIZE: 128
device[0x76eaf218]: GLOBAL_MEM_CACHELINE_SIZE: 64
device[0x76eaf218]: GLOBAL_MEM_CACHE_SIZE: 131072
device[0x76eaf218]: GLOBAL_MEM_SIZE: 2102276096
device[0x76eaf218]: MAX_CONSTANT_BUFFER_SIZE: 65536
device[0x76eaf218]: MAX_CONSTANT_ARGS: 8
device[0x76eaf218]: LOCAL_MEM_SIZE: 32768
device[0x76eaf218]: ERROR_CORRECTION_SUPPORT: 0
device[0x76eaf218]: PROFILING_TIMER_RESOLUTION: 1000
device[0x76eaf218]: ENDIAN_LITTLE: 1
device[0x76eaf218]: AVAILABLE: 1
device[0x76eaf218]: COMPILER_AVAILABLE: 1
BTW that was my blog! I had put libraries in ~/mali/fbdev as suggested. Moving it to /usr/lib/ doesn't make any difference. Even egl drivers are not working. I believe problem here is with my kernel. I had compiled 3.8.11 as suggested with the right patches. Can you please elaborate what kernel you tested it with and how you built it. Or just if its possible, could you upload your kernel (kernel.itb) and its modules here
Thanks
I think without a license agreement in place we're not allowed to upload any binaries, or we would have provided an SD card image! I used the following things:
Linux r3p0-02rel0 kernel space driver from http://malideveloper.arm.com/downloads/drivers/TX011/r3p0-02rel0/TX011-SW-99002-r3p0-02rel0.tgz
Userspace binaries from here http://malideveloper.arm.com/downloads/drivers/binary/r3p0-02rel0/linux-fbdev-hf-r3p0-02rel0.tgz (fbdev in this case, there is no reason the two shouldn't live harmoniously together but we're troubleshooting now so i suggest just using the one set to begin with).
I cloned http://git.chromium.org/chromiumos/third_party/kernel-next.git and checked out 98d6fa96d08dbb08a2150dcd48a6b2a8773172e0
I applied the patches manually (in future we will hopefully provide actual patches, but for some reason could not this time) and replaced the mali driver with the one you download.
Ran ./chromeos/scripts/prepareconfig chromeos-exynos5 and then sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/mnt
etc. The guide you're following is what I followed to get it working, I honestly can't think of a good reason why it should not work for you on the Mali chromebook, I can only suggest giving it another try in case you jumped a step or something! It happened to me once or twice as there are bits that are quite wordy and easy to skip if you're just jumping from command to command.
View all questions in Graphics and Gaming forum