diff options
author | Maxime Ripard <maxime@cerno.tech> | 2020-12-04 18:11:32 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2020-12-15 13:33:08 +0300 |
commit | ddadd40892f31a6653cf104e274f7d2ae764eabb (patch) | |
tree | a2bce041f5b789cfe67dab749677b62769a0b995 /drivers/video | |
parent | ae75a0431f822273ce5d3a574863c67503db5775 (diff) | |
download | linux-ddadd40892f31a6653cf104e274f7d2ae764eabb.tar.xz |
drm: Introduce an atomic_commit_setup function
Private objects storing a state shared across all CRTCs need to be
carefully handled to avoid a use-after-free issue.
The proper way to do this to track all the commits using that shared
state and wait for the previous commits to be done before going on with
the current one to avoid the reordering of commits that could occur.
However, this commit setup needs to be done after
drm_atomic_helper_setup_commit(), because before the CRTC commit
structure hasn't been allocated before, and before the workqueue is
scheduled, because we would be potentially reordered already otherwise.
That means that drivers currently have to roll their own
drm_atomic_helper_commit() function, even though it would be identical
if not for the commit setup.
Let's introduce a hook to do so that would be called as part of
drm_atomic_helper_commit, allowing us to reuse the atomic helpers.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201204151138.1739736-2-maxime@cerno.tech
Diffstat (limited to 'drivers/video')
0 files changed, 0 insertions, 0 deletions