Open cratonica opened 2 years ago
The vcsm-cma kernel driver doesn't support changing the caching mode, hence the comment. IIRC all mappings are uncached.
The simplest answer is to make it call vcsm_lock
, and return a fixed result in cache_result
.
Describe the bug Calling vcsm_lock_cache on a system without /dev/vcsm (the legacy driver), which therefore uses /dev/vcsm-cma fails to lock shared CPU/GPU memory and prints out:
usrvcsm: [vcsm_lock_cache]: IMPLEMENT ME
This message originates from https://github.com/raspberrypi/userland/blob/master/host_applications/linux/libs/sm/user-vcsm.c#L1463
To reproduce Run a program that attempts to make this call using the noted system configuration. I compiled userland at HEAD this morning.
Expected behaviour It should lock the memory and allow me to access it from the CPU as it does with /dev/vcsm
Actual behaviour It fails saying it is unimplemented
System Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
Which model of Raspberry Pi? Pi Zero 2 W
Which OS and version (
cat /etc/rpi-issue
)? Raspberry Pi reference 2022-01-28 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f01430c9d8f67a4b9719cc00e74a2079d3834d5d, stage4Which firmware version (
vcgencmd version
)?Jan 20 2022 13:59:16 Copyright (c) 2012 Broadcom version bd88f66f8952d34e4e0613a85c7a6d3da49e13e2 (clean) (release) (start_x)
uname -a
)? Linux raspberrypi 5.10.92-v7+ #1514 SMP Mon Jan 17 17:36:39 GMT 2022 armv7l GNU/LinuxLogs If applicable, add the relevant output from
dmesg
or similar.Additional context Add any other relevant context for the problem.