Skip to content

drm: Allow PRIME 'self-import' for all drivers

Thomas Zimmermann dri-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* documentation and TODO cleanups (Simon, Zack)
* small style cleanups

[1] https://lore.kernel.org/dri-devel/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm: Enable PRIME import/export for all driversdrivers/gpu/drm/drm_ioctl.c drivers/gpu/drm/drm_prime.c include/drm/drm_drv.h+15 -211 reply
2/3drm: Clear fd/handle callbacks in struct drm_driverdrivers/accel/ivpu/ivpu_drv.c drivers/accel/qaic/qaic_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +23 more+10 -680 replies
3/3drm/prime: Unexport helpers for fd/handle conversiondrivers/gpu/drm/drm_prime.c include/drm/drm_prime.h+15 -252 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchSimon SerAlex DeucherJeffrey Hugo
1/3R-b A-b R-b
2/3R-b A-b A-b
3/3R-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/3] drm: Allow PRIME 'self-import' for all drivers

Set drm_gem_prime_handle_to_fd() and drm_gem_prime_fd_to_handle() for all DRM drivers. Even drivers that do not support PRIME import or export of dma-bufs can now import their own buffer objects. This is required by some userspace, such as wlroots-based compositors, to share buffers among processes.

The only driver that does not use the drm_gem_prime_*() helpers is vmwgfx. Leave a comment on the callbacks in struct drm_driver, so that no other driver uses them.

Simon Ser implemented the feature for drivers based on GEM VRAM helpers in [1]. This patchset generalizes the code for all drivers that do not otherwise support PRIME. Tested by running sway with gma500 hardware.

v2:
* documentation and TODO cleanups (Simon, Zack)
* small style cleanups

[1] https://lore.kernel.org/dri-devel/[email protected]/

Thomas Zimmermann (3):
drm: Enable PRIME import/export for all drivers
drm: Clear fd/handle callbacks in struct drm_driver drm/prime: Unexport helpers for fd/handle conversion

 drivers/accel/ivpu/ivpu_drv.c                 |  2 -
 drivers/accel/qaic/qaic_drv.c                 |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 --
 drivers/gpu/drm/armada/armada_drv.c           |  2 -
 drivers/gpu/drm/drm_ioctl.c                   |  3 +-
 drivers/gpu/drm/drm_prime.c                   | 67 +++++++++----------
 drivers/gpu/drm/etnaviv/etnaviv_drv.c         |  2 -
 drivers/gpu/drm/exynos/exynos_drm_drv.c       |  2 -
 drivers/gpu/drm/i915/i915_driver.c            |  2 -
 drivers/gpu/drm/lima/lima_drv.c               |  2 -
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |  2 -
 drivers/gpu/drm/msm/msm_drv.c                 |  2 -
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  2 -
 drivers/gpu/drm/omapdrm/omap_drv.c            |  2 -
 drivers/gpu/drm/panfrost/panfrost_drv.c       |  2 -
 drivers/gpu/drm/pl111/pl111_drv.c             |  2 -
 drivers/gpu/drm/qxl/qxl_drv.c                 |  2 -
 drivers/gpu/drm/radeon/radeon_drv.c           |  2 -
 drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c |  2 -
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |  2 -
 drivers/gpu/drm/tegra/drm.c                   |  2 -
 drivers/gpu/drm/v3d/v3d_drv.c                 |  2 -
 drivers/gpu/drm/virtio/virtgpu_drv.c          |  2 -
 drivers/gpu/drm/xen/xen_drm_front.c           |  2 -
 include/drm/drm_drv.h                         | 12 +---
 include/drm/drm_gem_dma_helper.h              |  8 +--
 include/drm/drm_gem_shmem_helper.h            |  4 +-
 include/drm/drm_gem_vram_helper.h             |  8 +--
 include/drm/drm_prime.h                       |  7 --
 29 files changed, 40 insertions(+), 114 deletions(-)

base-commit: 32e260cd0d16cee6f33e747679f168d63ea54bf6

Signature · 1 line
2.41.0