Missing overlays in kernel source

Trying to run gentoo on a renegade and noticed a discrepancy between what’s available in an official image and what I can compile from the libretech git repositories.

The official images include dtb overlays and a rockchip-fixup.scr. Those are not in the dtb files included in the standalone kernel image.

I’m wondering if that’s partially what’s causing some issues for me. I got a system to boot ok but I’m getting repeated dumps in dmesg from the framebuffer.

[ 313.067098] WARNING: CPU: 2 PID: 53 at drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1577 vop_crtc_atomic_flush+0x314/0x340
[ 313.067137] Modules linked in: hantro_vpu rockchip_vdec(C) v4l2_vp9 v4l2_h264 videobuf2_dma_contig v4l2_mem2mem videobuf2_memops videobuf2_v4l2 videobuf2_common lima snd_soc_rk3328 rk805_pwrkey dw_hdmi_i2s_audio dw_hdmi_cec videodev gpu_sched joydev drm_shmem_helper mc snd_soc_rockchip_i2s snd_soc_simple_card snd_soc_simple_card_utils mousedev cfg80211 rfkill sch_fq_codel efi_pstore fuse dm_mod pstore nfnetlink hid_logitech_hidpp crct10dif_ce polyval_ce polyval_generic rtc_rk808 phy_rockchip_inno_hdmi hid_logitech_dj ipv6 crc_ccitt
[ 313.067512] CPU: 2 PID: 53 Comm: kworker/2:1 Tainted: G WC 6.1.87-g9f51a48ea718 #3
[ 313.067537] Hardware name: Firefly roc-rk3328-cc (DT)
[ 313.067552] Workqueue: events drm_fb_helper_damage_work
[ 313.067592] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 313.067617] pc : vop_crtc_atomic_flush+0x314/0x340
[ 313.067644] lr : drm_atomic_helper_commit_planes+0x148/0x220
[ 313.067677] sp : ffff80000836bb00
[ 313.067688] x29: ffff80000836bb00 x28: 0000000000000050 x27: ffff00c6caa72800
[ 313.067730] x26: ffff00c7b484f888 x25: ffff00c6caa72ab8 x24: ffff80000836bc88
[ 313.067773] x23: 0000000000000000 x22: 0000000000000001 x21: ffff00c7b484f080
[ 313.067813] x20: 0000000000000000 x19: ffff00c6c6c02480 x18: ffffffffffffffff
[ 313.067856] x17: 5d302d656e616c70 x16: 3a31333a454e414c x15: 505b202a524f5252
[ 313.067897] x14: 452a205d6d72645b x13: 74756f2064656d69 x12: 7420746961772074
[ 313.067939] x11: 696d6d6f63205d30 x10: ffffc5c413db2580 x9 : ffffc5c411f68818
[ 313.067980] x8 : ffffc5c41415c000 x7 : 00000000000039de x6 : ffff00c6ca82c500
[ 313.068021] x5 : ffff00c6cab10200 x4 : 0000000000000001 x3 : 0000000000000038
[ 313.068061] x2 : ffff00c6c6c02700 x1 : 0000000000000000 x0 : ffff00c6c5e40000
[ 313.068103] Call trace:
[ 313.068114] vop_crtc_atomic_flush+0x314/0x340
[ 313.068141] drm_atomic_helper_commit_planes+0x148/0x220
[ 313.068176] drm_atomic_helper_commit_tail_rpm+0x68/0xb0
[ 313.068201] commit_tail+0xac/0x194
[ 313.068222] drm_atomic_helper_commit+0x184/0x1a0
[ 313.068245] drm_atomic_commit+0xb4/0xf0
[ 313.068276] drm_atomic_helper_dirtyfb+0x19c/0x2ac
[ 313.068302] drm_fb_helper_damage_work+0x1b8/0x3b0
[ 313.068333] process_one_work+0x1c8/0x450
[ 313.068364] worker_thread+0x230/0x410
[ 313.068393] kthread+0x10c/0x110
[ 313.068418] ret_from_fork+0x10/0x20
[ 313.068445] —[ end trace 0000000000000000 ]—
[ 313.068570] ------------[ cut here ]------------
[ 313.068580] WARNING: CPU: 2 PID: 53 at drivers/gpu/drm/drm_atomic_helper.c:2485 drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 313.068614] Modules linked in: hantro_vpu rockchip_vdec(C) v4l2_vp9 v4l2_h264 videobuf2_dma_contig v4l2_mem2mem videobuf2_memops videobuf2_v4l2 videobuf2_common lima snd_soc_rk3328 rk805_pwrkey dw_hdmi_i2s_audio dw_hdmi_cec videodev gpu_sched joydev drm_shmem_helper mc snd_soc_rockchip_i2s snd_soc_simple_card snd_soc_simple_card_utils mousedev cfg80211 rfkill sch_fq_codel efi_pstore fuse dm_mod pstore nfnetlink hid_logitech_hidpp crct10dif_ce polyval_ce polyval_generic rtc_rk808 phy_rockchip_inno_hdmi hid_logitech_dj ipv6 crc_ccitt
[ 313.068970] CPU: 2 PID: 53 Comm: kworker/2:1 Tainted: G WC 6.1.87-g9f51a48ea718 #3
[ 313.068993] Hardware name: Firefly roc-rk3328-cc (DT)
[ 313.069007] Workqueue: events drm_fb_helper_damage_work
[ 313.069043] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 313.069067] pc : drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 313.069091] lr : drm_atomic_helper_commit_tail_rpm+0x78/0xb0
[ 313.069114] sp : ffff80000836bb30
[ 313.069127] x29: ffff80000836bb30 x28: 0000000000000050 x27: ffff00c6caa72800
[ 313.069170] x26: ffff00c6c5e40000 x25: ffff00c6c5e40400 x24: ffff00c6c6c02480
[ 313.069213] x23: 00000000ffffffff x22: 0000000000000001 x21: 0000000000000000
[ 313.069253] x20: 0000000000000000 x19: ffff00c6cab10400 x18: ffffffffffffffff
[ 313.069293] x17: 5d302d656e616c70 x16: 3a31333a454e414c x15: 505b202a524f5252
[ 313.069335] x14: 452a205d6d72645b x13: 74756f2064656d69 x12: 7420746961772074
[ 313.069378] x11: 696d6d6f63205d30 x10: ffffc5c413db2580 x9 : ffffc5c411f695e8
[ 313.069421] x8 : ffffc5c41415c000 x7 : 00000000000039de x6 : ffff00c6ca82c500
[ 313.069461] x5 : ffff00c6cab10200 x4 : ffff00c6cab10408 x3 : 0000000000000000
[ 313.069503] x2 : 0000000000000005 x1 : 0000000000000005 x0 : ffff00c6c6c02680
[ 313.069546] Call trace:
[ 313.069557] drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 313.069582] drm_atomic_helper_commit_tail_rpm+0x78/0xb0
[ 313.069606] commit_tail+0xac/0x194
[ 313.069627] drm_atomic_helper_commit+0x184/0x1a0
[ 313.069650] drm_atomic_commit+0xb4/0xf0
[ 313.069679] drm_atomic_helper_dirtyfb+0x19c/0x2ac
[ 313.069706] drm_fb_helper_damage_work+0x1b8/0x3b0
[ 313.069738] process_one_work+0x1c8/0x450
[ 313.069767] worker_thread+0x230/0x410
[ 313.069794] kthread+0x10c/0x110
[ 313.069817] ret_from_fork+0x10/0x20
[ 313.069842] —[ end trace 0000000000000000 ]—
[ 323.305493] rockchip-drm display-subsystem: [drm] ERROR flip_done timed out
[ 323.305526] rockchip-drm display-subsystem: [drm] ERROR [CRTC:37:crtc-0] commit wait timed out

What is rockchip-fixup.scr? Are you using Armbian?

At the time, yes. Is there a different image in the download sections for the board that it would be better for me to use as my baseline comparison? It was the only thing I could readily see that was different that might be causing the temporary hanging and thread dump messages.

Armbian is a separate project. We don’t support it directly. It is best to ask on the Armbian forums. We release generic distros like Raspbian, Debian, and Ubuntu.

same original issue regardless. I had assumed it was a missing overlay but I guess not. I can open a separate inquiry/issue if needed but tying to run gentoo using the kernel source from the libretech git repository (currently 6.1.87) and get constant threaddumps for rockchip-drm and never get a display.

U-Boot is throwing no errors:

Scanning bootdev 'mmc@ff500000.bootdev':
  0  extlinux     ready   mmc          1  mmc@ff500000.bootdev.part /extlinux/extlinux.conf
** Booting bootflow 'mmc@ff500000.bootdev.part_1' with extlinux
MMC 1 extlinux.conf
1:      libretech-6.1.87
Enter choice: 1:        libretech-6.1.87
Retrieving file: /vmlinux-6.1.87-g9f51a48ea718
Retrieving file: /initramfs-6.1.87-g9f51a48ea718.img
append: root=UUID=ed71767d-6442-4417-972d-6cab80d983dd  rootfstype=xfs
Retrieving file: /dtb/rockchip/rk3328-roc-cc.dtb
Moving Image from 0x2080000 to 0x2200000, end=4f80000
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
Working FDT set to 1f00000
   Loading Ramdisk to f44f2000, end f569a587 ... OK
   Loading Device Tree to 00000000f44e2000, end 00000000f44f12da ... OK
Working FDT set to f44e2000

[ 422.506486] ------------[ cut here ]------------
[ 422.510596] WARNING: CPU: 0 PID: 35 at drivers/gpu/drm/drm_atomic_helper.c:2485 drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 422.515427] Modules linked in: hantro_vpu rockchip_vdec(C) v4l2_vp9 v4l2_h264 videobuf2_dma_contig v4l2_mem2mem videobuf2_memops videobuf2_v4l2 videobuf2_common lima rk805_pwrkey videodev gpu_sched dw_hdmi_i2s_audio dw_hdmi_cec snd_soc_simple_card mc drm_shmem_helper snd_soc_rk3328 snd_soc_simple_card_utils snd_soc_rockchip_i2s cfg80211 mousedev joydev rfkill sch_fq_codel efi_pstore fuse pstore dm_mod nfnetlink hid_logitech_hidpp crct10dif_ce polyval_ce polyval_generic rtc_rk808 phy_rockchip_inno_hdmi hid_logitech_dj ipv6 crc_ccitt
[ 422.532072] CPU: 0 PID: 35 Comm: kworker/0:1 Tainted: G WC 6.1.87-g9f51a48ea718 #3
[ 422.537172] Hardware name: Firefly roc-rk3328-cc (DT)
[ 422.541895] Workqueue: events drm_fb_helper_damage_work
[ 422.546685] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 422.551666] pc : drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 422.556514] lr : drm_atomic_helper_commit_tail_rpm+0x78/0xb0
[ 422.561338] sp : ffff80000aec3b30
[ 422.565956] x29: ffff80000aec3b30 x28: 0000000000000430 x27: ffff00000a411000
[ 422.570975] x26: ffff0000090d9200 x25: ffff0000090d8c00 x24: ffff00000ad35e00
[ 422.576009] x23: 00000000ffffffff x22: 0000000000000001 x21: 0000000000000000
[ 422.581034] x20: 0000000000000000 x19: ffff000005c63a00 x18: 0000000000000006
[ 422.586070] x17: 0000000000000020 x16: 0000000000000002 x15: 0000000000000001
[ 422.591074] x14: 0000000000000004 x13: 0000000000000000 x12: 0000000000000000
[ 422.596042] x11: 0000000000000020 x10: ffff80000a9b2580 x9 : ffff800008b695e8
[ 422.601017] x8 : ffff80000ad5c000 x7 : 00000000000039de x6 : ffff00000a175400
[ 422.606002] x5 : ffff000005c63400 x4 : ffff000005c63a08 x3 : 0000000000000000
[ 422.610965] x2 : 0000000000000005 x1 : 0000000000000005 x0 : ffff000001b90a80
[ 422.615947] Call trace:
[ 422.620495] drm_atomic_helper_commit_hw_done+0x144/0x19c
[ 422.625337] drm_atomic_helper_commit_tail_rpm+0x78/0xb0
[ 422.630180] commit_tail+0xac/0x194
[ 422.634861] drm_atomic_helper_commit+0x184/0x1a0
[ 422.639623] drm_atomic_commit+0xb4/0xf0
[ 422.644320] drm_atomic_helper_dirtyfb+0x19c/0x2ac
[ 422.649119] drm_fb_helper_damage_work+0x1b8/0x3b0
[ 422.653932] process_one_work+0x1c8/0x450
[ 422.658651] worker_thread+0x230/0x410
[ 422.663280] kthread+0x10c/0x110
[ 422.667683] ret_from_fork+0x10/0x20
[ 422.671931] —[ end trace 0000000000000000 ]—


You are not using our bootloader.

Can you elaborate? I used the libretech-flash-tool to flash the u-boot to the flash card. Which bootloader exactly. Are you saying it only works if I set things up with EFI? Do I have to explicitly transfer the bootaa64.efi from one of your images or is the code for it in git?

NOTICE:  BL31: v2.9(release):v2.8-1351-g8929dffc0
NOTICE:  BL31: Built : 16:23:24, Oct 13 2023
NOTICE:  BL31:Rockchip release version: v1.2


U-Boot 2023.07+ (Oct 13 2023 - 16:23:26 -0400) Libre Computer ROC-RK3328-CC

DRAM:  4 GiB
PMIC:  RK8050 (on=0x40, off=0x00)
Core:  244 devices, 31 uclasses, devicetree: separate
MMC:   mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from FAT... Unable to use mmc 1:1...
** File not found boot.ini **
Error (-1): cannot determine file size
unsupported rate 18446744073709551615
TMDS clock is zero!
inno_hdmi_phy phy@ff430000: PHY: Failed to power on phy@ff430000: -22.
failed to on hdmi phy (ret=-22)
unsupported rate 18446744073709551615
TMDS clock is zero!
inno_hdmi_phy phy@ff430000: PHY: Failed to power on phy@ff430000: -22.
failed to on hdmi phy (ret=-22)
unsupported rate 18446744073709551615
TMDS clock is zero!
inno_hdmi_phy phy@ff430000: PHY: Failed to power on phy@ff430000: -22.
failed to on hdmi phy (ret=-22)
U-Boot 2023.07+ (Oct 13 2023 - 16:23:26 -0400) Libre Computer ROC-RK3328-CC

Model: Libre Computer ROC-RK3328-CC
starting USB...
Bus usb@ff5c0000: USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: generic_phy_get_bulk : no phys property
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@ff580000: USB DWC2
scanning bus usb@ff5c0000 for devices... Device NOT ready
   Request Sense returned 02 3A 00
2 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff600000 for devices... 2 USB Device(s) found
scanning bus usb@ff580000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0
=>

Whatever device tree you booted Linux with is not ours. It says Firefly roc-rk3328-cc. You need to use our u-boot and pass the builtin $fdtcontroladdr to Linux.

I think I fixed it. Weird, b/c what I had should have worked. I was explicitly calling the DTB in the variables i was sending the bootloader, telling it to use $BOOT/dtb/rockchip/rk3328-roc-cc.dtb which should be the exact same one you’re calling according to the u-boot printenv. (fdtfile=rockchip/rk3328-roc-cc.dtb) I removed that line from my extlinux.conf file and now boot cleanly. Thank you for the help with this.

We maintain up to date device trees in u-boot and not our Linux branch.

1 Like