Why does the downstream Vivante driver get built out-of-tree by default in OpenEmbedded?

In his answer to galcore module probing error -22 @marcel.tx says:

In OpenEmbedded, I know that the downstream Vivante driver does get built out-of-tree and resp. recipe does therefore disable it in-kernel.

We updated the kernel sources 4.9-2.3.x to solve Segmentation fault if running a Qt application on kernel built out of tree.

In order to have the kernel driver always build from the same sources we are considering to set:

MACHINE_USES_VIVANTE_KERNEL_DRIVER_MODULE = "0"

Now we wonder why you use the Vivante driver built out-of-tree by default at all? Are there any differences in functionality or are there any licensing issues?

Hi

This has been asked on the meta-freescale mailinglist recently.
Please have a look on this thread.

So if you make sure that the kernel variant used does build a kernel driver which matches the userspace Vivante component versions the result should work.

Max

Thanks for the reply.

Your link is dead. I guess you are referring to this thread Vivante graphics driver?

Some more questions:

  • What is the “userspace Vivante component”?
  • Where is it defined?
  • How to know if he kernel driver matches the Version of the userspace component?

Hi

For me the link isn’t dead. Here’s the URL behind the link:
https://www.yoctoproject.org/pipermail/meta-freescale/2019-October/024101.html

You seem to have found the same thread from one of the mailinglist aggregating sites.

  1. What is the “userspace Vivante component”?

e.g. the X11 driver , libGLES.so etc.

  1. Where is it defined?

meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.8.bb

meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb
meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb
meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb

Depending on the BSP version you are using there might be additional bbappend files messing with the versions used.

  1. How to know if he kernel driver matches the Version of the userspace component?

You would check in NXP’s original BSP what kernel version (meaning the exact downstream version) they use with what version of the userspace components.
Alternatively you could check ‘drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h’ in your kernel and compare that with the userspace recipe versions.

Max