[Intel-gfx] [PATCH 00/15] implicit fencing/dma-resv rules for shared buffers

Daniel Vetter daniel.vetter at ffwll.ch
Tue Jun 22 16:54:56 UTC 2021


Hi all,

After many bits have been spilled on dri-devel discussion this I think
we're converging on a consensus understanding of where we are, and it's
time to resubmit patches.

This is essentially v2 of

https://lore.kernel.org/dri-devel/20210521090959.1663703-7-daniel.vetter@ffwll.ch/

but a lot has changed:

- Christian fixed up amdgpu with a much more competent patch.

- I used the entire audit I've done in that patch to instead improve the
  documentation. That's the first 3 patches.

- panfrost patches fixed (hopefully, testing would be appreciated)

- drm/tiny patch fixed

- I've also thrown an RFC on top at the end for what I think amdgpu should
  be doing. Probably really, really buggy, so beware :-)

Review on the entire pile except the very last RFC very much appreciated.

Note that this does not, by far, fix all the various issues in handling
dma_buf.resv fences. This is just the part I had mostly ready already, and
which didn't take long to refresh and rebase. The other part is checking
whether drivers do anything funny that breaks the cross driver contract in
how they handle dependencies the get from the dma_buf.resv. I know they
do, but the full audit is not yet done.

Cheers, Daniel

Daniel Vetter (15):
  dma-resv: Fix kerneldoc
  dma-buf: Switch to inline kerneldoc
  dma-buf: Document dma-buf implicit fencing/resv fencing rules
  drm/panfrost: Shrink sched_lock
  drm/panfrost: Use xarray and helpers for depedency tracking
  drm/panfrost: Fix implicit sync
  drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default
  drm/<driver>: drm_gem_plane_helper_prepare_fb is now the default
  drm/armada: Remove prepare/cleanup_fb hooks
  drm/vram-helpers: Create DRM_GEM_VRAM_PLANE_HELPER_FUNCS
  drm/omap: Follow implicit fencing in prepare_fb
  drm/simple-helper: drm_gem_simple_display_pipe_prepare_fb as default
  drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default
  drm/gem: Tiny kernel clarification for drm_gem_fence_array_add
  RFC: drm/amdgpu: Implement a proper implicit fencing uapi

 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   7 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  21 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |   6 +
 drivers/gpu/drm/armada/armada_overlay.c       |   2 -
 drivers/gpu/drm/armada/armada_plane.c         |  29 ----
 drivers/gpu/drm/armada/armada_plane.h         |   2 -
 drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c      |   1 -
 drivers/gpu/drm/ast/ast_mode.c                |   3 +-
 drivers/gpu/drm/drm_atomic_helper.c           |  10 ++
 drivers/gpu/drm/drm_gem.c                     |   3 +
 drivers/gpu/drm/drm_gem_atomic_helper.c       |   3 +
 drivers/gpu/drm/drm_simple_kms_helper.c       |  12 +-
 drivers/gpu/drm/gud/gud_drv.c                 |   1 -
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_de.c    |   3 +-
 drivers/gpu/drm/imx/dcss/dcss-plane.c         |   1 -
 drivers/gpu/drm/imx/ipuv3-plane.c             |   1 -
 drivers/gpu/drm/ingenic/ingenic-drm-drv.c     |   1 -
 drivers/gpu/drm/ingenic/ingenic-ipu.c         |   1 -
 drivers/gpu/drm/mcde/mcde_display.c           |   1 -
 drivers/gpu/drm/mediatek/mtk_drm_plane.c      |   1 -
 drivers/gpu/drm/meson/meson_overlay.c         |   1 -
 drivers/gpu/drm/meson/meson_plane.c           |   1 -
 drivers/gpu/drm/mxsfb/mxsfb_kms.c             |   2 -
 drivers/gpu/drm/omapdrm/omap_plane.c          |   3 +
 drivers/gpu/drm/panfrost/panfrost_drv.c       |  41 +++--
 drivers/gpu/drm/panfrost/panfrost_job.c       |  71 ++++-----
 drivers/gpu/drm/panfrost/panfrost_job.h       |   8 +-
 drivers/gpu/drm/pl111/pl111_display.c         |   1 -
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |   1 -
 drivers/gpu/drm/stm/ltdc.c                    |   1 -
 drivers/gpu/drm/sun4i/sun4i_layer.c           |   1 -
 drivers/gpu/drm/sun4i/sun8i_ui_layer.c        |   1 -
 drivers/gpu/drm/sun4i/sun8i_vi_layer.c        |   1 -
 drivers/gpu/drm/tidss/tidss_plane.c           |   1 -
 drivers/gpu/drm/tiny/hx8357d.c                |   1 -
 drivers/gpu/drm/tiny/ili9225.c                |   1 -
 drivers/gpu/drm/tiny/ili9341.c                |   1 -
 drivers/gpu/drm/tiny/ili9486.c                |   1 -
 drivers/gpu/drm/tiny/mi0283qt.c               |   1 -
 drivers/gpu/drm/tiny/repaper.c                |   1 -
 drivers/gpu/drm/tiny/st7586.c                 |   1 -
 drivers/gpu/drm/tiny/st7735r.c                |   1 -
 drivers/gpu/drm/tve200/tve200_display.c       |   1 -
 drivers/gpu/drm/vboxvideo/vbox_mode.c         |   3 +-
 drivers/gpu/drm/xen/xen_drm_front_kms.c       |   1 -
 include/drm/drm_gem_vram_helper.h             |  12 ++
 include/drm/drm_modeset_helper_vtables.h      |   7 +-
 include/drm/drm_simple_kms_helper.h           |   7 +-
 include/linux/dma-buf.h                       | 146 +++++++++++++++---
 include/linux/dma-resv.h                      |   2 +-
 include/uapi/drm/amdgpu_drm.h                 |  10 ++
 51 files changed, 270 insertions(+), 170 deletions(-)

-- 
2.32.0.rc2



More information about the Intel-gfx mailing list