Panfrost issueshttps://gitlab.freedesktop.org/groups/panfrost/-/issues2022-07-06T18:50:03Zhttps://gitlab.freedesktop.org/panfrost/linux/-/issues/7BUG: Bad page cache in process kswapd0" in panfrost_gem_shrinker_scan, Linux ...2022-07-06T18:50:03ZAdam JosephBUG: Bad page cache in process kswapd0" in panfrost_gem_shrinker_scan, Linux 5.10.10 on gru-kevinHi, thank you so much for your amazing work on panfrost!
I've been getting dmesg BUGs and associated brief (~1sec) freezes about once or twice a week on my rk3399-gru-kevin. The sky hasn't yet fallen nor have filesystems become corrupt...Hi, thank you so much for your amazing work on panfrost!
I've been getting dmesg BUGs and associated brief (~1sec) freezes about once or twice a week on my rk3399-gru-kevin. The sky hasn't yet fallen nor have filesystems become corrupted, so I guess it's not a big deal yet. But I figured I ought to report this here for the record.
If this is something that has likely been fixed post-5.10.10 let me know and I can try to upgrade. Kernel upgrades on this laptop are a bit tricky since it requires coreboot rebuild and SPI reflash.
The kernel that produced the message below is a mostly-vanilla 5.10.10; the only patch I still carry that is remotely relevant to panfrost is a workaround for the GPU regulator not being detected properly (the patch is attached after the kernel message).
Thanks again for all your awesome work!
```
[94415.722114] BUG: Bad page cache in process kswapd0 pfn:91f38
[94415.728572] page:000000007048c2c1 refcount:4 mapcount:1 mapping:000000006e9f7691 index:0x0 pfn:0x91f38
[94415.738998] aops:0xffffffc010b93900 ino:19520 dentry name:"drm mm object"
[94415.746598] flags: 0x1ffc000000180017(locked|referenced|uptodate|lru|swapbacked|unevictable)
[94415.756061] raw: 1ffc000000180017 ffffffff0212f408 ffffffff02318148 ffffff80121664a8
[94415.764724] raw: 0000000000000000 0000000000000000 0000000400000000 ffffff80402cf000
[94415.773383] page dumped because: still mapped when deleted
[94415.779519] page->mem_cgroup:ffffff80402cf000
[94415.784397] CPU: 0 PID: 187 Comm: kswapd0 Not tainted 5.10.10-kevin+ #32
[94415.791901] Hardware name: Google Kevin (DT)
[94415.796673] Call trace:
[94415.799419] dump_backtrace+0x0/0x1c8
[94415.803519] show_stack+0x1c/0x38
[94415.807232] dump_stack+0xd4/0x10c
[94415.811044] unaccount_page_cache_page+0x21c/0x2a0
[94415.816407] __delete_from_page_cache+0x5c/0x1d0
[94415.821573] delete_from_page_cache+0x58/0xd8
[94415.826451] truncate_inode_page+0x30/0x48
[94415.831037] shmem_undo_range+0x2c8/0x668
[94415.835523] shmem_truncate_range+0x20/0x40
[94415.840203] drm_gem_shmem_purge_locked+0x9c/0x100
[94415.845563] panfrost_gem_shrinker_scan+0x17c/0x1d0 [panfrost]
[94415.852082] do_shrink_slab+0x174/0x408
[94415.856364] shrink_slab+0xc8/0x308
[94415.860257] shrink_node+0x2dc/0x758
[94415.864247] balance_pgdat+0x350/0x5a8
[94415.868432] kswapd+0x200/0x530
[94415.871939] kthread+0x16c/0x170
[94415.875542] ret_from_fork+0x10/0x18
```
```
commit 7030c01bb6acab21b4e6271e973dac5de137ca59
Author: Your Name <you@example.com>
Date: Tue Jan 26 16:59:42 2021 -0800
LOCAL: panfrost: tolerate missing regulator control (v5.10.10)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 8ab025d0035f..d3aea7a8ee6c 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -103,8 +103,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
ret = PTR_ERR(opp_table);
/* Continue if the optional regulator is missing */
if (ret != -ENODEV) {
- DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
- goto err_fini;
+ DRM_DEV_ERROR(dev, "Couldn't set OPP regulators, proceeding anyways\n");
+ //goto err_fini;
}
} else {
pfdevfreq->regulators_opp_table = opp_table;
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index bf7c34cfb84c..26b50f43d8fe 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -104,9 +104,10 @@ static int panfrost_regulator_init(struct panfrost_device *pfdev)
pfdev->regulators);
if (ret < 0) {
if (ret != -EPROBE_DEFER)
- dev_err(pfdev->dev, "failed to get regulators: %d\n",
+ dev_err(pfdev->dev, "failed to get regulator(s), proceeding anyways: %d\n",
ret);
- return ret;
+ //return ret;
+ return 0;
}
ret = regulator_bulk_enable(pfdev->comp->num_supplies,
```https://gitlab.freedesktop.org/panfrost/linux/-/issues/6Panfrost driver excessive output in logs.2022-07-06T18:50:03ZdevelrooPanfrost driver excessive output in logs.I am not sure if this is the default behaviour for panfrost but it is starting to get annoying because the constant messages in the logs are swamping out everything else. Here is a short example of dmesg with timestamps.
```
dmesg -T|t...I am not sure if this is the default behaviour for panfrost but it is starting to get annoying because the constant messages in the logs are swamping out everything else. Here is a short example of dmesg with timestamps.
```
dmesg -T|tail -n 100
[Sat Jan 23 16:03:08 2021] Purging 552960 bytes
[Sat Jan 23 16:03:08 2021] Purging 4464640 bytes
[Sat Jan 23 16:03:08 2021] Purging 8454144 bytes
[Sat Jan 23 16:03:08 2021] Purging 876544 bytes
[Sat Jan 23 16:03:08 2021] Purging 528384 bytes
[Sat Jan 23 16:03:08 2021] Purging 524288 bytes
[Sat Jan 23 16:03:08 2021] Purging 524288 bytes
[Sat Jan 23 16:03:08 2021] Purging 8523776 bytes
[Sat Jan 23 16:03:08 2021] Purging 561152 bytes
[Sat Jan 23 16:04:29 2021] panfrost_gem_shrinker_scan: 1 callbacks suppressed
[Sat Jan 23 16:04:29 2021] Purging 8421376 bytes
[Sat Jan 23 16:04:29 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:29 2021] Purging 4259840 bytes
[Sat Jan 23 16:04:30 2021] Purging 561152 bytes
[Sat Jan 23 16:04:30 2021] Purging 4276224 bytes
[Sat Jan 23 16:04:30 2021] Purging 892928 bytes
[Sat Jan 23 16:04:30 2021] Purging 8519680 bytes
[Sat Jan 23 16:04:30 2021] Purging 532480 bytes
[Sat Jan 23 16:04:30 2021] Purging 262144 bytes
[Sat Jan 23 16:04:30 2021] Purging 8388608 bytes
[Sat Jan 23 16:04:42 2021] Purging 561152 bytes
[Sat Jan 23 16:04:43 2021] Purging 4210688 bytes
[Sat Jan 23 16:04:43 2021] Purging 4194304 bytes
[Sat Jan 23 16:04:43 2021] Purging 8388608 bytes
[Sat Jan 23 16:04:44 2021] Purging 561152 bytes
[Sat Jan 23 16:04:44 2021] Purging 8380416 bytes
[Sat Jan 23 16:04:44 2021] Purging 8474624 bytes
[Sat Jan 23 16:04:44 2021] Purging 598016 bytes
[Sat Jan 23 16:04:44 2021] Purging 8794112 bytes
[Sat Jan 23 16:04:44 2021] Purging 135168 bytes
[Sat Jan 23 16:04:47 2021] panfrost_gem_shrinker_scan: 12 callbacks suppressed
[Sat Jan 23 16:04:47 2021] Purging 561152 bytes
[Sat Jan 23 16:04:47 2021] Purging 8519680 bytes
[Sat Jan 23 16:04:47 2021] Purging 4345856 bytes
[Sat Jan 23 16:04:47 2021] Purging 4259840 bytes
[Sat Jan 23 16:04:48 2021] Purging 4272128 bytes
[Sat Jan 23 16:04:48 2021] Purging 888832 bytes
[Sat Jan 23 16:04:48 2021] Purging 532480 bytes
[Sat Jan 23 16:04:48 2021] Purging 8523776 bytes
[Sat Jan 23 16:04:49 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:49 2021] Purging 679936 bytes
[Sat Jan 23 16:04:52 2021] panfrost_gem_shrinker_scan: 33 callbacks suppressed
[Sat Jan 23 16:04:52 2021] Purging 8462336 bytes
[Sat Jan 23 16:04:53 2021] Purging 536576 bytes
[Sat Jan 23 16:04:53 2021] Purging 262144 bytes
[Sat Jan 23 16:04:53 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:53 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:53 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:53 2021] Purging 8392704 bytes
[Sat Jan 23 16:04:53 2021] Purging 692224 bytes
[Sat Jan 23 16:04:53 2021] Purging 8658944 bytes
[Sat Jan 23 16:04:53 2021] Purging 4276224 bytes
[Sat Jan 23 16:05:09 2021] panfrost_gem_shrinker_scan: 7 callbacks suppressed
[Sat Jan 23 16:05:09 2021] Purging 569344 bytes
[Sat Jan 23 16:05:09 2021] Purging 8372224 bytes
[Sat Jan 23 16:05:10 2021] Purging 8372224 bytes
[Sat Jan 23 16:05:12 2021] Purging 8409088 bytes
[Sat Jan 23 16:05:22 2021] Purging 4411392 bytes
[Sat Jan 23 16:05:22 2021] Purging 1028096 bytes
[Sat Jan 23 16:05:22 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:22 2021] Purging 4468736 bytes
[Sat Jan 23 16:05:23 2021] Purging 598016 bytes
[Sat Jan 23 16:05:23 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:23 2021] Purging 823296 bytes
[Sat Jan 23 16:05:23 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:24 2021] Purging 4276224 bytes
[Sat Jan 23 16:05:24 2021] Purging 8470528 bytes
[Sat Jan 23 16:05:27 2021] panfrost_gem_shrinker_scan: 18 callbacks suppressed
[Sat Jan 23 16:05:27 2021] Purging 552960 bytes
[Sat Jan 23 16:05:27 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:27 2021] Purging 532480 bytes
[Sat Jan 23 16:05:27 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:27 2021] Purging 4407296 bytes
[Sat Jan 23 16:05:28 2021] Purging 196608 bytes
[Sat Jan 23 16:05:28 2021] Purging 8392704 bytes
[Sat Jan 23 16:05:28 2021] Purging 8388608 bytes
[Sat Jan 23 16:05:28 2021] Purging 557056 bytes
[Sat Jan 23 16:05:28 2021] Purging 4403200 bytes
[Sat Jan 23 16:05:59 2021] panfrost_gem_shrinker_scan: 15 callbacks suppressed
[Sat Jan 23 16:05:59 2021] Purging 4907008 bytes
[Sat Jan 23 16:05:59 2021] Purging 5099520 bytes
[Sat Jan 23 16:05:59 2021] Purging 720896 bytes
[Sat Jan 23 16:05:59 2021] Purging 524288 bytes
[Sat Jan 23 16:05:59 2021] Purging 8658944 bytes
[Sat Jan 23 16:05:59 2021] Purging 8523776 bytes
[Sat Jan 23 16:05:59 2021] Purging 4530176 bytes
[Sat Jan 23 16:05:59 2021] Purging 4534272 bytes
[Sat Jan 23 16:05:59 2021] Purging 589824 bytes
[Sat Jan 23 16:05:59 2021] Purging 8519680 bytes
[Sat Jan 23 16:06:53 2021] panfrost_gem_shrinker_scan: 7 callbacks suppressed
[Sat Jan 23 16:06:53 2021] Purging 8372224 bytes
[Sat Jan 23 16:06:53 2021] Purging 4362240 bytes
[Sat Jan 23 16:06:53 2021] Purging 4276224 bytes
[Sat Jan 23 16:06:53 2021] Purging 8454144 bytes
[Sat Jan 23 16:06:53 2021] Purging 729088 bytes
[Sat Jan 23 16:06:53 2021] Purging 8650752 bytes
[Sat Jan 23 16:06:53 2021] Purging 270336 bytes
[Sat Jan 23 16:06:53 2021] Purging 69632 bytes
[Sat Jan 23 16:06:54 2021] Purging 4300800 bytes
[Sat Jan 23 16:06:54 2021] Purging 991232 bytes
```
I don't see any options for the module to make this less 'chatty' and I don't quite know what all this profiling info is for but surely it does not need to be output several times a second, does it?
FTR I am on a Pinebook Pro, running Debian 10 with kernel:
5.7.0-2-pinebookpro-arm64 #1 SMP PREEMPT Wed Jan 13 03:22:56 UTC 2021 aarch64 GNU/Linux
Any suggestions how to make it less verbose?
Thanks in advance.https://gitlab.freedesktop.org/panfrost/linux/-/issues/5Severe problems with devfreq on linux 5.9.92022-07-06T18:50:03Zas400lSevere problems with devfreq on linux 5.9.9There are problems with linux 5.9.9 panfrost driver. It reports strange frequencies and gets stuck either on 200MHz or 800MHz and does not scale.
`cat /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/available_frequencies
3472328...There are problems with linux 5.9.9 panfrost driver. It reports strange frequencies and gets stuck either on 200MHz or 800MHz and does not scale.
`cat /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/available_frequencies
3472328296228218214 7094142619989800238 3472328296365385280 499974192 600000000 800000000`
The kernel log reports below:
` [ 18.139041] devfreq ff9a0000.gpu: Couldn't update frequency transition information.`https://gitlab.freedesktop.org/panfrost/linux/-/issues/4The screen shows glitches and corruption with Panfrost and Mali-T8202022-07-06T19:03:42ZJian-Hong PanThe screen shows glitches and corruption with Panfrost and Mali-T820We have a khadas VIM2 board equipped with Amlogic S912 and Mali-T820MP3. We tested mainline kernel 5.7 on it. System gets into GNOME 3 desktop environment, and the Panfrost is loaded. However, the screen gets glitches and corruption.
...We have a khadas VIM2 board equipped with Amlogic S912 and Mali-T820MP3. We tested mainline kernel 5.7 on it. System gets into GNOME 3 desktop environment, and the Panfrost is loaded. However, the screen gets glitches and corruption.
![DSC_2682](/uploads/01e5ac8c4585631ef2d7de28ab60d575/DSC_2682.JPG)
Kernel also keeps showing error and information like:
```
[ 43.415528] Purging 8675328 bytes
[ 78.151868] panfrost d00c0000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x3be5a00, tail=0x3be5a00
[ 78.156102] panfrost d00c0000.gpu: gpu sched timeout, js=0, config=0x3301, status=0x58, head=0x3be5a00, tail=0x3be5a00, sched_job=00000000d13bf1d8
[ 85.206375] Purging 561152 bytes
[ 85.225706] Purging 8658944 bytes
[ 87.160473] Purging 8388608 bytes
[ 87.185128] Purging 8888320 bytes
...
[ 132.608689] panfrost_gem_shrinker_scan: 24 callbacks suppressed
```
[dmesg.log](/uploads/15121566129d6d5d692b912738908cc8/dmesg.log)https://gitlab.freedesktop.org/panfrost/linux/-/issues/3Status of panfrost driver?2022-07-06T19:03:42ZLeebreStatus of panfrost driver?Hi, I know this isn't really an 'issue', but I am interested in the panfrost driver and curious as to what the current status is? I read somewhere that it isn't 'ready for general use' yet - is that true? I tried the version that is incl...Hi, I know this isn't really an 'issue', but I am interested in the panfrost driver and curious as to what the current status is? I read somewhere that it isn't 'ready for general use' yet - is that true? I tried the version that is included in the Linux kernel on my armv7 Chromebook C201 (running Parabola GNU/Linux, X11) and it seemed to cause X to crash quite frequently.
If it is true that it is not yet fully stable, can I ask what is the best way to get updates on the status of the project?
Thanks for all the great work you are doing to liberate these devices! :-)https://gitlab.freedesktop.org/panfrost/linux/-/issues/2Orange Pi 3/H6 Desktop crash when installing panfrost2024-01-22T14:51:32ZNicoDOrange Pi 3/H6 Desktop crash when installing panfrostHi.
For some time I've been trying to get panfrost to work on the Orange Pi 3 with AllWinner H6 SoC.
This with Armbian Bionic kernel 5.4
When I succesfully install panfrost, and reboot the system. Then the desktop crashes at boot.
Som...Hi.
For some time I've been trying to get panfrost to work on the Orange Pi 3 with AllWinner H6 SoC.
This with Armbian Bionic kernel 5.4
When I succesfully install panfrost, and reboot the system. Then the desktop crashes at boot.
Sometimes it's just a black screen. Sometimes I still see the desktop but everything is frozen. And then another time the mouse pointer still could move, and after a while I got a screen full of error messages. See attached file.
I've also got a thread in the Armbian forum about this.
https://forum.armbian.com/topic/12516-unable-to-make-panfrost-work-on-h6/?tab=comments#comment-95553
I hope this can be resolved, thank you for all the great work.
Greetings. NicoD
![DSCN6115](/uploads/4dc58b78688296a8f7edf0e8f0782ac4/DSCN6115.JPG)https://gitlab.freedesktop.org/panfrost/ShaderProgramDisassembler/-/issues/1Can we create a database that disassemble OpenGL CTS /OpenCL CTS compiled bin...2018-07-11T16:53:02ZYonggang LuoCan we create a database that disassemble OpenGL CTS /OpenCL CTS compiled binaries:) For T760.I have RK3399 for testing/doing the things:) But we may need an centric place to storage those things:)
Maybe a repository or something?I have RK3399 for testing/doing the things:) But we may need an centric place to storage those things:)
Maybe a repository or something?https://gitlab.freedesktop.org/panfrost/panloader/-/issues/1Determining IS_64_SEPERATE_SYMBOL2018-05-26T14:52:04ZAlyssa RosenzweigDetermining IS_64_SEPERATE_SYMBOLFor context, `open`/`open64` as well as `mmap`/`mmap64` are sometimes seperate pairs of functions but sometimes are just aliased with the preprocessor. A given build of panwrap needs to know this correctly, or otherwise it will either:
...For context, `open`/`open64` as well as `mmap`/`mmap64` are sometimes seperate pairs of functions but sometimes are just aliased with the preprocessor. A given build of panwrap needs to know this correctly, or otherwise it will either:
- Not compile at all, due to duplicate symbols
- Compile but not trace anything, since it binds the wrong function
The current test in meson is broken. At some point (i.e. before Bifrost), this will need to be fixed.
I suspect a simple check for a 64-bit host may be enough, at least for glibc builds. No idea what bionic does at this point.