dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/7] Add virtio gpu userptr support
@ 2025-02-28  5:36 Honglei Huang
  2025-02-28  5:36 ` [PATCH v1 1/7] virtio-gpu api: add blob userptr resource Honglei Huang
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Honglei Huang @ 2025-02-28  5:36 UTC (permalink / raw)
  To: David Airlie, Gerd Hoffmann, Gurchetan Singh, Chia-I Wu,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Simona Vetter, Rob Clark, Huang Rui
  Cc: dri-devel, virtualization, linux-kernel, Demi Marie Obenour,
	Dmitry Osipenko, Honglei Huang

From: Honglei Huang <Honglei1.Huang@amd.com>

Hello,

This series add virtio gpu userptr support and add libhsakmt capset.
The userptr feature is used for let host access guest user space memory,
this feature is used for GPU compute use case, to enable ROCm/OpenCL native
context. It should be pointed out that we are not to implement SVM here, 
this is just a buffer based userptr implementation.
The libhsakmt capset is used for ROCm context, libhsakmt is like the role 
of libdrm in Mesa.

Patches 1-2 add libhsakmt capset and userptr blob resource flag.
Patches 3-5 implement basic userptr feature, in some popular bench marks,
it has an efficiency of about 70% compared to bare metal in OpenCL API.
Patche 6 adds interval tree.
Patche 7 adds MMU notifier, let UMD do not need to manage userptr and
increase efficiency by 20% to 30%. With this patch, OpenCL in ROCm can
achieve 95%+ efficiency compared to bare metal in some popular bench marks.

Honglei Huang (7):
  virtio-gpu api: add blob userptr resource
  drm/virtgpu api: add blob userptr resource
  drm/virtio: implement userptr: probe for the feature
  drm/virtio: implement userptr: add userptr obj
  drm/virtio: advertise base userptr feature to userspace
  drm/virtio: implement userptr: add interval tree
  drm/virtio: implement userptr: add mmu notifier

 drivers/gpu/drm/virtio/Makefile          |   3 +-
 drivers/gpu/drm/virtio/virtgpu_debugfs.c |   1 +
 drivers/gpu/drm/virtio/virtgpu_drv.c     |   1 +
 drivers/gpu/drm/virtio/virtgpu_drv.h     |  91 +++
 drivers/gpu/drm/virtio/virtgpu_ioctl.c   |  22 +-
 drivers/gpu/drm/virtio/virtgpu_kms.c     |  10 +-
 drivers/gpu/drm/virtio/virtgpu_object.c  |   5 +
 drivers/gpu/drm/virtio/virtgpu_userptr.c | 766 +++++++++++++++++++++++
 include/uapi/drm/virtgpu_drm.h           |   5 +-
 include/uapi/linux/virtio_gpu.h          |   7 +
 10 files changed, 905 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/virtio/virtgpu_userptr.c

-- 
2.34.1


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

end of thread, other threads:[~2025-03-30 11:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28  5:36 [PATCH v1 0/7] Add virtio gpu userptr support Honglei Huang
2025-02-28  5:36 ` [PATCH v1 1/7] virtio-gpu api: add blob userptr resource Honglei Huang
2025-02-28 21:21   ` Demi Marie Obenour
2025-03-06 10:51     ` Huang, Honglei1
2025-03-18  1:37       ` Gurchetan Singh
2025-03-18 11:25         ` Huang, Honglei1
2025-03-24  2:44           ` Huang, Honglei1
2025-03-26 14:46       ` Dmitry Osipenko
2025-03-27  3:00         ` Huang, Honglei1
2025-03-28  1:39           ` Dmitry Osipenko
2025-03-29 19:50         ` Demi Marie Obenour
2025-03-30 11:57           ` Dmitry Osipenko
2025-02-28  5:36 ` [PATCH v1 2/7] drm/virtgpu " Honglei Huang
2025-02-28  5:36 ` [PATCH v1 3/7] drm/virtio: implement userptr: probe for the feature Honglei Huang
2025-02-28  5:36 ` [PATCH v1 4/7] drm/virtio: implement userptr: add userptr obj Honglei Huang
2025-02-28  5:36 ` [PATCH v1 5/7] drm/virtio: advertise base userptr feature to userspace Honglei Huang
2025-02-28  5:36 ` [PATCH v1 6/7] drm/virtio: implement userptr: add interval tree Honglei Huang
2025-02-28  5:36 ` [PATCH v1 7/7] drm/virtio: implement userptr: add mmu notifier Honglei Huang

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).