Skip to content

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

Merged
pelwell merged 1 commit into
raspberrypi:masterfrom
pelwell:vcmem_dma
Oct 16, 2023
Merged

pelwell merged 1 commit into
raspberrypi:masterfrom
pelwell:vcmem_dma

Conversation

@pelwell

@pelwell pelwell commented Oct 15, 2023

Copy link
Copy Markdown
Collaborator

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

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell

pelwell commented Oct 15, 2023

Copy link
Copy Markdown
Collaborator Author

raspberrypi/linux#5651 is the corresponding kernel change.

@timg236

timg236 commented Oct 16, 2023

Copy link
Copy Markdown
Contributor

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

@pelwell

pelwell commented Oct 16, 2023

Copy link
Copy Markdown
Collaborator Author

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

  • It has no memory hole, so it as no need for the DMA support.
  • The DMA controller's view of the world is different, so it doesn't need the high address alias bits setting.

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

timg236 commented Oct 16, 2023

Copy link
Copy Markdown
Contributor

Yes, that makes sense.

@pelwell

pelwell commented Oct 16, 2023

Copy link
Copy Markdown
Collaborator Author

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

@pelwell
pelwell merged commit b68d5cb into raspberrypi:master Oct 16, 2023
@popcornmix

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Contributor

Should be available in apt now

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

Successfully merging this pull request may close these issues.

4 participants