[PATCH v2 0/7] vc4: Convert to drm_atomic_helper_commit

Maxime Ripard
2020-12-04T15:13:29Z

Hi,

Here's a conversion of vc4 to remove the hand-rolled atomic_commit helper from
vc4 in favour of the generic one.

This requires some rework of vc4, but also a new hook and some documentation
for corner-cases in the DRM core that have been reported and explained by
Daniel recently.

Let me know what you think,
Maxime

Changes from v1:
- Addressed the comments from Dave and Thomas on the documentation
- s/last_user/pending_commit/
- Check that the commit is not NULL before waiting on it
- Fixed a compilation error on an intermediate patch
- Drop the assigned_channels variable redundant with the in_use variable

Maxime Ripard (7):
drm: Introduce an atomic_commit_setup function
drm: Document use-after-free gotcha with private objects
drm/vc4: Simplify a bit the global atomic_check
drm/vc4: kms: Wait on previous FIFO users before a commit
drm/vc4: kms: Remove unassigned_channels from the HVS state
drm/vc4: kms: Remove async modeset semaphore
drm/vc4: kms: Convert to atomic helpers

drivers/gpu/drm/drm_atomic_helper.c | 9 +
drivers/gpu/drm/vc4/vc4_crtc.c | 13 --
drivers/gpu/drm/vc4/vc4_drv.h | 2 -
drivers/gpu/drm/vc4/vc4_kms.c | 248 +++++++++++------------
include/drm/drm_atomic.h | 20 ++
include/drm/drm_modeset_helper_vtables.h | 21 ++
6 files changed, 172 insertions(+), 141 deletions(-)