Panfrost: AFBC broken on ODROID-N2 / G52
System information
inxi -GSC -xx
output:
System: Host: droid Kernel: 5.10.0-1-ARCH aarch64 bits: 64 compiler: gcc v: 10.2.1 Console: tty 1 Distro: Arch Linux ARM
CPU: Info: 6-Core (2-Die) model: N/A variant-1: cortex-a73 variant-2: cortex-a53 bits: 64 type: MCP MCM arch: ARMv8
rev: 4
features: Use -f option to see features bogomips: 0
Speed: 1992 MHz min/max: 100/1992:1908 MHz Core speeds (MHz): 1: 1992 2: 1992 3: 1908 4: 1908 5: 1908 6: 1908
Graphics: Device-1: meson-g12a-vpu driver: meson_drm v: kernel bus ID: N/A chip ID: amlogic:ff900000
Device-2: meson-g12a-mali driver: panfrost v: kernel bus ID: N/A chip ID: amlogic:ffe40000
Device-3: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: kernel bus ID: N/A chip ID: amlogic:ff600000
Display: server: X.org 1.20.10 driver: loaded: modesetting alternate: fbdev tty: 165x48
Message: Advanced graphics data unavailable in console. Try -G --display
Note: This is actually a 5.10.7-1 kernel (built myself). The wrong output is most probably due to a packaging issue.
Describe the issue
All I was testing is the startup screen from kodi 18.9, using kodi-gbm --standalone
. Starting from 20.3.3 the startup screen was ok. I tried an updates mesa and noticed some graphic glitches (see pictures from below).
Below is my bisect log:
$ git bisect start '--' 'src/panfrost/'
# bad: [087ef91c85c82546af879b6ce0ba371b393e1e13] nvc0: index_bias is now only set for indexed draws
git bisect bad 087ef91c85c82546af879b6ce0ba371b393e1e13
# good: [7e4d536e6308d2feb777d25f89766265cc1b183c] VERSION: bump to 20.3.3
git bisect good e6f0a0217d3075ef2bbf16efd0831b847a37b87c
# good: [3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57] intel: Pointer to SCISSOR_RECT array should be 64B aligned
git bisect good 3c4e43e72be3bcb70d7cfb9abcaf77d4c0c75f57
# good: [eb7e20b378baf7798b31e6842b3dc9055f7b0b07] pan/bi: Add builder data structure
git bisect good eb7e20b378baf7798b31e6842b3dc9055f7b0b07
# good: [ab9751759671c6d8ed9d297808bfcc5e2e646f3e] pan/mdg: Support nir_intrinsic_group_memory_barrier
git bisect good ab9751759671c6d8ed9d297808bfcc5e2e646f3e
# bad: [e53bf25ea490bbb1722519f77e350ffadb962dfc] android: pan/bi: Remove NIR->old IR
git bisect bad e53bf25ea490bbb1722519f77e350ffadb962dfc
# good: [728069485da5b4a2a6d42caa381003e530f54c9d] panfrost: Use PAN_V6_SWIZZLE() in pan_blit.c
git bisect good 728069485da5b4a2a6d42caa381003e530f54c9d
# good: [ebeb3613507e78f2352557afcd9d2aa20e34618a] panfrost: Fix ZS block format v7 definition
git bisect good ebeb3613507e78f2352557afcd9d2aa20e34618a
# bad: [0fb8223f2927c9fb7d6bdad01557e24463983b56] android: pan/bi: Generate instruction printer
git bisect bad 0fb8223f2927c9fb7d6bdad01557e24463983b56
# bad: [8a9b2ef82d65132a9c3321d138f2838da8cdf34d] panfrost: Enable AFBC support on Bifrost
git bisect bad 8a9b2ef82d65132a9c3321d138f2838da8cdf34d
# good: [dc664d5fb80f24fa0d1787b7b3110154bf5c50dd] panfrost: Use proper format for Z16_UNORM
git bisect good dc664d5fb80f24fa0d1787b7b3110154bf5c50dd
# first bad commit: [8a9b2ef82d65132a9c3321d138f2838da8cdf34d] panfrost: Enable AFBC support on Bifrost
This occurs every time when a broken mesa version is used. Although I started my bisect 087ef91c, the problem also occurs with d548d781
Regression
Doesn't look like a regression to me, but AFBC apparently doesn't work on G52 (yet).
Log files as attachment
On a trys without AFBC there are only these 2 kernel errors:
[13501.116507] panfrost ffe40000.gpu: js fault, js=1, status=INSTR_INVALID_ENC, head=0x39e9100, tail=0x39e9100
[13501.120622] panfrost ffe40000.gpu: gpu sched timeout, js=1, config=0x7300, status=0x51, head=0x39e9100, tail=0x39e9100, sched_job=000000004678663a
On an erroneous run there are a lot more errors in the kernel log:
[13557.581709] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x39e9780, tail=0x39e9780
[13557.585820] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x39e9780, tail=0x39e9780, sched_job=00000000888a0b35
[13558.077837] panfrost ffe40000.gpu: js fault, js=0, status=UNKNOWN, head=0x39e9740, tail=0x39e9740
[13558.081092] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x5b, head=0x39e9740, tail=0x39e9740, sched_job=000000000749209f
[13558.095646] panfrost ffe40000.gpu: AS_ACTIVE bit stuck
[13558.099955] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.108966] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=000000005fa6b6a7
[13558.126736] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.131706] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=00000000c5896f31
[13558.145853] panfrost ffe40000.gpu: AS_ACTIVE bit stuck
[13558.150858] panfrost ffe40000.gpu: js fault, js=0, status=UNKNOWN, head=0x39e9740, tail=0x39e9740
[13558.158670] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x5b, head=0x39e9740, tail=0x39e9740, sched_job=0000000054fa74ec
[13558.177207] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.181381] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=00000000782e2283
[13558.195675] panfrost ffe40000.gpu: AS_ACTIVE bit stuck
[13558.200531] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.209239] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=000000009f46ef4e
[13558.227070] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.232005] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=0000000072cbed49
[13558.251243] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.255442] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=00000000f463d362
[13558.273514] panfrost ffe40000.gpu: js fault, js=0, status=UNKNOWN, head=0x39e9740, tail=0x39e9740
[13558.277236] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x5b, head=0x39e9740, tail=0x39e9740, sched_job=000000003a1ba5d0
[13558.295555] panfrost ffe40000.gpu: js fault, js=0, status=UNKNOWN, head=0x39e9740, tail=0x39e9740
[13558.299049] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x5b, head=0x39e9740, tail=0x39e9740, sched_job=0000000028089440
[13558.319003] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x39e9740, tail=0x39e9740
[13558.323175] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x39e9740, tail=0x39e9740, sched_job=00000000d3ee49d7
Screenshots/video files (if applicable)
First of all sorry for the bad quality, but the problem can be seen.
The start menu should look like this.
The broken output is slightly different on each run, so it may look like this.
Any extra information would be greatly appreciated
When explicitely disabling AFBC using PAN_MESA_DEBUG="noafbc" ./kodi-gbm --standalone
the result is ok again, even on newer mesa versions.