-
Notifications
You must be signed in to change notification settings - Fork 5k
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
drm/vc4: Rework UPM allocation to avoid double buffering #6385
Conversation
3c45267
to
21bec0f
Compare
The previous UPM allocation was done per plane state, when there is no overlap of usage between frames. Allocate per plane, and only change the allocation if the required size changes. We have to reference count as plane states can be duplicated. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This reverts commit c7b98a6.
LBM is only relevant for each active dlist, so there is no need to double-buffer the allocations. Cache the allocations per plane so that we can ensure the allocations are possible. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
21bec0f
to
50e3301
Compare
Seeing as it is userspace that creates the state and commit that is validated, drop the log messages to debug to avoid userspace being able to totally spam the kernel log. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
These patches are now cleanly rejecting commits that exceed LBM or UPM limits. We reuse the allocations if they are of the same size as the previous user of the plane, but will allocate a new buffer when it changes (that will double buffer, but it is a relatively rare event to have significant changes). Probably hold off merging until the stable image has been bumped, but review comments welcome. |
FYI: I've been running this version for a while now and everything seems to work nicely even when giving it quite a beating by shuffling a lot of DRM planes around. |
Any objections to merging now? |
Great. Thanks for testing.
Assuming all the apt updating is done and we're happy, then go for it. |
Given that the last release included a cherry-pick, I think we're essentially past the freeze point. |
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
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
The previous UPM allocation was done per plane state, when there is no overlap of usage between frames.
Allocate per plane, and only change the allocation if the required size changes. We have to reference count as plane states can be duplicated.