This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need a tutorial: install latest Mali kernel space drivers, please..

Hello.

I need to learn how to install Mali drivers. Both kernel space and user space. I'm using the Odroid XU4 with Mali T628.

Currently, I'm trying to understand how to install kernel space drivers.

As an advanced linux user I know how to build and install a custom linux kernel.

But from the downloaded kernel space drivers' sources I cannot understand how to use them.

The kernel space drivers' directory tree is this:

macbook@terminalx:~/Downloads/TX011-SW-99002-r7p0-02rel0 $ tree -d

.

└── driver

    └── product

        └── kernel

            ├── Documentation

            │   └── devicetree

            │       └── bindings

            │           └── arm

            ├── drivers

            │   ├── base

            │   │   ├── dma_buf_lock

            │   │   │   └── src

            │   │   ├── dma_buf_test_exporter

            │   │   ├── kds

            │   │   └── ump

            │   │       ├── docs

            │   │       └── src

            │   │           ├── arch-arm

            │   │           ├── arch-arm64

            │   │           ├── common

            │   │           ├── imports

            │   │           │   └── ion

            │   │           └── linux

            │   └── gpu

            │       ├── arm

            │       │   └── midgard

            │       │       ├── backend

            │       │       │   └── gpu

            │       │       ├── docs

            │       │       ├── platform

            │       │       │   ├── devicetree

            │       │       │   ├── juno_soc

            │       │       │   ├── vexpress

            │       │       │   ├── vexpress_1xv7_a57

            │       │       │   └── vexpress_6xvirtex7_10mhz

            │       │       └── platform_dummy

            │       └── drm

            │           └── pl111

            ├── include

            │   └── linux

            └── patches

So what should I do next? Of corse I'm going to build everything either on linux with cross compilations or on the dev board.

Please, any advice is appreciated.

Thank you.

Parents
  • Hi grigoryptashko,

    The kernel sources we provide is a stock generic version of the driver, and requires integration into the kernel/SoC of choice. This integration requires platform files that have the hooks into things such as DVFS etc, which we do not control as it is specific to the silicon vendor.

    This integration and subsequent platform files are created by the Silicon manufacturer, for your example of the XU4, that would be Samsung. We do not have access to these files ourselves, so you need to obtain them from Samsung themselves.

    Generally speaking, if you are simply looking to upgrade a driver from an existing integrated driver, this is a lot easier, as most of the time you can reuse the platform integration files from the older driver in your chosen kernel.

    For example, Hardkernel provide the kernel source code for a lot of their platforms, and most have Mali kernel side integrated and operational and thus contain the necessary platform files.

    To upgrade in this case, you would need to replace the existing Mali kernel side source code with the sources from our website, and add back the platform specific files that existed for the previous version of the driver.

    Obviously things change between releases however, and the bigger the jump, the more changes there will be. So do not expect this to just work. It is highly likely some patching would then be required to this new version.

    To reiterate, this process of integrating a driver is done by the manufacturer of the SoC, so if you undertake this yourself, you may find it difficult to achieve this if you do not know much about the underlying SoC itself and what optimisations, customisations, and power/performance tweaks the manufacturer has done. So please bare in mind that even if you are successful in upgrading, the power/performance may not be what you may expect.

    Please also note that if you do not have the right corresponding userspace binary, then this process is somewhat pointless. The userspace binary is proprietary and so you cannot expect to build it yourself, you need to obtain it.

    We already work closely with companies such as Hard Kernel to try bring the latest drivers up sooner than someone like Samsung may chose to, but in the end, its their choice not ours.

    For a very select few devices, we do do this ourselves. You can see the full list here: ARM Mali Midgard GPU User Space Drivers - Mali Developer Center

    I hope this was a good enough explanation for what you were after, I apologise I cannot just give you a guide on how to do this, as it is not that simple.

    Kind Regards,

    Michael McGeagh

Reply
  • Hi grigoryptashko,

    The kernel sources we provide is a stock generic version of the driver, and requires integration into the kernel/SoC of choice. This integration requires platform files that have the hooks into things such as DVFS etc, which we do not control as it is specific to the silicon vendor.

    This integration and subsequent platform files are created by the Silicon manufacturer, for your example of the XU4, that would be Samsung. We do not have access to these files ourselves, so you need to obtain them from Samsung themselves.

    Generally speaking, if you are simply looking to upgrade a driver from an existing integrated driver, this is a lot easier, as most of the time you can reuse the platform integration files from the older driver in your chosen kernel.

    For example, Hardkernel provide the kernel source code for a lot of their platforms, and most have Mali kernel side integrated and operational and thus contain the necessary platform files.

    To upgrade in this case, you would need to replace the existing Mali kernel side source code with the sources from our website, and add back the platform specific files that existed for the previous version of the driver.

    Obviously things change between releases however, and the bigger the jump, the more changes there will be. So do not expect this to just work. It is highly likely some patching would then be required to this new version.

    To reiterate, this process of integrating a driver is done by the manufacturer of the SoC, so if you undertake this yourself, you may find it difficult to achieve this if you do not know much about the underlying SoC itself and what optimisations, customisations, and power/performance tweaks the manufacturer has done. So please bare in mind that even if you are successful in upgrading, the power/performance may not be what you may expect.

    Please also note that if you do not have the right corresponding userspace binary, then this process is somewhat pointless. The userspace binary is proprietary and so you cannot expect to build it yourself, you need to obtain it.

    We already work closely with companies such as Hard Kernel to try bring the latest drivers up sooner than someone like Samsung may chose to, but in the end, its their choice not ours.

    For a very select few devices, we do do this ourselves. You can see the full list here: ARM Mali Midgard GPU User Space Drivers - Mali Developer Center

    I hope this was a good enough explanation for what you were after, I apologise I cannot just give you a guide on how to do this, as it is not that simple.

    Kind Regards,

    Michael McGeagh

Children