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
│ │ ├── 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.
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
So for the Mali-T76x for Firefly, the latest GPU User Space Driver available is: ‘r5p0-06rel0’ (fbdev), one who have to use Kernel Device Driver ‘r5p0-06rel0’ [15 December 2014] for compatibility.
1. The latest Kernel Device Driver is ‘r7p0-02rel0’ [21 August 2015] would be incompatible, is that correct?
From Mali GPU Device Driver Model , I see the Device Driver which is listed in kernel space which refers to the Kernel GPU Device Driver and the Libraries in User Space which refer to the GPU User Space Drivers.
2. Where does ‘Open Source Mali GPUs UMP User Space Drivers Source Code’ and ‘Open Source Mali GPUs Linux EXA/DRI2 and X11 Display Drivers’ fit into the diagram?
Hi e97,
The latest GPU User Space Driver available for the Firefly from us is currently r5p0-06rel0. The latest from us will always be found here: ARM Mali Midgard GPU User Space Drivers - Mali Developer Center.
Firefly themselves, or RockChip directly, may provide a newer version. You would need to check with them directly.
Our driver is only guaranteed to work with a matching API version between the Kernel side and User Space side of the driver. Simply put, we only guarantee it to work with the same driver version for both components.
Note that this is the only guarantee we can give. You may have mixed success trying a different combination yourself.
Regarding UMP, this is a memory component that you can chose to use. Please note that this is now becoming deprecated in favour of DMA_BUF. Our drivers found on the link above are using DMA_BUF instead of UMP for example, however we cannot say what the drivers direct from firefly for example will use.
Regarding EXA/DRI2, this is required if you wish to have X11 working. Currently the binary for the firefly that we provide is fbdev only so does not use this. If/when we release an X11 binary for firefly, it will use this.
I hope this clarifies things for you. If you have any further questions, feel free to ask.
What is the current driver revision that is available for partners? I can see ES Emulator was updated with AEP features since version 2.2 and I can also see that Samsung tends to take a long time with updates, at least when it comes to a minor firmware releases.
Since my post about "Mali r5p0 driver is trying
to report its version to
EGL_VERSION" there were two minor updates on S6/Edge and they didn't include an updated driver which is reasonable when you have to push a number of devices in a short time
Hi zxcvbad,
The latest release version of our Midgard driver to our partners (at time of writing) is r7p0-02rel0.
The latest release version of our Utgard driver to our partners (at time of writing) is r5p2-00rel0.
Generally speaking, you can tell what our latest drivers are because we upload the GPL kernel sources when we release it to our partners. This can be found here:
Open Source Mali Midgard GPU Kernel Drivers - Mali Developer Center
Open Source Mali Utgard GPU Linux Kernel Drivers - Mali Developer Center
I hope that helps answer your question.