[PATCH 00/26] RFC: generic nonblocking support in the atomic helpers

Daniel Vetter daniel.vetter at ffwll.ch
Sun May 29 18:34:57 UTC 2016


Hi all,

So I finally unlazied and implemented generic nonblocking atomic commit support
in the atomic helpers. Still an early draft, but stopped being a fireworks show
on i915 at least. Rockchip still oopses somewhere, virtio conversion is entirely
untested. Same for arc/hdlcd/fsl-du/sun4i. All these untested drivers must be
converted since they've been a bit too lazy in their atomic implementations and
simply didn't bother implementing nonblocking.

The main patch adding the helpers explains the design, I just want to highlight
one key aspect: This code fully relies on correct handling of crtc_state->event,
drivers which don't get this right will fall over. To avoid too much trouble the
helpers all have a 10s timeout, in case of broken drivers. This is both good -
hopefully no more atomic drivers that just outright forget to implement drm
event handling. And also a bit annoying for getting this series in since the
above mentioned 5 atomic drivers all look like they haven't been properly tested
with events.

Stuff left to do:
- Debug at least rockchip&virtio I'd say to make sure it works there flawlessly.
  Would be good to also convert some other drivers.
- Get as much debugging on the other 4 drivers which have to be converted. Otoh
  they already have a broken atomic implementation in-tree, so me.
- Kerneldoc for a bunch of functions is still missing, plus the updated overview
  section for nonblocking commits.
- Bugfixing, but I hope that the helpers themselves are solid now.

Cheers, Daniel

Daniel Vetter (25):
  drm/atomic-helper: use for_each_*_in_state more
  drm/i915: Use drm_atomic_get_existing_plane_state
  drm/msm: Use for_each_*_in_state
  drm/rcar-du: Use for_each_*_in_state
  drm/vc4: Use for_each_plane_in_state
  drm/atomic: Add __drm_atomic_get_current_plane_state
  drm/exynos: Use for_each_crtc_in_state
  drm: Consolidate connector arrays in drm_atomic_state
  drm: Consolidate plane arrays in drm_atomic_state
  drm: Consolidate crtc arrays in drm_atomic_state
  drm/atomic-helper: Massage swap_state signature somewhat
  drm/arc: Nuke event_list
  drm/arc: Actually bother with handling atomic events.
  drm/arc: Implement nonblocking commit correctly
  drm/hdlcd: Use helper support for nonblocking commits
  drm/fsl-du: Implement some semblance of vblank event handling
  drm/hisilicon: Implement some semblance of vblank event handling
  drm/sun4i: Implement some semblance of vblank event handling
  drm/atomic: kerneldoc for drm_atomic_crtc_needs_modeset
  drm/atomic-helper: nonblocking commit support
  drm/i915: Signal drm events for atomic
  drm/i915: Roll out the helper nonblock tracking
  drm/rockchip: convert to helper nonblocking atomic commit
  drm/rockchip: Nuke pending event handling in preclose
  drm/virtio: Don't reinvent a flipping wheel

Gustavo Padovan (1):
  drm/fence: add fence to drm_pending_event

 drivers/gpu/drm/arc/arcpgu.h                    |   1 -
 drivers/gpu/drm/arc/arcpgu_crtc.c               |  19 +-
 drivers/gpu/drm/arc/arcpgu_drv.c                |  27 +-
 drivers/gpu/drm/arm/hdlcd_drv.c                 |   8 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c    |   2 +-
 drivers/gpu/drm/drm_atomic.c                    | 102 +++---
 drivers/gpu/drm/drm_atomic_helper.c             | 421 ++++++++++++++++++++----
 drivers/gpu/drm/drm_crtc.c                      |   3 +
 drivers/gpu/drm/drm_fops.c                      |  22 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c         |  10 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c      |  23 +-
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |  20 +-
 drivers/gpu/drm/i915/intel_atomic.c             |   6 +-
 drivers/gpu/drm/i915/intel_display.c            |  25 +-
 drivers/gpu/drm/i915/intel_sprite.c             |  14 +
 drivers/gpu/drm/mediatek/mtk_drm_drv.c          |   2 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c         |  20 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c        |  10 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c         |  12 +-
 drivers/gpu/drm/msm/msm_atomic.c                |  37 +--
 drivers/gpu/drm/nouveau/nouveau_usif.c          |   1 -
 drivers/gpu/drm/omapdrm/omap_drv.c              |   2 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c           |  10 +-
 drivers/gpu/drm/rcar-du/rcar_du_plane.c         |  20 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c     |  25 --
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h     |  11 -
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c      |  73 +---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c     |  35 +-
 drivers/gpu/drm/sti/sti_drv.c                   |   2 +-
 drivers/gpu/drm/sun4i/sun4i_crtc.c              |  12 +
 drivers/gpu/drm/tegra/drm.c                     |   2 +-
 drivers/gpu/drm/vc4/vc4_crtc.c                  |  11 +-
 drivers/gpu/drm/vc4/vc4_drv.h                   |   2 +-
 drivers/gpu/drm/vc4/vc4_kms.c                   |  12 +-
 drivers/gpu/drm/vc4/vc4_plane.c                 |   5 +-
 drivers/gpu/drm/virtio/virtgpu_display.c        |  48 +--
 include/drm/drmP.h                              |   4 +-
 include/drm/drm_atomic.h                        |  79 ++++-
 include/drm/drm_atomic_helper.h                 |  12 +-
 include/drm/drm_crtc.h                          | 149 ++++++++-
 include/drm/drm_modeset_helper_vtables.h        |  36 ++
 41 files changed, 847 insertions(+), 488 deletions(-)

-- 
2.8.1



More information about the dri-devel mailing list