[solved] raspberry and vc4

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[solved] raspberry and vc4

Postby acconciox » Mon Nov 21, 2016 4:22 pm

Hi, how do i enable vc4 on raspberry pi 3 b?
do i have to recompile kernel?
" " mesa?
from a debian distro i see the compiling mesa tutorial
$this->bbcode_second_pass_code('', 'git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
./autogen.sh --prefix=$WLD \
--enable-gles2 \
--with-egl-platforms=x11,wayland,drm \
--enable-gbm --enable-shared-glapi \
--with-gallium-drivers=vc4 \
--without-dri-drivers \
--disable-va \
--disable-vdpau \
--disable-xvmc \
--disable-omx
make -j4 && make install')
it is a --disable-omx option on compiling mesa that focus my attention is vc4 the best video acceleration? could you address me to some tutorial that explains steps if this vc4 is available on raspberry pi 3 b on arch armv7h?

ciao e grazie !
Last edited by acconciox on Sun Nov 27, 2016 6:13 pm, edited 1 time in total.
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Re: raspberry and vc4

Postby jaab » Mon Nov 21, 2016 8:28 pm

Please have a look at this post:
viewtopic.php?f=64&t=9811

The driver is supplied by Raspberry. Mesa supplied by Arch has vc4 support. The Raspberry driver is still under development but improving and generally usable.

I am not using it now. But when I did Firefox reported:
webGl renderer = Broadcom--Gallium 0.4 vc4 v3d 2.1

Regards,
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Re: raspberry and vc4

Postby acconciox » Thu Nov 24, 2016 12:21 am

This is from
/home/alarm/.local/share/xorg/Xorg.0.log
$this->bbcode_second_pass_code('', '
[ 156.367] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 156.369] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 156.370] (II) no primary bus or device found
[ 156.370] falling back to /sys/devices/platform/soc/soc:gpu/drm/card0
[ 156.370] (II) LoadModule: "glx"
[ 156.381] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 156.399] (II) Module glx: vendor="X.Org Foundation"
[ 156.399] compiled for 1.18.4, module version = 1.0.0
[ 156.399] ABI class: X.Org Server Extension, version 9.0
[ 156.399] (==) AIGLX enabled
[ 156.399] (II) LoadModule: "fbturbo"
[ 156.399] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[ 156.404] (II) Module fbturbo: vendor="X.Org Foundation"
[ 156.404] compiled for 1.18.0, module version = 0.5.1
[ 156.404] Module class: X.Org Video Driver
[ 156.404] ABI class: X.Org Video Driver, version 20.0
[ 156.404] (II) FBTURBO: driver for framebuffer: fbturbo
[ 156.405] (WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
[ 156.405] (EE)
Fatal server error:
[ 156.405] (EE) xf86OpenConsole: Switching VT failed
[ 156.405] (EE)
[ 156.405] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 156.405] (EE) Please also check the log file at "/home/alarm/.local/share/xorg/Xorg.0.log" for additional information.
[ 156.405] (EE)
[ 156.405] (WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
[ 156.405] (WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
[ 156.405] (WW) xf86CloseConsole: VT_ACTIVATE failed: Operation not permitted
[ 156.405] (EE) Server terminated with error (1). Closing log file.')

thanks you i did this:

$this->bbcode_second_pass_code('', 'VC4 runs well with parameters
cmdline.txt: cma=128M # also tested 256
config.txt: gpu_mem=256 avoid_warnings=2 dtoverlay=vc4-kms-v3d
and without xorg.conf')

I'm not sure i understand this
$this->bbcode_second_pass_quote('', 'a')nd without xorg.conf

$this->bbcode_second_pass_code('', 'locate xorg.conf
/etc/X11/xorg.conf.d
/etc/X11/xorg.conf.d/90-emulate3buttons.conf
/etc/X11/xorg.conf.d/99-fbturbo.conf
/usr/share/X11/xorg.conf.d
/usr/share/X11/xorg.conf.d/10-evdev.conf
/usr/share/X11/xorg.conf.d/10-quirks.conf
/usr/share/X11/xorg.conf.d/70-synaptics.conf
/usr/share/X11/xorg.conf.d/90-emulate3buttons.conf
/usr/share/man/man5/xorg.conf.5.gz
/usr/share/man/man5/xorg.conf.d.5.gz')
I dont have this file: /vc4-kms-v3d-overlay.dtb

/boot/overlays:
$this->bbcode_second_pass_code('', 'ls vc4*
vc4-fkms-v3d.dtbo vc4-kms-v3d.dtbo
')
there is not /vc4-kms-v3d-overlay.dtb
how to install ?

im using this:

$this->bbcode_second_pass_code('', 'Linux alarmpi 4.4.33-1-ARCH #1 SMP Sat Nov 19 14:09:17 MST 2016 armv7l GNU/Linux

sing system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)
')

after reinstalling xorg-server still i cant run startx

at the moment is there some user running vc4?

thanks you for help
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Re: raspberry and vc4

Postby jaab » Thu Nov 24, 2016 9:32 pm

I have just done:

cd /etc/X11/xorg.conf.d
sudo mv 99-fbturbo.conf 99-fbturbo.~

Changed config.txt to:
gpu_mem=64
dtparam=audio=on
hdmi_drive=2
avoid_warnings=2
dtoverlay=vc4-kms-v3d

See part of my /var/log/Xorg.0.log
$this->bbcode_second_pass_code('', ' 241.259] (==) Depth 24 pixmap format is 32 bpp
[ 241.530] (==) modeset(0): Backing store enabled
[ 241.530] (==) modeset(0): Silken mouse enabled
[ 241.530] (II) modeset(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 241.531] (==) modeset(0): DPMS enabled
[ 241.531] (II) modeset(0): [DRI2] Setup complete
[ 241.531] (II) modeset(0): [DRI2] DRI driver: vc4
[ 241.531] (II) modeset(0): [DRI2] VDPAU driver: vc4
[ 241.542] (--) RandR disabled
[ 241.568] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[ 241.568] (II) AIGLX: enabled GLX_ARB_create_context
[ 241.568] (II) AIGLX: enabled GLX_ARB_create_context_profile
[ 241.568] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[ 241.568] (II) AIGLX: enabled GLX_INTEL_swap_event
[ 241.568] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[ 241.568] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[ 241.568] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[ 241.568] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[ 241.568] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[ 241.570] (II) AIGLX: Loaded and initialized vc4
[ 241.570] (II) GLX: Initialized DRI2 GL provider for screen 0
')

I am running it. I use ligthdm. xfce (gtk2) and lxde-gtk3 run fine. lxqt does not start. Calibre, a qt5 app, renders very poorly.

Ciao
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Re: raspberry and vc4

Postby acconciox » Fri Nov 25, 2016 12:23 am

thanks !!!

cd /etc/X11/xorg.conf.d
sudo mv 99-fbturbo.conf 99-fbturbo.~

Changed config.txt to:
gpu_mem=64 # for mmal purpose 128 is probably better
dtparam=audio=on
hdmi_drive=2
avoid_warnings=2
dtoverlay=vc4-kms-v3d

it is also suggested cma=128 in /boot/cmdline.txt
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Re: raspberry and vc4

Postby jaab » Fri Nov 25, 2016 8:42 am

Hi,

Before doing the changes I read this: https://github.com/anholt/linux/wiki/Raspberry-Pi-3
Eric Anholt is the Broadcomm engineer supported by Raspberry for vc4 driver development. He recommends to keep gpu mem low, so I kept gpu at 64 mb.

Doing free before and after enabling vc4 shows a bump up in used memory. Enabling compositing in xfce window manager shows another bump up in user memory. vc4 has a memory cost. If you get into swapping you loose performance. With the fb driver I am swapping occasionally up to 150 mb.

Cma will improve driver performance at a cost for the rest of the system. I have not tested it enough to give an opinion.

Regards,
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Re: raspberry and vc4

Postby acconciox » Fri Nov 25, 2016 11:01 am

if i try to use mpv

$this->bbcode_second_pass_code('', 'mpv /media/MOVIE/test.avi
Playing: /media/MOVIE/test.avi
(+) Video --vid=1 (mpeg4)
(+) Audio --aid=1 (mp3)
* failed to add service - already in use?
')
vlc crash i have to restart x

ffplay works but

$this->bbcode_second_pass_code('', 'libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
')
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Re: raspberry and vc4

Postby jaab » Fri Nov 25, 2016 2:00 pm

cma=128 in /boot/cmdline.txt is probably advisable.

Below is the journalctl extract
$this->bbcode_second_pass_code('', 'nov 24 23:01:17 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 7372800
nov 24 23:01:17 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 7372800
nov 24 23:01:17 alarmpi kernel: [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: vc4-drm soc:gpu: failed to allocate buffer with size 9216000
nov 24 23:01:21 alarmpi kernel: [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
')
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Re: raspberry and vc4

Postby acconciox » Sat Nov 26, 2016 12:55 am

$this->bbcode_second_pass_code('', '(II) xfree86: Adding drm device (/dev/dri/card0)
[ 74.527] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 8 paused 0
[ 74.528] (II) no primary bus or device found')

reading around from gentoo vc4 (im pretty desperate...)
$this->bbcode_second_pass_quote('', 'O')nce you're booted up, you can verify that your module is properly loaded with lsmod. You're supposed to have a vc4 module in there. Also, it's important to verify that /dev/dri/card0 exists. If you don't have that device, nothing's going to work.


after adding cma in config.txt
cma_lwm=16
cma_hwm=128
cma_offline_start=16
# dtoverlay=vc4-kms-v3d
* running without vc4 at the moment chromium crash system and i have to powerdown the raspi and reboot to write here

if you pointed me on one direction and i did not understand, please, point me on the right direction ;)
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Re: raspberry and vc4

Postby jaab » Sat Nov 26, 2016 10:24 pm

All I can say is that this is my config.txt
$this->bbcode_second_pass_code('', '[alarm@alarmpi boot]$ cat config.txt
# See /boot/overlays/README for all available options

gpu_mem=16
dtparam=audio=on
hdmi_drive=2
avoid_warnings=2
dtoverlay=vc4-kms-v3d')
Reduced gpu_mem in steps to 16 mb minimun as it is not used by the vc4 driver.

This is my cmdline.txt
$this->bbcode_second_pass_code('', '[alarm@alarmpi boot]$ cat cmdline.txt
root=/dev/sda2 rw rootwait rootdelay=5 console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=bfq ')
No cma. See my Xorg.0.log
$this->bbcode_second_pass_code('', '[ 27.006] Kernel command line: 8250.nr_uarts=0 cma=256M@256M dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2709.boardrev=0xa02082 bcm2709.serial=0xf4e8cf48 smsc95xx.macaddr=B8:27:EB:E8:CF:48 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/sda2 rw rootwait rootdelay=5 console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200 elevator=bfq
')
It seems that when the KMS driver kicks in it sets the cma for itsd buffers??

My mpv works:
$this->bbcode_second_pass_code('', '[alarm@alarmpi Vídeos]$ mpv There_Will_Be_Blood_2007_DVDRip_x264.mp4
Playing: There_Will_Be_Blood_2007_DVDRip_x264.mp4
(+) Video --vid=1 (*) (h264)
(+) Audio --aid=1 --alang=eng (*) (aac)
libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
AO: [alsa] 48000Hz stereo 2ch float
VO: [opengl] 712x426 => 1012x426 yuv420p
[osd/libass] PlayResX undefined, setting to 960
(Paused) AV: 00:18:54 / 02:31:52 (12%) A-V: 0.000')

It must be something else.

Regards,
jaab
 
Posts: 26
Joined: Sat Oct 22, 2016 8:32 am

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 15 guests