raspberrypi / utils

A collection of scripts and simple applications
BSD 3-Clause "New" or "Revised" License
156 stars 50 forks source link

vclog: Also try /dev/vc-mem for DMA copy #36

Closed pelwell closed 11 months ago

pelwell commented 11 months ago

Allow for the fact that the dma_memcpy support may be provided by the vc_mem driver.

pelwell commented 11 months ago

https://github.com/raspberrypi/linux/pull/5651 is the corresponding kernel change.

timg236 commented 11 months ago

Does this work on Pi5 if there are no framebuffers? i.e. headless with max_framebuffers=0 ?

pelwell commented 11 months ago

This change (along with the kernel patch) is designed specifically for the no framebuffer case. However, Pi 5 is a bit special:

The result is that the log appears, but at the cost of a logged kernel error:

[   30.137022] vc_mem_copy: invalid memory access 3ff16000 (fdb00000-ffc00000)

I think this patch in itself is fine, but the vc-mem driver should be modified to fail (or just memcpy) on non-2710 platforms.

timg236 commented 11 months ago

Yes, that makes sense.

pelwell commented 11 months ago

On that basis I'm going to merge this and revisit the vc_mem patch.

popcornmix commented 11 months ago

@XECDesign would be good to get this into RPiOS image soon. Currently vclog is broken on Pi2/Pi3. We also need a kernel bump, but it's safe to update this first.

XECDesign commented 11 months ago

Should be available in apt now