GPU and hardware video support

Hi, it wasn’t obvious from the comments, but do those github links mean that hardware acceleration is possible?

Like, would installing those libraries allow desktop environments to use the GPU?

I’ve never used a desktop environment, but should be possible.

Hi, I’m still not sure what to do with these. Where exactly should I copy the binaries?

On github a person mentioned that I need to put the libMali.so file in the same place as libEGL.so, but I don’t have that installed anywhere on my khadas.

I’m using the “Ubuntu server” image so it’s pretty bare with regards to installed packages.

Any update on this?
I cannot understand how to achieve it on arch linux as arch arm linux already have
Video driver

  1. xf86-video-fbturbo-git
  2. odroid-c2-libgl-x11

But I cannot find anything for KVim1, I tried the oc2 driver but that didnt work.
Any suggestion?

This is for the ancient core 3.14, for the new core look for information about Lima.

Yes have been searching for it, but not getting how to make it work.
I tested your armbian 5.77 built to check if they have va but looks like the video is processed by the cpu.

Can you advice me how to implement Lima on 5.0kernel?

Looking into these libs, I assume mesa, libva and libvdpau should be able to help with Video Acceleration?
I need to understand how did it work fine with kodi on your archlinux built? I will try to run your arch linux built and check

Hello Dear,
Any guidance on how to achieve Hardware acceleration ? I have been reading about lima but not getting any accurate details on how to make it work with Linux 5.0

You need to patch the kernel with lima patches.

And you also need to build and install mesa-lima to work on userspace.

Some instructions I ever used to compile mesa-lima:

sudo apt-get build-dep libgl1-mesa-dri

sudo apt-get install \
    automake libtool \
    bison flex \
    gettext \
    libdrm-dev \
    libexpat1-dev \
    libudev-dev \
    libx11-xcb-dev \
    libxcb-dri3-dev \
    libxcb-dri2-0-dev \
    libxcb-glx0-dev \
    libxcb-xfixes0-dev \
    libxcb-present-dev \
    libxcb-sync-dev \
    libxshmfence-dev \
    libxdamage-dev \
    libxext-dev \
    libxfixes-dev \
    python-mako \
    x11proto-present-dev \
    x11proto-dri3-dev \
    x11proto-dri2-dev \
    x11proto-gl-dev \
	libxrandr-dev

cd mesa-lima

git pull

./configure --with-gallium-drivers=exynos,sun4i,meson,rockchip,lima --with-dri-drivers= --with-platforms=drm,x11 --disable-xvmc --disable-vdpau --enable-debug

./autogen.sh \
     --with-dri-drivers= \
     --with-egl-platforms=x11,drm \
     --disable-xvmc --disable-vdpau \
     --with-gallium-drivers=exynos,sun4i,meson,rockchip,lima

make -j4
make install
1 Like

The patch is not needed for kernel that he uses (there is already a patch). You just need to enable the option in the kernel config. :slight_smile:

1 Like

Which option ? So I have to re-compile the kernel again :grimacing:
10hrs for me haha

What 10 hours ? Building the kernel on VIM1 takes less than 2 hours. If your PC build system is so slow, use your VIM to build the kernel and other packages.

1 Like

Yes this will be much better.
But which options do I have to enable in the kernel config file?

Lima graphics driver.

I am looking at config of Linux 5.0 but there is not lima mentioned. :frowning:

Where you look ? It’s in my kernel.

I checked in the config file, But now i went to your repo and I see there is LIMA in display interface.

CONFIG_DRM_LIMA is not set
This is commented

Edit:
Should I make it CONFIG_DRM_LIMA=y

and build the kernel?

probably !

device tree will load the module with =m so no need for =y

So you suggest you suggest i. Use =m?
Edit: Put it on y as it will be used for kvim1 anyways.

Put it to build with your config file with lima enabled.

Been 5hrs now still compiling on vim1.
I used this command
makepkg -sc --noconfirm

Make config file had makeflag commented out so i assume it is only using single core.

Next time i will do makepkg -sc j4 --noconfirm

Hope this will make use of all 4 cores?