Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcsm_lock_cache not implemented for /dev/vcsm-cma #720

Open
cratonica opened this issue Mar 6, 2022 · 1 comment
Open

vcsm_lock_cache not implemented for /dev/vcsm-cma #720

cratonica opened this issue Mar 6, 2022 · 1 comment

Comments

@cratonica
Copy link

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, stage4

  • Which firmware version (vcgencmd version)?

Jan 20 2022 13:59:16
Copyright (c) 2012 Broadcom
version bd88f66f8952d34e4e0613a85c7a6d3da49e13e2 (clean) (release) (start_x)

  • Which kernel version (uname -a)?
    Linux raspberrypi 5.10.92-v7+ #1514 SMP Mon Jan 17 17:36:39 GMT 2022 armv7l GNU/Linux

Logs
If applicable, add the relevant output from dmesg or similar.

Additional context
Add any other relevant context for the problem.

@6by9
Copy link
Contributor

6by9 commented Mar 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants