OpenCL support for Mali-T628 MP6 on Arndale Octa?

Summary

Is OpenCL support for the Mali-T628 (for example as found in the Exynos 5420 SoC on the Arndale Octa board) available? If so, how to set it up?

More details

According to the vendor, OpenCL should be supported, but the Arndale Octa Wiki does not state how this can be achieved.

I am using the latest Linaro developer build and installed Mali drivers that contain OpenCL libraries for Mali T604. According to this guide, the driver actually contains references to the Mali T628. So I tried to create the udev rule as specified, which is supposed to solve a permission problem with /dev/mali0, but I found that there is no /dev/mali0 on my installation at all. So my conclusion is that the driver indeed does not support T628.

When I execute a clinfo utility, clGetDeviceInfo returns CL_OUT_OF_HOST_MEMORY for some device properties. Why can I query the GPU for some characteristics, but does this fail for some others? When running a normal application, the same error appears when trying to create an OpenCL Context.

I was surprised to find this topic, where yoshi seems to have OpenCL working and can run benchmarks on his Arndale Octa board. How is this possible if there is no driver available? Or am I just missing something? I hope that you can help me to also establish a working OpenCL development environment.

Parents
  • Hi Veeranna,

    No unfortunately not. I tried to run this image to get it up and running but the board wouldn't boot.

    I am now running a linaro image using kernel 3.15.0-1-linaro-arndale-octa. But so far I haven't been able to build a mali kernel driver module myself either: Update: see end of post

    root@arndale-octa:~/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard# make -C /lib/modules/`uname -r`/build M=$PWD modules

    make: Entering directory `/usr/src/linux-headers-3.15.0-1-linaro-arndale-octa'

      Building modules, stage 2.

      MODPOST 0 modules

    make: Leaving directory `/usr/src/linux-headers-3.15.0-1-linaro-arndale-octa'

    No ko file is being generated.

    The driver includes some scons files, but they do not work for me. First of all, a Sconstruct file is not included. When adding one myself and running scons, the environment is not recognized:

    root@arndale-octa:~/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm# scons

    scons: Reading SConscript files ...

    scons: *** Import of non-existent variable ''env''

    File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard/sconscript", line 20, in <module>

    So I figured, let's fix this by replacing Import('env') by env = Environment(ENV = os.environ) but the dictionary class that scons uses does not handle non-existent keys the way the sconscript expects it:

    scons: Reading SConscript files ...

    KeyError: 'v':

      File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/Sconstruct", line 1:

        SConscript('midgard/sconscript')

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 609:

        return method(*args, **kw)

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:

        return _SConscript(self.fs, *files, **subst_kw)

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:

        exec _file_ in call_stack[-1].globals

      File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard/sconscript", line 28:

        if env['v'] != '1':

      File "/usr/lib/scons/SCons/Environment.py", line 412:

        return self._dict[key]

    Any help on compiling this kernel module is highly appreciated!

    Update:

    I managed to compile the kernel module. It turns out that you don't need the scons files at all and can just use the included Kbuild and Makefile. Compiling mali_kbase.ko is a matter of running:

    CONFIG_MALI_MIDGARD=m make

    But inserting this module into the kernel does not provide a /dev/mali, neither does lshw detects a GPU. This means that we still cannot run OpenCL on the T628. How can we make the /dev/mali device show up?

Reply
  • Hi Veeranna,

    No unfortunately not. I tried to run this image to get it up and running but the board wouldn't boot.

    I am now running a linaro image using kernel 3.15.0-1-linaro-arndale-octa. But so far I haven't been able to build a mali kernel driver module myself either: Update: see end of post

    root@arndale-octa:~/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard# make -C /lib/modules/`uname -r`/build M=$PWD modules

    make: Entering directory `/usr/src/linux-headers-3.15.0-1-linaro-arndale-octa'

      Building modules, stage 2.

      MODPOST 0 modules

    make: Leaving directory `/usr/src/linux-headers-3.15.0-1-linaro-arndale-octa'

    No ko file is being generated.

    The driver includes some scons files, but they do not work for me. First of all, a Sconstruct file is not included. When adding one myself and running scons, the environment is not recognized:

    root@arndale-octa:~/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm# scons

    scons: Reading SConscript files ...

    scons: *** Import of non-existent variable ''env''

    File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard/sconscript", line 20, in <module>

    So I figured, let's fix this by replacing Import('env') by env = Environment(ENV = os.environ) but the dictionary class that scons uses does not handle non-existent keys the way the sconscript expects it:

    scons: Reading SConscript files ...

    KeyError: 'v':

      File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/Sconstruct", line 1:

        SConscript('midgard/sconscript')

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 609:

        return method(*args, **kw)

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:

        return _SConscript(self.fs, *files, **subst_kw)

      File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:

        exec _file_ in call_stack[-1].globals

      File "/root/TX011-SW-99002-r4p1-00rel0/driver/product/kernel/drivers/gpu/arm/midgard/sconscript", line 28:

        if env['v'] != '1':

      File "/usr/lib/scons/SCons/Environment.py", line 412:

        return self._dict[key]

    Any help on compiling this kernel module is highly appreciated!

    Update:

    I managed to compile the kernel module. It turns out that you don't need the scons files at all and can just use the included Kbuild and Makefile. Compiling mali_kbase.ko is a matter of running:

    CONFIG_MALI_MIDGARD=m make

    But inserting this module into the kernel does not provide a /dev/mali, neither does lshw detects a GPU. This means that we still cannot run OpenCL on the T628. How can we make the /dev/mali device show up?

Children