Jump to content

Orange Pi 5, RK3558s, graphics failures and shell lockups in KDE with assoc. fill_queue:2264 Bad Desc(2)


Kuu Tirronen

Recommended Posts

Hey,

 

I'm experiencing graphics failures, accelerated decoding problems, flickering window decorations and shell hangups in Plasma. All events are associated with syslog entries:

 

dma-pl330 fea30000.dma-controller: pl330_submit_req:1738 Try increasing mcbufsz (258/256)
dma-pl330 fea30000.dma-controller: fill_queue:2264 Bad Desc(2)

 

I've attached the whole system log in case someone is interested. Running

 

Armbian 23.02.2 Jammy
Linux orange 5.10.110-rockchip-rk3588 #23.02.2 SMP Fri Feb 17 23:59:20 UTC 2023 aarch64 

 

Panfrost-mesa updated to HEAD. A very similar problem occurs with Orange Pi 5 Debian ready distro images, but the kernel version is very similar.

 

What to do here? Build a Arduino TTL repeater and go to town with a kernel debugger on an unfamiliar architecture? Is my DMA controller broken?

 

 

Armbian_OrangePI5_syslog.txt Xorg.0.log

Link to comment
Share on other sites

Interestingly hacking the pl330 driver for more buffer space fixed the graphics issues. Video decoding didn't improve though.

 

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 2e9440955b66..7fd7c147a4d9 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2171,7 +2171,7 @@ static int pl330_add(struct pl330_dmac *pl330)

        /* Use default MC buffer size if not provided */
        if (!pl330->mcbufsz)
-               pl330->mcbufsz = MCODE_BUFF_PER_REQ * 2;
+               pl330->mcbufsz = MCODE_BUFF_PER_REQ * 2 + 16;

        /* Mark all events as free */
        for (i = 0; i < pl330->pcfg.num_events; i++)

 

Link to comment
Share on other sites

@Kuu Tirronen Nice found that hack, but I'm questioning if you've followed the right steps, so which steps did you follow?

 

Wayland will probably give better results, for hardware video decoding you'll need software that will make use of mpp.

 

Amazingfate made a repo for jammy with panfork mesa and a repo with software build with rkmpp hw acceleration there are a few topics about this, also don't forget to install malirun from his repo, this will set the udev rules that's needed for hw acceleration.

 

For Panfrost this option should be disabled: cat /boot/config* | grep CONFIG_DRM_IGNORE_IOTCL_PERMIT

 

For mali blob you'll need the right driver and is not compatible with panfork mesa and not every driver supports X11.

Link to comment
Share on other sites

I can't really say I've followed any one source at this point.

 

I did have a hunch based on something I read that wayland might be better, or mandatory. I've never actually studied what that does or how to enable it. Will look into it.

 

Based on the logs VLC does access mpp and results in no error messages, just blank video and no frames displayed.

 

IOCTL_PERMIT is not enabled. Compiled on stock config. This was suggested in the mesa-parafrost git repo README. I don't think I want the mali blob and actually would be happy if I could disable the entire hardware decode acceleration.

 

Thanks! Will continue studying.

Link to comment
Share on other sites

Found a simple way to disable video hardware acceleration. The ppa:liujianfeng1994/rockchip-multimedia installs a MPPE capable version of these codec libraries and they need to be downgraded. VLC does not respect the HW Acceleration checkboxes in this setup. It might also work to skip this repository when setting up the hardware and only do the panfrost part. The following should not remove half your packages. If you stumble on this later on, you can update the version numbers from https://packages.ubuntu.com/jammy/libavcodec58

 

sudo apt-get install libavcodec58=7:4.4.2-0ubuntu0.22.04.1 libavutil56=7:4.4.2-0ubuntu0.22.04.1 libswresample3=7:4.4.2-0ubuntu0.22.04.1 libavformat58=7:4.4.2-0ubuntu0.22.04.1 libpostproc55=7:4.4.2-0ubuntu0.22.04.1 libswscale5=7:4.4.2-0ubuntu0.22.04.1

 

Armbian is not the only distro I have tried. All the "official" distributions had these two problems, but cannot confirm they had wayland enabled. I can't understand why google finds so little for the above DMA error messages.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines