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

dts: 2712: Reduce default cma usage on Pi5 #6361

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

popcornmix
Copy link
Collaborator

Significant cma shouldn't really be needed on Pi5 as the hardware blocks support iommu and can access system memory.

We've migrated codec and camera support to system memory, and 3d has always (even on Pi4) used system memory.

A large cma block causes issues with enabling NUMA on a low memory (2G) Pi5, as cma cannot span numa regions.

Significant cma shouldn't really be needed on Pi5 as the hardware
blocks support iommu and can access system memory.

We've migrated codec and camera support to system memory, and 3d
has always (even on Pi4) used system memory.

A large cma block causes issues with enabling NUMA on a low
memory (2G) Pi5, as cma cannot span numa regions.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
@@ -3,7 +3,7 @@
#include "cma-overlay.dts"

&frag0 {
size = <((320-4)*1024*1024)>;
size = <(64*1024*1024)>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that this is a multiple of 64MB means it will not be automatically capped to the platform-limit, but this is way below all the limits so not an issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - I spent a while reading the firmware code and came to same conclusion.

@popcornmix
Copy link
Collaborator Author

I'll leave this here for a while to see if anyone has objections.

I've tested dual 4k desktop use (with 3d active).
Kodi playing 4K hevc videos (desktop and standalone).
libcamera-vid records okay at 4608x2592.

@popcornmix popcornmix marked this pull request as ready for review October 4, 2024 16:57
@popcornmix
Copy link
Collaborator Author

Removed draft tag

@pelwell pelwell merged commit 3edaa38 into raspberrypi:rpi-6.6.y Oct 4, 2024
12 checks passed
@popcornmix popcornmix deleted the pi5_reduce_cma branch October 4, 2024 17:46
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Oct 10, 2024
kernel: dts: 2712: Reduce default cma usage on Pi5
See: raspberrypi/linux#6361

kernel: drm/v3d,vc4: Stop the active perfmon before being destroyed
See: raspberrypi/linux#6401

kernel: mmc: sd: disable sd cqhci by default
See: raspberrypi/linux#6405

kernel: drm/vc4: Rework UPM allocation to avoid double buffering
See: raspberrypi/linux#6385

kernel: dts: bcm2712d0: Add non-d0 vc6 compatible string
See: raspberrypi/linux#6408
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Oct 10, 2024
kernel: dts: 2712: Reduce default cma usage on Pi5
See: raspberrypi/linux#6361

kernel: drm/v3d,vc4: Stop the active perfmon before being destroyed
See: raspberrypi/linux#6401

kernel: mmc: sd: disable sd cqhci by default
See: raspberrypi/linux#6405

kernel: drm/vc4: Rework UPM allocation to avoid double buffering
See: raspberrypi/linux#6385

kernel: dts: bcm2712d0: Add non-d0 vc6 compatible string
See: raspberrypi/linux#6408
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.

2 participants