drm/vc4: update cursors asynchronously through atomic
Subsystems (3)
PATCH v7 1/1 drm/vc4: update cursors asynchronously through atomic
From: Gustavo Padovan <[email protected]>
Add support for async updates of cursors by using the new atomic interface for that. Basically what this commit does is do what vc4_update_plane() did but through atomic.
v7: Place the drm_atomic_set_fb_for_plane() call after the new
FB has been applied to the HW to avoid possible use-after-free issues
v6: add missing drm_atomic_set_fb_for_plane() in
vc4_plane_atomic_async_update() (Boris Brezillon)
v5: add missing call to vc4_plane_atomic_check() (Eric Anholt)
v4: add drm_atomic_helper_async() commit (Eric Anholt)
v3: move size checks back to drivers (Ville Syrjälä)
v2: move fb setting to core and use new state (Eric Anholt)
--- drivers/gpu/drm/vc4/vc4_kms.c | 20 ++++++ drivers/gpu/drm/vc4/vc4_plane.c | 131 +++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 77 deletions(-)
drivers/gpu/drm/vc4/vc4_kms.c +20 -0
@@ -90,6 +90,26 @@ static int vc4_atomic_commit(struct drm_device *dev,struct vc4_dev *vc4 =to_vc4_dev (dev);int ret; +if (state->async_update) { + ret =down_interruptible (&vc4->async_modeset); +if (ret) +return ret; + + ret =drm_atomic_helper_prepare_planes (dev, state); +if (ret) { +up (&vc4->async_modeset); +return ret; + } + +drm_atomic_helper_async_commit (dev, state); + +drm_atomic_helper_cleanup_planes (dev, state); + +up (&vc4->async_modeset); + +return 0 ; + } + ret =drm_atomic_helper_setup_commit (state, nonblock);if (ret)return ret;
drivers/gpu/drm/vc4/vc4_plane.c +54 -77
155 lines not on this page · raw message
Signature · 6 lines
2.14.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Boris Brezillon
From: Gustavo Padovan <[email protected]>
Add support for async updates of cursors by using the new atomic interface for that. Basically what this commit does is do what
vc4_update_plane()did but through atomic.
My r-b still applies with your fixes here. Go ahead and push when you're ready.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Eric Anholt
[ Unknown signature status ]
Quoted 5 lines · Boris Brezillon
From: Gustavo Padovan <[email protected]>
Add support for async updates of cursors by using the new atomic interface for that. Basically what this commit does is do what
vc4_update_plane()did but through atomic.My r-b still applies with your fixes here. Go ahead and push when you're ready.
I've gone ahead and pushed this patch.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel