[RFC 0/6] udmabuf guest <--> host interaction model

Gurchetan Singh gurchetansingh at chromium.org
Thu Aug 1 02:25:11 UTC 2019


It's desirable to use zero-copy mechanisms when using various graphics
buffers. With udmabuf, two cases come to mind:

1) Directly scan-out a guest-mapped buffer
2) Import into VK with VK_EXT_external_memory_dma_buf

However, displays are not generally coherent with the CPU and many
GPUs aren't either.  So we need to map write-combine in the guest.
One way to achieve this is to synchronize on the host.

[warning] -- only compile tested at this point to get feedback

Gurchetan Singh (6):
  udmabuf: use cache_sgt_mapping option
  udmabuf: add ability to set access flags on udmabuf
  udmabuf: enforce access flags
  udmabuf: add a pointer to the miscdevice in dma-buf private data
  udmabuf: separate out creating/destroying scatter-table
  udmabuf: implement begin_cpu_access/end_cpu_access hooks

 drivers/dma-buf/udmabuf.c    | 103 +++++++++++++++++++++++++++++------
 include/uapi/linux/udmabuf.h |   5 +-
 2 files changed, 90 insertions(+), 18 deletions(-)

-- 
2.17.1



More information about the dri-devel mailing list