ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Fri Mar 20, 2015 3:13 pm

@AndyPi - Thanks for the video link. Very interesting.

The driver appears to work fairly well. I recompiled the 3.19 kernel for 1360x768. I played a video in GNOME MPlayer. It was smooth, resource use wasn't very high. I wish I didn't have to run as root, but oh well.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Video Core Source – 1 Year On

Sat Mar 21, 2015 1:34 pm

ktb wrote:
mimi123 wrote: I don't have errors on the Xorg log.Did you try to run as root? Did you compile anholt's X11 module?
I don't think I have tried running the xserver as root, but the user I am using is in the video group. I will give root a try.

What is anholt's X11 module? I don't see that mentioned anywhere. I compiled the kernels from GitHub. I then compiled mesa as well as the latest xserver, xf86-input-evdev, xf86-input-synaptics, xf86-video-modesetting and even xf86-video-fbdev (as a fallback) from freedesktop.org.
The X11 Anholt patches were merged since a while, but I did not catch the info.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Video Core Source – 1 Year On

Sat Mar 21, 2015 1:39 pm

ktb wrote:@AndyPi - Thanks for the video link. Very interesting.

The driver appears to work fairly well. I recompiled the 3.19 kernel for 1360x768. I played a video in GNOME MPlayer. It was smooth, resource use wasn't very high. I wish I didn't have to run as root, but oh well.
Try to use "chown" to change /dev/dri/ permissions.
Did you try Unity(it works fairly well)?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Sat Mar 21, 2015 9:09 pm

mimi123 wrote:
ktb wrote:@AndyPi - Thanks for the video link. Very interesting.

The driver appears to work fairly well. I recompiled the 3.19 kernel for 1360x768. I played a video in GNOME MPlayer. It was smooth, resource use wasn't very high. I wish I didn't have to run as root, but oh well.
Try to use "chown" to change /dev/dri/ permissions.
Did you try Unity(it works fairly well)?
I gave this a try: sudo chown :video /dev/dri

$ ls -l /dev | grep dri
drwxr-xr-x 2 root video 80 Mar 21 15:02 dri

$ ls -l /dev/dri
total 0
crw-rw----+ 1 root video 226, 0 Mar 21 15:02 card0
crw-rw---- 1 root video 226, 64 Mar 21 15:02 controlD64

$ ls -l /dev | grep fb
crw-rw---- 1 root video 29, 0 Dec 31 1969 fb0
crw-rw---- 1 root video 29, 1 Dec 31 1969 fb1

I also tried that for the rest of the /dev/vc* stuff as well as adjusting their group permissions to rw.

Unfortunately, none of that seems to help.

I haven't tried Unity. I never liked it very much, but maybe I'll give it a try on the Pi2B just to test it out.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Mon Mar 23, 2015 3:54 am

I haven't figured out a way for it to work exactly how I desired (booting to console and then running startx) for non-root users. So, I reinstalled LightDM which I had removed while trying to troubleshoot problems I was having with both Jessie (systemd) and the VC4 driver. Non-root users can use the xserver with the VC4 driver now provided they log in using LightDM. This is good enough. Thanks again, mimi123!

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Video Core Source – 1 Year On

Mon Mar 23, 2015 4:41 pm

Wow, the anholt code is soon to become part of raspbian, I wonder what will be next?

I saw the anholt video on YT early in the year and saw another video at the same time which I only just found again, I don't know if anyone else posted this in forum already?

https://www.youtube.com/watch?v=eZd0IYJ7J40

I think the answer to the question in video is zuse?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Wed Apr 22, 2015 2:31 am

New Pi2B kernel :) https://github.com/anholt/linux/tree/vc4-kms-v3d-rpi2

Things are coming along nicely. There do seem to be some issues that I haven't figured out how to work around, but the kernel does boot and the latest Mesa VC4 driver appears to be mostly OK. The kernel no longer needs to be modified and compiled for one specific display resolution. I'm using xserver-xorg* from Jessie at the moment and I'll build all the X server stuff from source next to see if it improves anything.

Currently, I can log in using LightDM and potentially accomplish some things, however it appears that after a certain amount of mouse cursor movement the desktop completely freezes up (mouse and keyboard no longer respond, I can still SSH in). If I don't move the mouse, it seems there isn't a problem. dmesg:

Code: Select all

[   81.560458] Unable to handle kernel paging request at virtual address afae6000
[   81.567695] pgd = a950c000
[   81.570559] [afae6000] *pgd=289d5811, *pte=00000000, *ppte=00000000
[   81.576866] Internal error: Oops: 807 [#1] PREEMPT SMP ARM
[   81.582347] Modules linked in: fuse cpufreq_stats bcm2708_rng snd_bcm2835 snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_midi snd_rawmidi snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_timer snd ipv6 i2c_dev evdev lirc_rpi(C) rtc_ds1307 i2c_bcm2708 i2c_bcm2835 lirc_dev rc_core uio_pdrv_genirq uio sg
[   81.610799] CPU: 1 PID: 2417 Comm: Xorg Tainted: G        WC      4.0.0-v7+ #3
[   81.618011] Hardware name: BCM2709
[   81.621411] task: a896d080 ti: a8a70000 task.ti: a8a70000
[   81.626817] PC is at vc4_plane_write_dlist+0x34/0x50
[   81.631781] LR is at vc4_crtc_atomic_flush+0x7c/0x114
[   81.636829] pc : [<803a0bf8>]    lr : [<8039e5c0>]    psr: 80050013
[   81.636829] sp : a8a71c40  ip : a8a71c50  fp : a8a71c4c
[   81.648291] r10: 805f4d40  r9 : 00000030  r8 : a8fbd410
[   81.653510] r7 : 00000001  r6 : a8a19c10  r5 : afae5ff8  r4 : a8862610
[   81.660031] r3 : 00000002  r2 : a95fb100  r1 : afae6000  r0 : 43000550
[   81.666553] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   81.673679] Control: 10c5387d  Table: 2950c06a  DAC: 00000015
[   81.679417] Process Xorg (pid: 2417, stack limit = 0xa8a70210)
[   81.685243] Stack: (0xa8a71c40 to 0xa8a72000)
[   81.689605] 1c40: a8a71c74 a8a71c50 8039e5c0 803a0bd0 00000003 00000006 00000003 a8b026c0
[   81.697779] 1c60: 00000006 a8f81300 a8a71ca4 a8a71c78 80377124 8039e550 a8f81780 00000006
[   81.705952] 1c80: a8862010 a8b026c0 00000006 a96bac00 00000000 00400000 a8a71ccc a8a71ca8
[   81.714126] 1ca0: 80379254 80376fc8 a8b026c0 a96bac00 a8fbd410 a88d4500 000001d5 a8f81780
[   81.722298] 1cc0: a8a71ce4 a8a71cd0 8039c1e4 80379164 a8b026c0 a8862010 a8a71d1c a8a71ce8
[   81.730471] 1ce0: 80377b38 8039c19c a8a71e70 805eb3dc a8a71d1c 00400000 a8862010 a88d4500
[   81.738644] 1d00: 000001d5 a8fbd410 00000000 a8862010 a8a71d64 a8a71d20 8038be88 80377a60
[   81.746817] 1d20: 00000177 00000040 00000040 00000000 00000000 00400000 00400000 8039ad4c
[   81.754992] 1d40: a8a71e04 a88d4500 a8fbd444 a8fbd410 00000177 a96bac00 a8a71dfc a8a71d68
[   81.763168] 1d60: 8038cdc4 8038bc04 00000177 00000040 00000040 00000000 00000000 00400000
[   81.771337] 1d80: 00400000 00100100 00200200 00000000 00000000 00000000 34325241 00000000
[   81.779502] 1da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   81.787668] 1dc0: 00000000 00000000 00000000 00000000 a8a71dfc 00000000 a95d0480 a96bac00
[   81.795834] 1de0: 000000a3 a95d0480 a8a71e70 805eb3dc a8a71e44 a8a71e00 80390030 8038cc64
[   81.803999] 1e00: 00000004 00000002 00000019 000001d5 00000177 00000000 00000000 00000000
[   81.812164] 1e20: 00000000 00000000 80949034 a8a71e70 a96bac00 80949034 a8a71f1c a8a71e48
[   81.820328] 1e40: 803820c8 8038ffd4 00000000 00000000 80030d48 a896d080 00000504 a8a71ea8
[   81.828493] 1e60: 8038ffc8 0000001c c01c64a3 7eaddf00 00000002 00000019 000001d5 00000177
[   81.836658] 1e80: 00000000 00000000 00000000 a8a71ec8 00000000 a8a71fb0 a8a71ec4 a891900c
[   81.844823] 1ea0: 00001000 a8a71eec 00000040 00000030 00001000 a8a71eec 00000040 a891900c
[   81.852988] 1ec0: a8a71edc a8a71ed0 80590634 800d3e3c a8a71f3c a8a71ee0 7f04ca00 80149cd0
[   81.861152] 1ee0: a9f29600 a88dcc00 00000000 553825f2 0009fa30 a8980780 7eaddf00 a95d0240
[   81.869317] 1f00: c01c64a3 00000007 a8a70000 00000000 a8a71f7c a8a71f20 8015b3a0 80381ee0
[   81.877481] 1f20: 00000050 00000000 3901c612 0026be6d a8a71f4c a8a71f88 00000001 76f6d248
[   81.885646] 1f40: 00000107 8000ef88 a8a70000 00000000 a8a71f84 00000001 a95d0240 7eaddf00
[   81.893811] 1f60: a95d0240 c01c64a3 00000007 a8a70000 a8a71fa4 a8a71f80 8015b5d4 8015af94
[   81.901978] 1f80: 00000177 76d6ff10 7eaddf00 c01c64a3 00000036 8000ef88 00000000 a8a71fa8
[   81.910144] 1fa0: 8000eda0 8015b59c 76d6ff10 7eaddf00 00000007 c01c64a3 7eaddf00 00000177
[   81.918310] 1fc0: 76d6ff10 7eaddf00 c01c64a3 00000036 000001d5 00000177 76f642f4 7eaddf44
[   81.926476] 1fe0: 76c1b068 7eaddee4 76c03bc8 769f0acc 00050010 00000007 00000000 00000000
[   81.934657] [<803a0bf8>] (vc4_plane_write_dlist) from [<8039e5c0>] (vc4_crtc_atomic_flush+0x7c/0x114)
[   81.943872] [<8039e5c0>] (vc4_crtc_atomic_flush) from [<80377124>] (drm_atomic_helper_commit_planes+0x168/0x19c)
[   81.954036] [<80377124>] (drm_atomic_helper_commit_planes) from [<80379254>] (drm_atomic_helper_commit+0xfc/0x154)
[   81.964370] [<80379254>] (drm_atomic_helper_commit) from [<8039c1e4>] (drm_atomic_commit+0x54/0x74)
[   81.973405] [<8039c1e4>] (drm_atomic_commit) from [<80377b38>] (drm_atomic_helper_update_plane+0xe4/0x12c)
[   81.983047] [<80377b38>] (drm_atomic_helper_update_plane) from [<8038be88>] (__setplane_internal+0x290/0x2cc)
[   81.992949] [<8038be88>] (__setplane_internal) from [<8038cdc4>] (drm_mode_cursor_common+0x16c/0x304)
[   82.002158] [<8038cdc4>] (drm_mode_cursor_common) from [<80390030>] (drm_mode_cursor_ioctl+0x68/0x70)
[   82.011368] [<80390030>] (drm_mode_cursor_ioctl) from [<803820c8>] (drm_ioctl+0x1f4/0x518)
[   82.019626] [<803820c8>] (drm_ioctl) from [<8015b3a0>] (do_vfs_ioctl+0x418/0x608)
[   82.027101] [<8015b3a0>] (do_vfs_ioctl) from [<8015b5d4>] (SyS_ioctl+0x44/0x6c)
[   82.034403] [<8015b5d4>] (SyS_ioctl) from [<8000eda0>] (ret_fast_syscall+0x0/0x4c)
[   82.041964] Code: e3a03000 f57ff04f e5920038 e7900103 (e5810000) 
[   82.048276] ---[ end trace 76e6d546af99b443 ]---

grawp
Posts: 1
Joined: Sun Apr 26, 2015 1:32 am

Re: Video Core Source – 1 Year On

Sun Apr 26, 2015 1:37 am

@ktb - Could you provide us a defconfig or notes how to configure the kernel, please?

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: Video Core Source – 1 Year On

Sun Apr 26, 2015 2:49 am

jamesh wrote:As for other stuff, it does beg the question, why were people clamouring for release and full openness when only a few are using the stuff that actually has been released....
Hi James,
I don't know much about the gpu or arm in general, but am trying to learn. Has it been open-sourced in a way that it is accessible to novice users? All I want to do is run a fast fft and dct. Can this be done today utilizing the gpu? If so, please point me to some source.

thanks.
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Sun Apr 26, 2015 3:12 am

grawp wrote:@ktb - Could you provide us a defconfig or notes how to configure the kernel, please?
I'll upload the last .config I used. You should not expect that everything in this .config is correct for a number of reasons. Some odd things such as including both i2c_bcm2708 and i2c_bcm2835 seemed to be necessary. I guess that is probably a temporary situation or I just did something wrong.

The cursor/freezing issue seems to be caused by IRQ handling ( https://github.com/anholt/linux/commits/bcm2836-irq ) not being complete or not functioning properly yet. I might try merging in (probably manually incorporating) some of the commits from that branch and see what happens.

.config -- https://www.sendspace.com/file/20vv5l

Here are my rough notes:

Code: Select all

vc4-kms-v3d-pi2 (4.0.0-v7+) on Pi2B - Raspbian Wheezy (using Jessie's gcc-4.9 and some other Jessie packages)

# Building the kernel
#--------------------

~ $ cd software/build
~/software/build $ mkdir anholt && cd anholt
~/software/build/anholt $ git clone -b vc4-kms-v3d-rpi2 git://github.com/anholt/linux.git
~/software/build/anholt $ cd linux
~/software/build/anholt/linux $ make mrproper
~/software/build/anholt/linux $ zcat /proc/config.gz > .config
~/software/build/anholt/linux $ make oldconfig
~/software/build/anholt/linux $ make menuconfig
----------------------------------------------------

"You need CONFIG_DRM_VC4=y (not m, or it won't load)."

> Device Drivers > Graphics support > Direct Rendering Manager 

<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
    I2C encoder or helper chips  --->
< > PTN3460 DP/LVDS bridge (NEW)
< > DisplayLink (NEW)
< > DRM support for Marvell Armada SoCs (NEW)
< > DRM Support for TI LCDC Display Controller (NEW)
<*> Broadcom VC4 Graphics


You need CONFIG_CMA_SIZE_MBYTES=128 (or cma=128M on the kernel command line)

> Device Drivers > Generic Driver Options

[*] DMA Contiguous Memory Allocator
      *** Default contiguous memory area size: ***
(128)  Size in Mega Bytes
      Selected region size (Use mega bytes value only)  --->
(8)   Maximum PAGE_SIZE order of alignment for contiguous buffers


> Device Drivers > MMC/SD/SDIO card support

 --- MMC/SD/SDIO card support
[ ]   MMC debugging
[ ]   MMC host clock gating
      *** MMC/SD/SDIO Card Drivers ***
<*>   MMC block device driver
(32)    Number of minors per block device
[*]     Use bounce buffer for simple hosts
< >   SDIO UART/GPS class support
< >   MMC host test driver
      *** MMC/SD/SDIO Host Controller Drivers ***
<*>   MMC support on BCM2835
[*]     DMA support on BCM2835 Arasan controller
(2)       Block count limit for PIO transfers
< >   ARM AMBA Multimedia Card Interface support
<*>   Secure Digital Host Controller Interface support
<*>     SDHCI platform and OF driver helper
<*>       SDHCI OF support for the Arasan SDHCI controllers
< >   SDHCI support for Fujitsu Semiconductor F_SDH30
<*>   MMC support on BCM2835
[*]     DMA support on BCM2835 Arasan controller
(2)       Block count limit for PIO transfers
<M>   MMC/SD/SDIO over SPI
< >   Synopsys DesignWare Memory Card Interface
< >   VUB300 USB to SDIO/SD/MMC Host Controller support
< >   USB SD Host Controller (USHC) support
< >   Renesas USDHI6ROL0 SD/SDIO Host Controller support


> Device Drivers > I2C support > I2C Hardware Bus support

<M> BCM2708 BSC
(100000) BCM2708 I2C baudrate
    *** I2C system bus drivers (mostly embedded / system-on-chip) ***
<M> Broadcom BCM2835 I2C controller
< > CBUS I2C driver
< > Synopsys DesignWare Platform
< > GPIO-based bitbanging I2C
< > ST-Ericsson Nomadik/Ux500 I2C Controller
< > OpenCores I2C Controller
< > PCA9564/PCA9665 as platform device
< > Rockchip RK3xxx I2C adapter
< > Simtec Generic I2C interface
< > Xilinx I2C Controller
    *** External I2C/SMBus adapter drivers ***
< > Diolan U2C-12 USB adapter
< > Parallel port adapter (light)
< > RobotFuzz Open Source InterFace USB adapter
< > TAOS evaluation module
< > Tiny-USB adapter
    *** Other I2C/SMBus bus drivers ***

Save the .config and exit.

----------------------------------------------------
~/software/build/anholt/linux $ make -j4 > make.log 2>&1
~/software/build/anholt/linux $ make modules > make-modules.log 2>&1
~/software/build/anholt/linux $ sudo make modules_install > sudo-make-modules_install.log 2>&1

~/software/build/anholt/linux $ cd ~/software/build
~/software/build $ git clone https://github.com/raspberrypi/tools.git
~/software/build $ cd ~/software/build/anholt/linux/arch/arm/boot/
~/software/build/anholt/linux/arch/arm/boot $ ~/software/build/tools/mkimage/mkknlimg zImage kernel7_new.img
Version: Linux version 4.0.0-v7+ (ktb@raspbian) (gcc version 4.9.2 (Raspbian 4.9.2-10) ) #1 SMP PREEMPT Tue Apr 21 22:03:36 CDT 2015
DT: y

~/software/build/anholt/linux/arch/arm/boot $ sudo cp kernel7_new.img /boot/kernel-vc4-kms-v3d-rpi2-4.0.0-v7+.img
~/software/build/anholt/linux/arch/arm/boot $ sudo nano /boot/config.txt
(kernel=kernel-vc4-kms-v3d-rpi2-4.0.0-v7+.img)
~/software/build/anholt/linux/arch/arm/boot $ cd ~/software/build/anholt



# Building mesa
#--------------
~/software/build/anholt $ sudo apt-get build-dep mesa
~/software/build/anholt $ sudo apt-get install libxcb1-dev libxcb-present-dev libxcb-sync-dev libva-dev -t jessie
~/software/build/anholt $ git clone git://anongit.freedesktop.org/mesa/mesa
~/software/build/anholt $ cd mesa
~/software/build/anholt/mesa $ ./autogen.sh --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib/arm-linux-gnueabihf --localstatedir=/var --disable-silent-rules --build=arm-linux-gnueabihf --with-gallium-drivers=vc4 --with-dri-drivers= --enable-gbm --enable-xa --enable-va --enable-vdpau --enable-omx --enable-shared-glapi --enable-gles1 --enable-gles2 --with-egl-platforms=x11,wayland,drm

Then install any packages which seem necessary or useful based on configuration errors and/or feedback.

The resulting configuration:

        prefix:          /usr
        exec_prefix:     ${prefix}
        libdir:          /usr/lib/arm-linux-gnueabihf
        includedir:      ${prefix}/include

        OpenGL:          yes (ES1: yes ES2: yes)

        OSMesa:          no

        DRI platform:    drm
        DRI drivers:     no
        DRI driver dir:  ${libdir}/dri
        GLX:             DRI-based

        EGL:             yes
        EGL platforms:   x11 wayland drm
        EGL drivers:     builtin:egl_dri2

        llvm:            no

        Gallium:         yes

        Shader cache:    yes
        With SHA1 from:  libgcrypt

        Shared libs:     yes
        Static libs:     no
        Shared-glapi:    yes

        CFLAGS:          -g -O2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp
        CXXFLAGS:        -g -O2 -Wall -fno-strict-aliasing -fno-builtin-memcmp
        Macros:          -D_GNU_SOURCE -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_STRTOF -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_DRI3 -DHAVE_MINCORE

        PYTHON2:         python2

        Run 'make' to build Mesa

~/software/build/anholt/mesa $ sudo pip install Mako
~/software/build/anholt/mesa $ sudo make install > sudo-make-install.log 2>&1
~/software/build/anholt/mesa $ cd ~/software/build/anholt


# Building the X Server
#----------------------

~/software/build/anholt $ sudo apt-get build-dep xorg
~/software/build/anholt $ sudo apt-get install x11proto-bigreqs-dev x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-dmx-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-fonts-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-print-dev x11proto-randr-dev x11proto-record-dev x11proto-render-dev x11proto-resource-dev x11proto-scrnsaver-dev x11proto-video-dev x11proto-xcmisc-dev x11proto-xext-dev x11proto-xf86bigfont-dev x11proto-xf86dga-dev x11proto-xf86dri-dev x11proto-xf86misc-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev x11proto-dri3-dev x11proto-present-dev

~/software/build/anholt $ git clone git://anongit.freedesktop.org/xorg/xserver
~/software/build/anholt $ cd xserver
~/software/build/anholt/xserver $ ./autogen.sh --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib/arm-linux-gnueabihf --localstatedir=/var --disable-silent-rules --build=arm-linux-gnueabihf

Then install any packages which seem necessary or useful based on configuration errors and/or feedback.

~/software/build/anholt/xserver $ ./autogen.sh --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib/arm-linux-gnueabihf --localstatedir=/var --disable-silent-rules --build=arm-linux-gnueabihf
~/software/build/anholt/xserver $ sudo make install
~/software/build/anholt/xserver $ cd ~/software/build/anholt

Then git clone and build the following packages from freedesktop.org the same way:

xf86-input-evdev, xf86-input-synaptics, xf86-video-modesetting, xf86-video-fbdev


# Create or edit an existing /etc/X11/xorg.conf (or use something like /usr/share/X11/xorg.conf.d/20-devices.conf)
# and configure the modesetting driver:
# /etc/X11/xorg.conf
#---------- BEGIN CONTENT ----------
Section "Files"
        ModulePath   "/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/usr/share/fonts/X11/Type1"
EndSection

Section "InputClass"
    Identifier "ev"
    Driver "evdev"
EndSection

Section "InputClass"
    Identifier "syn"
    Driver "synaptics"
    MatchProduct "Synaptics"
EndSection

Section "ServerFlags"
EndSection

Section "Device"
    Identifier  "Configured Video Device"
    Driver "modesetting"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    DefaultDepth    24
    SubSection "Display"
        Depth           24
    EndSubSection
EndSection
#---------- END CONTENT ----------

-- OR --

# /usr/share/X11/xorg.conf.d/20-devices.conf
#---------- BEGIN CONTENT ----------
Section "Device"
    Identifier "FB1"
    Driver     "modesetting"
EndSection

Section "Device"
    Identifier  "FBDEV0"
    Driver      "fbdev"
    Option      "fbdev" "/dev/fb0"
    Option      "debug" "True"
    Option      "Hotplug" "False"
    #Option     "ShadowFB" "False"
    #Option     "Rotate"           # <str>
EndSection

#---------- END CONTENT ----------


Add mask_gpu_interrupt0=0x400 to /boot/config.txt


----------------------------------------------------



Pacolo
Posts: 2
Joined: Sun Apr 26, 2015 9:20 pm

Re: Video Core Source – 1 Year On

Sun Apr 26, 2015 9:24 pm

With this kernel, are you having better a improved performance in something? For example, raspbian + kodi? or in emulation?

We see information about a kernel that will provide drivers for vc4, and some videos showing a square with textures. Now, I see that you are compilating the kernel with this driver so, there is no some video comparison showing the performance?

I see in YouTube some videos loading Android Lollipop in Raspberry Pi 2 Model B, but is so laggy. Can we expect some future Android compilations with a smoth interface using this driver?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Mon Apr 27, 2015 4:28 am

Pacolo wrote:With this kernel, are you having better a improved performance in something? For example, raspbian + kodi? or in emulation?
I honestly do not know. Given the state of the latest Pi2B kernel I compiled, I'm not very interested in testing the performance of specific applications and games at this point in time.
Pacolo wrote:We see information about a kernel that will provide drivers for vc4, and some videos showing a square with textures. Now, I see that you are compilating the kernel with this driver so, there is no some video comparison showing the performance?
There is no video comparison of which I am aware.
Pacolo wrote:I see in YouTube some videos loading Android Lollipop in Raspberry Pi 2 Model B, but is so laggy. Can we expect some future Android compilations with a smoth interface using this driver?
Based on some of the activity I've noticed around the internet, something like that seems very likely. I do not expect that to happen very soon.

Pacolo
Posts: 2
Joined: Sun Apr 26, 2015 9:20 pm

Re: Video Core Source – 1 Year On

Thu Apr 30, 2015 11:22 am

Thx for the answer. :)

User avatar
xranby
Posts: 540
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Video Core Source – 1 Year On

Thu Aug 13, 2015 7:41 pm

Getting Eric Anholt's Mesa3D VC4 driver running on a Raspberry Pi is easily done thanks to the work by gohai.
gohai started out roughly following Eric's notes here: http://dri.freedesktop.org/wiki/VC4/
And then put together a buildbot in Python, to produce system images for use on the Pi or Pi2.

Kernel, Mesa, XServer packages & dependencies are from git. System image produced using gohai's buildbot
https://github.com/gohai/vc4-buildbot

gohai publish daily builds of raspbian patched to the Mesa3D vc4 driver using his bot at:
http://sukzessiv.net/~gohai/vc4-buildbot/build/

using gohai's rasbian image i can start run quite a lot of OpenGL 2 content
viewtopic.php?f=81&t=115350
viewtopic.php?p=787240#p787240


There is a list of "significant performance projects", work items, that may be implemented into to this new vc4 OpenGL 2 driver:
http://dri.freedesktop.org/wiki/VC4/
daily changes that improve to the driver can be seen here: http://cgit.freedesktop.org/mesa/mesa/l ... rivers/vc4
Last edited by xranby on Mon Aug 17, 2015 10:29 am, edited 1 time in total.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

User avatar
Fidelius
Posts: 460
Joined: Wed Jan 01, 2014 8:40 pm
Location: Germany

Re: Video Core Source – 1 Year On

Fri Aug 14, 2015 8:25 am

xranby wrote:using gohai's rasbian image i can start run quite a lot of OpenGL 2 content
Your entire posting is good news, Xranby. Would "OpenGL 2 content" include Blender? I'm asking because Blender is such a nice "killer app", also being used in educational environments, so that Blender on the Pi would be awesome.

But so far it's for expers and "freaks" only. So, generally speaking: does anybody know how far away we are from the point where Raspian will officially support an OpenGL Mesa driver?
Last edited by Fidelius on Mon Aug 17, 2015 6:39 am, edited 1 time in total.

User avatar
xranby
Posts: 540
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: Video Core Source – 1 Year On

Sun Aug 16, 2015 11:43 pm

Fidelius wrote:
xranby wrote:using gohai's rasbian image i can start run quite a lot of OpenGL 2 content
Your entire posting is good new, Xranby. Would "OpenGL 2 content" include Blender? I'm asking because Blender is such a nice "killer app", also being used in educational environments, so that Blender on the Pi would be awesome.

But so far it's for expers and "freaks" only. So, generally speaking: does anybody know how far away we are from the point where Raspian will officially support an OpenGL Mesa driver?
Yes running "OpenGL 2 content" such as blender would work.

Raspberry Pi users running Ubuntu mate report that their blender package already installs and runs using the Mesa3d OpenGL 2 software rasterizer.
viewtopic.php?f=63&t=13676&start=25

If you started to use the new Mesa3d vc4 OpenGL 2 with acceleration would make the user interface more fluid compared to using the OpenGL 2 using the Mesa3d software renderer,

Adding this new driver to Ubuntu mate would require that someone takes the Ubuntu mate system image and "patches" it to use the new mesa3d vc4 driver.
You can likely use gohai's build scripts that currently build and patch the Raspbian image to use the new vc4 driver.
Use the same build scrips on a Ubuntu mate system would automate the work.
https://github.com/gohai/vc4-buildbot

Run the blender shipped with Raspbian wheezy unfortunately do not work due to a different issue.

Code: Select all

apt-get install blender
blender
it catches a segfault quite early after it has initialized opengl and opened up a window with the blender icon.
I cant see anything in the back-trace linking the fault to the GPU driver.
The gdb debugger back-trace show that the crash actually happens inside the Python VM
0x76c6a2a4 in PyErr_SetObject () from /usr/lib/libpython3.2mu.so.1.0
It would be good if someone experienced tracking down Python VM bugs could try reproduce this crash.

full wheezy blender crash log below:

Code: Select all

pi@raspberrypi ~ $ gdb blender
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/blender...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/blender 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x735413e0 (LWP 6680)]
[New Thread 0x72d413e0 (LWP 6681)]
[New Thread 0x725413e0 (LWP 6682)]
[New Thread 0x71d413e0 (LWP 6683)]
[New Thread 0x7150a3e0 (LWP 6684)]
[Thread 0x7150a3e0 (LWP 6684) exited]
[New Thread 0x7150a3e0 (LWP 6685)]
[New Thread 0x70d0a3e0 (LWP 6686)]
[Thread 0x70d0a3e0 (LWP 6686) exited]
libGL: Can't open configuration file /home/pi/.drirc: No such file or directory.

Program received signal SIGILL, Illegal instruction.
0x6ff6b608 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) bt
#0  0x6ff6b608 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
#1  0x6ff68004 in OPENSSL_cpuid_setup ()
   from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
#2  0x76fe8254 in ?? () from /lib/ld-linux-armhf.so.3
#3  0x0164cb10 in ?? ()
#4  0x0164cb10 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) c
Continuing.
libGL: Can't open configuration file /home/pi/.drirc: No such file or directory.
libGL: Can't open configuration file /home/pi/.drirc: No such file or directory.
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable

Program received signal SIGSEGV, Segmentation fault.
0x76c6a2a4 in PyErr_SetObject () from /usr/lib/libpython3.2mu.so.1.0
(gdb) bt
#0  0x76c6a2a4 in PyErr_SetObject () from /usr/lib/libpython3.2mu.so.1.0
#1  0x76c80124 in PyErr_Format () from /usr/lib/libpython3.2mu.so.1.0
#2  0x76c8c4b4 in PyType_Ready () from /usr/lib/libpython3.2mu.so.1.0
#3  0x76c58958 in _PyExc_Init () from /usr/lib/libpython3.2mu.so.1.0
#4  0x76c59018 in Py_InitializeEx () from /usr/lib/libpython3.2mu.so.1.0
#5  0x005c11cc in BPY_python_start ()
#6  0x00309810 in WM_init ()
#7  0x002f705c in main ()
(gdb)
Last edited by xranby on Mon Aug 17, 2015 10:32 am, edited 8 times in total.
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

lazyrabbit
Posts: 3
Joined: Mon Aug 10, 2015 6:40 am

Re: Video Core Source – 1 Year On

Mon Aug 17, 2015 12:07 am

Looking for a device to set up a transcoding server.
But the performance of Pi2 V-core on transcoding is bad.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26699
Joined: Sat Jul 30, 2011 7:41 pm

Re: Video Core Source – 1 Year On

Mon Aug 17, 2015 2:04 pm

lazyrabbit wrote:Looking for a device to set up a transcoding server.
But the performance of Pi2 V-core on transcoding is bad.
It's off topic for this thread, but what do you need to transcode?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Sun Sep 06, 2015 6:00 am

I installed blender from Raspbian Jessie on the 20150808-1312-vc4 build image. It works OK, I guess. I don't really know, I've never used blender for anything.

OpenArena works well when the Pi2B is booted with cma=512M. I get anywhere from 15-75 FPS.

lingon
Posts: 161
Joined: Fri Aug 26, 2011 7:31 am

Re: Video Core Source – 1 Year On

Tue Sep 22, 2015 2:28 pm

I have downloaded gohais image 20150808-1312-vc4-image.zip from http://sukzessiv.net/~gohai/vc4-buildbot/build/. With that I was able to start tuxracer. It was not playable and there were problems with drawing the screen, but it looks very promising. I tried ephiphany on that same image, but it would not start because of libopenmaxil.so is missing.

I have tested also the image 20150919-1903-vc4-image.zip on three different monitors (two 1920x1200 and one 1280x1024), but I can only see the colorful splashscreen and nothing else after that. Judging on the SD-card LED I can see that the Raspberry Pi does boot. I have played with the config options, but unfortunately I have been unable to get any image on the display.

Has anyone else had better luck with the latest VC4 OpenGL image?

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Video Core Source – 1 Year On

Tue Sep 22, 2015 9:01 pm

ktb wrote:@AndyPi - Thanks for the video link. Very interesting.

The driver appears to work fairly well. I recompiled the 3.19 kernel for 1360x768. I played a video in GNOME MPlayer. It was smooth, resource use wasn't very high. I wish I didn't have to run as root, but oh well.
How? Mine just crashes on

Code: Select all

mplayer xyz.mov
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: sahajsarup@gmail.com
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Video Core Source – 1 Year On

Fri Sep 25, 2015 12:42 pm

ric96 wrote:
ktb wrote:@AndyPi - Thanks for the video link. Very interesting.

The driver appears to work fairly well. I recompiled the 3.19 kernel for 1360x768. I played a video in GNOME MPlayer. It was smooth, resource use wasn't very high. I wish I didn't have to run as root, but oh well.
How? Mine just crashes on

Code: Select all

mplayer xyz.mov
Hmm.. This was a while ago. Honestly, I can't really say for sure whether or not gnome-mplayer was using HW acceleration. I didn't really confirm that. It could be that the video I was playing is just not very demanding. My recent tests show that any HW acceleration of video isn't working (even after recompiling mesa as well as libvdpau and libva). However, the problem you're experiencing with it crashing might be caused by something like a theme you're using? What desktop are you using? I know I was having problems with gnome-mplayer (and Xorg) crashing any time I would try to open a file, but it was due to me using a recent version of the Numix theme (from GitHub) with Xfce which apparently has some problems. Synaptic Package Manager and GParted were also crashing (and Xorg) when I would try to launch them. Using an older version of the theme I had saved didn't cause those applications to crash.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Video Core Source – 1 Year On

Fri Sep 25, 2015 5:41 pm

My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: sahajsarup@gmail.com
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

Return to “General discussion”