VIM2 running full desktop graphics with Panfrost

I built a Debian buster image with Fenix yesterday, and to my great surprise, all graphics on desktop seems to work well now.

glmark2 score: 182 ( fullscreen with 1080p display : 55 )

Panfrost devs have done a great job !

=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali T820 (Panfrost)
    GL_VERSION:    2.1 Mesa 20.1.0-devel (git-191ced539a)
=======================================================

Full output here: https://pastebin.com/uv5KDPuR

Fenix commit hash d2f0c3562475b74baaf6f97b33cb04e12f35bae4, debian buster build with xfce desktop.

Took me a while to get glmark2 built on Debian, as it’s Ubuntu package by default and has a number of annoying dependencies. I can upload .debs if anyone cares

4 Likes

Did you have to configure anything in xorg.conf ?
Can you share your xorg.conf(s) if any (PM me)?

I have nothing in xorg.conf, it’s completely unmodified image.

Fullscreen output: https://pastebin.com/m9upRPiV

dmesg:
dmesg | egrep -i panfrost
[ 8.986100] panfrost d00c0000.gpu: clock rate = 666666666
[ 8.993792] panfrost d00c0000.gpu: d00c0000.gpu supply mali not found, using dummy regulator
[ 9.002640] panfrost d00c0000.gpu: mali-t820 id 0x820 major 0x1 minor 0x0 status 0x0
[ 9.010631] panfrost d00c0000.gpu: features: 00000000,101e76ff, issues: 00000000,24040400
[ 9.018937] panfrost d00c0000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002821 AS:0xff JS:0x7
[ 9.018947] panfrost d00c0000.gpu: shader_present=0x7 l2_present=0x1
[ 9.042183] [drm] Initialized panfrost 1.1.0 20180908 for d00c0000.gpu on minor 1
[ 74.760612] panfrost d00c0000.gpu: js fault, js=1, status=DATA_INVALID_FAULT, head=0x21ca680, tail=0x21ca680
[ 74.764926] panfrost d00c0000.gpu: gpu sched timeout, js=1, config=0x3300, status=0x58, head=0x21ca680, tail=0x21ca680, sched_job=000000008d86615d
[ 75.114736] panfrost d00c0000.gpu: js fault, js=1, status=DATA_INVALID_FAULT, head=0x5493780, tail=0x5493780
[ 75.119090] panfrost d00c0000.gpu: gpu sched timeout, js=1, config=0x3300, status=0x58, head=0x5493780, tail=0x5493780, sched_job=00000000dde29084
[ 105.556011] panfrost_gem_shrinker_scan: 31 callbacks suppressed
[ 112.394941] Modules linked in: rfcomm fuse zram zsmalloc hci_uart meson_vdec© btqca btsdio btbcm bluetooth videobuf2_dma_contig panfrost ir_nec_decoder videobuf2_memops v4l2_mem2mem gpu_sched ecdh_generic ecc rc_khadas videobuf2_v4l2 ao_cec videobuf2_common meson_ir leds_pwm brcmfmac brcmutil cfg80211 rfkill ip_tables x_tables btrfs blake2b_generic xor xor_neon zstd_compress zlib_deflate raid6_pq libcrc32c rtc_hym8563 gpio_keys_polled

Xorg.log:
egrep -i “panfrost|dri2” /var/log/Xorg.0.log
[ 12.740] (**) OutputClass “Panfrost” setting /dev/dri/card0 as PrimaryGPU
[ 12.856] (II) Applying OutputClass “Panfrost” to /dev/dri/card0
[ 12.937] (II) Applying OutputClass “Panfrost” options to /dev/dri/card0
[ 14.973] (II) modeset(0): glamor X acceleration enabled on Mali T820 (Panfrost)
[ 15.541] (II) modeset(0): [DRI2] Setup complete
[ 15.541] (II) modeset(0): [DRI2] DRI driver: meson
[ 15.541] (II) modeset(0): [DRI2] VDPAU driver: meson
[ 15.579] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 15.591] (II) Initializing extension DRI2

Seriously ? I got 74 on edge-v.

Which kernel did you use? Can you share the kernel source? I just built one from @balbes150 Banch 5.7-rc1 and finally display manager loaded without needing fbturbo driver.
But still its not making use of panfrost.

What kernel config was needed other than panfrost? I have built kernel with panfrost and it works well on edge-v but amlogic devices always have problem with panfrost and lima.

The kernel is 5.6 ( see pastebin )

Link to full image build in the first post. I didn’t do any changes to source, i just ran Fenix stock build, git hash in first post, as of yesterday it was trunk/master latest. I made no modifications of my own.

I can dump kernel config it generated in a pastebin in a bit as well.

Ah ok you used fenix build ok maybe I should look into fenix kernel source.

Thanks

Really? I tested on Edge seems not so low.

I have pushed to GitHub Fenix. You don’t need to do any modifications whit Fenix.

1 Like

@kkert

can you do:

ls -al /etc/X11/xorg.conf*
(including *)

I run gentoo so I want to compare compare configs.

$ cat /etc/X11/xorg.conf.d/01-panfrost.conf
Section "OutputClass"
        Identifier "Panfrost"
        MatchDriver "meson"
        Driver "modesetting"
        Option "PrimaryGPU" "true"
EndSection

I have same (even slightly better) glmark2 results and similar Xorg and dmesg output, but I have one annoying artifact: X does not refresh well when moving windows and leaves some traces until I run ‘xrefresh’.

Would you mind posting output of:

lsmod

I do have

panfrost d00c0000.gpu: GPU Fault 0x00000088 (UNKNOWN) at 0x000000965f38c5c0

in dmesg (as mentioned elsewhere)

Paste output here: https://pastebin.com/ZsE50hBq

uname -a
ls -al /etc/X11/xorg.conf*
cat /etc/X11/xorg.conf.d/01-panfrost.conf
lsmod
sudo dmesg | egrep -i "midgard|panfrost|drm|vpu|gpu|meson|mali"
cat /var/log/Xorg.0.log | egrep -i "panfrost|mali|midgard|gpu|dri|drm"

Also feel free to pull down the image i uploaded, put it on an sdcard and boot it up, to poke more at it.

1 Like

Thanks for providing pastebin !
Basically: I do not see much deviating between our systems.

But, for example: Kodi (finally) works extremely well in X11 (and, of course, it does only uses one window). The X11 “travelling windows” refresh artifact must be something specfic to my (very personal) gentoo build.

Do you mean full screen on 1920x1080 is 55 score? Ive got around 75 on 5.7-rc1

Edit: 75 on Edge-V and not Vim2

gentoo@kvim2-gentoo ~ $ glmark2 --fullscreen
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali T820 (Panfrost)
    GL_VERSION:    2.1 Mesa 20.0.4
=======================================================
[build] use-vbo=false: FPS: 31 FrameTime: 32.258 ms
[build] use-vbo=true: FPS: 71 FrameTime: 14.085 ms
[texture] texture-filter=nearest: FPS: 76 FrameTime: 13.158 ms
[texture] texture-filter=linear: FPS: 79 FrameTime: 12.658 ms
Segmentation fault
gentoo@kvim2-gentoo ~ $ glmark2
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali T820 (Panfrost)
    GL_VERSION:    2.1 Mesa 20.0.4
=======================================================
[build] use-vbo=false: FPS: 94 FrameTime: 10.638 ms
[build] use-vbo=true: FPS: 162 FrameTime: 6.173 ms
[texture] texture-filter=nearest: FPS: 219 FrameTime: 4.566 ms
[texture] texture-filter=linear: FPS: 199 FrameTime: 5.025 ms
Segmentation fault

fullscreen obviously is less FPS

(note I have 'Segmentation fault’s so something still not right, on my setup, that is)

the problem with xrefresh on gentoo is solved by renaming one of the dri cards, like:

mv /dev/dri/card1 /dev/dri/card1_

seems Xorg (as seen in log) gets confused by seeing 2 cards
but removing one makes everything work (here)

1 Like

actually it turns out:
card0 is not panfrost accelerated (vendor Mesa), presumably framebuffer
(or maybe lima ?)
card1 is panfrost accelerated (vendor Panfrost)

Finally built kernel wirh khadas fenix patches.

I see card0, card1 and renderD128 in my dri
Also the graphic driver is panfrost as shown in inxi but opengl renderer is llvmpipe which is software rendering.
It should show Mali T820 (Panfrost) instead.

When I try to do this and reboot then it gets back to normal as it was before.

I will try again tomorrow.

@Spikerguy

Perhaps we have other kernel and xorg modules
maybe my card0 is lima ?
maybe your card1 is panfrost?
I first noticed odd behavior by looking at Xorg.log which referred to both card0 and card1
therefore I either rename card0 or card1 as hack

I guess you said you were using kernel fron khadas fenix branch.
Mainline 5.6 kernel with khadas patches?

Ive build that thinking it should solve all my problems in all the vim devices but it doesnt look like it makes use of panfrost for opengl nor lima for vim1 and no fan support for vim2 either.

Ive used the config from their repo itself no changes to the config. Is there any changes required in userspace?

I use mainline 5.6 with config based on balbes git kernel repo (and adjust to my needs).
I fact, I use few modifications I assembled over the years (but none of them might still be needed nor relevant). I have not gone for fenix or ubuntu path in general. I try to focus on gentoo. Of course I pick up information from khadas and armbian and meson (and other) forums or channels.

I have the same on linux-vim package but it doesn’t help.
I use the whole balbes git kernel repo on 5.6 but never got to run panfrost over modesetting.

Maybe I should try now with latest mesa.

UPDATE:
Tried latest Mesa release and still its using LLVMpipe also I added 01-panfrost.conf to xorg and still not luck.
@tasinofan Any advice?
Ill move back to linux-vim-5.6.2 with panfrost.conf in xorg to see if DM loads

UPDATE2: Got it to work on 5.6.2 with Panfrost conf in xorg. So hopefully can build an image for vim2 yeayy

UPDATE3: glmark2 -s 1920x1080 score=19
glmark2 with small screen score = 55
Not bad.

Tried Chromium inside docker with armv7 widevine to test now well it works. Works smooth with Netflix 1080p but with a bit on lag in ui and not in video playback.

Screenshots
System Info

Netflix 1080p

Will try out few builds tomorrow and release a preview version soon. BTW the 01-panfrost.conf is needed for the DM to work with panfrost on Amlogic Soc.

@Spikerguy, good to hear it works for you too, and, yes, no doubt one needs 01-panfrost.conf with appropriate ServerFlags and OutputClass section content.

1 Like