mbox series

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

Message ID 20190801022517.1903-1-gurchetansingh@chromium.org (mailing list archive)
Headers show
Series udmabuf guest <--> host interaction model | expand

Message

Gurchetan Singh Aug. 1, 2019, 2:25 a.m. UTC
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(-)