dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm: Allow PRIME 'self-import' for all drivers
@ 2023-06-15  9:31 Thomas Zimmermann
  2023-06-15  9:31 ` [PATCH 1/3] drm: Enable PRIME import/export " Thomas Zimmermann
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Thomas Zimmermann @ 2023-06-15  9:31 UTC (permalink / raw)
  To: daniel, airlied, mripard, maarten.lankhorst, zackr, contact,
	linux-graphics-maintainer
  Cc: Thomas Zimmermann, dri-devel

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. Once it has been converted, the callbacks in struct drm_driver
can be removed.

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.

[1] https://lore.kernel.org/dri-devel/20230302143502.500661-1-contact@emersion.fr/

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

 Documentation/gpu/todo.rst                    | 14 +++++
 drivers/accel/ivpu/ivpu_drv.c                 |  2 -
 drivers/accel/qaic/qaic_drv.c                 |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  2 -
 drivers/gpu/drm/armada/armada_drv.c           |  2 -
 drivers/gpu/drm/drm_ioctl.c                   |  4 +-
 drivers/gpu/drm/drm_prime.c                   | 62 ++++++++++---------
 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                         |  6 ++
 include/drm/drm_gem_dma_helper.h              | 12 ++--
 include/drm/drm_gem_shmem_helper.h            |  6 +-
 include/drm/drm_gem_vram_helper.h             |  4 +-
 include/drm/drm_prime.h                       |  7 ---
 30 files changed, 62 insertions(+), 96 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-19  8:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15  9:31 [PATCH 0/3] drm: Allow PRIME 'self-import' for all drivers Thomas Zimmermann
2023-06-15  9:31 ` [PATCH 1/3] drm: Enable PRIME import/export " Thomas Zimmermann
2023-06-15 14:47   ` Simon Ser
2023-06-15  9:31 ` [PATCH 2/3] drm: Clear fd/handle callbacks in struct drm_driver Thomas Zimmermann
2023-06-15  9:31 ` [PATCH 3/3] drm/prime: Unexport helpers for fd/handle conversion Thomas Zimmermann
2023-06-15 14:50 ` [PATCH 0/3] drm: Allow PRIME 'self-import' for all drivers Simon Ser
2023-06-15 14:56   ` Thomas Zimmermann
2023-06-16  3:59 ` Zack Rusin
2023-06-16  7:11   ` Thomas Zimmermann
2023-06-16 17:00 ` Jeffrey Hugo
2023-06-19  8:52   ` Thomas Zimmermann
2023-06-16 17:22 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).