All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] drm/i915/gvt: dma-buf support for GVT-g
@ 2017-04-28  9:35 ` Xiaoguang Chen
  0 siblings, 0 replies; 70+ messages in thread
From: Xiaoguang Chen @ 2017-04-28  9:35 UTC (permalink / raw)
  To: kraxel, alex.williamson, intel-gfx, intel-gvt-dev, zhi.a.wang,
	zhenyuw, linux-kernel, zhiyuan.lv, kevin.tian
  Cc: Xiaoguang Chen

This patch set adds the dma-buf support for intel GVT-g.
dma-buf is a uniform mechanism to share DMA buffers across different
devices and sub-systems.
dma-buf for intel GVT-g is mainly used to share the vgpu's framebuffer
to other users or sub-systems so they can use the dma-buf to show the
desktop of a vm which uses intel vgpu.

The main idea is we create a gem object and set vgpu's framebuffer as
the backing storage of this gem object. And associate this gem obj
to a dma-buf object then export this dma-buf at the meantime
generate a file descriptor for this dma-buf. Finally deliver this file
descriptor to end users.
In the implementation we create an anonymous fd and send this fd to users
using an vfio device region. Once users get this anonymous fd they can do
ioctl using this anonymous fd to get the file descriptor we generated for
dma-buf.

We have an example program on how to use the dma-buf. You can download
the program to have a try :)
git repo: https://github.com/01org/igvtg-qemu branch:kvmgt_dmabuf_example

Xiaoguang Chen (6):
  drm/i915/gvt: extend the GVT-g architecture to support vfio device
    region
  drm/i915/gvt: OpRegion support for GVT-g
  drm/i915/gvt: framebuffer decoder support for GVT-g
  drm/i915: export i915 dmabuf_ops
  drm/i915/gvt: dmabuf support for GVT-g
  drm/i915/gvt: support QEMU getting the dmabuf

 drivers/gpu/drm/i915/gvt/Makefile      |   3 +-
 drivers/gpu/drm/i915/gvt/display.c     |   2 +-
 drivers/gpu/drm/i915/gvt/display.h     |   2 +
 drivers/gpu/drm/i915/gvt/dmabuf.c      | 268 ++++++++++++++++++
 drivers/gpu/drm/i915/gvt/dmabuf.h      |  50 ++++
 drivers/gpu/drm/i915/gvt/fb_decoder.c  | 487 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/gvt/fb_decoder.h  | 170 ++++++++++++
 drivers/gpu/drm/i915/gvt/gvt.c         |   2 +
 drivers/gpu/drm/i915/gvt/gvt.h         |   4 +
 drivers/gpu/drm/i915/gvt/kvmgt.c       | 227 ++++++++++++++-
 drivers/gpu/drm/i915/gvt/opregion.c    |  12 +-
 drivers/gpu/drm/i915/i915_drv.h        |   2 +
 drivers/gpu/drm/i915/i915_gem_dmabuf.c |   2 +-
 include/uapi/linux/vfio.h              |   1 +
 14 files changed, 1224 insertions(+), 8 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gvt/dmabuf.c
 create mode 100644 drivers/gpu/drm/i915/gvt/dmabuf.h
 create mode 100644 drivers/gpu/drm/i915/gvt/fb_decoder.c
 create mode 100644 drivers/gpu/drm/i915/gvt/fb_decoder.h

-- 
1.9.1

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

end of thread, other threads:[~2017-05-19 10:51 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28  9:35 [RFC PATCH 0/6] drm/i915/gvt: dma-buf support for GVT-g Xiaoguang Chen
2017-04-28  9:35 ` Xiaoguang Chen
2017-04-28  9:35 ` [RFC PATCH 1/6] drm/i915/gvt: extend the GVT-g architecture to support vfio device region Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-04-28  9:35 ` [RFC PATCH 2/6] drm/i915/gvt: OpRegion support for GVT-g Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-04-28  9:35 ` [RFC PATCH 3/6] drm/i915/gvt: framebuffer decoder " Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-04-28  9:35 ` [RFC PATCH 4/6] drm/i915: export i915 dmabuf_ops Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-04-28  9:35 ` [RFC PATCH 5/6] drm/i915/gvt: dmabuf support for GVT-g Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-04-28 10:08   ` [Intel-gfx] " Chris Wilson
2017-04-28 10:08     ` Chris Wilson
2017-05-02  7:40     ` [Intel-gfx] " Chen, Xiaoguang
2017-05-02  7:40       ` Chen, Xiaoguang
2017-05-04  3:12       ` [Intel-gfx] " Chen, Xiaoguang
2017-05-04  3:12         ` Chen, Xiaoguang
2017-05-02  9:37     ` [Intel-gfx] " Gerd Hoffmann
2017-05-02  9:37       ` Gerd Hoffmann
2017-04-28  9:35 ` [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf Xiaoguang Chen
2017-04-28  9:35   ` Xiaoguang Chen
2017-05-02  9:50   ` Gerd Hoffmann
2017-05-02  9:50     ` Gerd Hoffmann
2017-05-03  1:39     ` Chen, Xiaoguang
2017-05-03  1:39       ` Chen, Xiaoguang
2017-05-04  3:09       ` Chen, Xiaoguang
2017-05-04  3:09         ` Chen, Xiaoguang
2017-05-04 16:08         ` Alex Williamson
2017-05-04 16:08           ` Alex Williamson
2017-05-05  6:55           ` Gerd Hoffmann
2017-05-05  6:55             ` Gerd Hoffmann
2017-05-05 15:11             ` Alex Williamson
2017-05-05 15:11               ` Alex Williamson
2017-05-11  8:45               ` Chen, Xiaoguang
2017-05-11  8:45                 ` Chen, Xiaoguang
2017-05-11 13:27                 ` Gerd Hoffmann
2017-05-11 13:27                   ` Gerd Hoffmann
2017-05-11 15:45                   ` Alex Williamson
2017-05-11 15:45                     ` Alex Williamson
2017-05-12  2:12                     ` Chen, Xiaoguang
2017-05-12  2:12                       ` Chen, Xiaoguang
2017-05-12  2:58                       ` Alex Williamson
2017-05-12  2:58                         ` Alex Williamson
2017-05-12  3:52                         ` Chen, Xiaoguang
2017-05-12  3:52                           ` Chen, Xiaoguang
2017-05-12  9:12                         ` Gerd Hoffmann
2017-05-12  9:12                           ` Gerd Hoffmann
2017-05-12 16:38                           ` Alex Williamson
2017-05-12 16:38                             ` Alex Williamson
2017-05-15  3:36                             ` Chen, Xiaoguang
2017-05-15  3:36                               ` Chen, Xiaoguang
2017-05-15 17:44                               ` Alex Williamson
2017-05-15 17:44                                 ` Alex Williamson
2017-05-16 10:16                                 ` Chen, Xiaoguang
2017-05-17 21:43                                   ` Alex Williamson
2017-05-18  1:51                                     ` Chen, Xiaoguang
2017-05-18 14:56                                       ` Alex Williamson
2017-05-19  6:23                                         ` Chen, Xiaoguang
2017-05-19  8:04                                         ` Gerd Hoffmann
2017-05-19  8:17                                           ` Chen, Xiaoguang
2017-05-19  8:57                                             ` Gerd Hoffmann
2017-05-19  9:14                                               ` Chen, Xiaoguang
2017-05-19 10:51                                                 ` Gerd Hoffmann
2017-05-18  6:22                                     ` Gerd Hoffmann
2017-05-12  6:56                   ` Chen, Xiaoguang
2017-05-12  6:56                     ` Chen, Xiaoguang
2017-05-12 17:04                     ` Alex Williamson
2017-05-12 17:04                       ` Alex Williamson
2017-04-28 11:35 ` ✓ Fi.CI.BAT: success for drm/i915/gvt: dma-buf support for GVT-g Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.