linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhang, Tina" <tina.zhang@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"kwankhede@nvidia.com" <kwankhede@nvidia.com>,
	"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>,
	"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"Lv, Zhiyuan" <zhiyuan.lv@intel.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"Yuan, Hang" <hang.yuan@intel.com>,
	"intel-gvt-dev@lists.freedesktop.org" 
	<intel-gvt-dev@lists.freedesktop.org>,
	"Wang, Zhi A" <zhi.a.wang@intel.com>
Subject: RE: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g
Date: Thu, 9 Nov 2017 23:27:00 +0000	[thread overview]
Message-ID: <237F54289DF84E4997F34151298ABEBC7C62C124@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: 20171109140958.ia3jeudgjc6skihy@sirius.home.kraxel.org

And here is the "git diff" of (git://git.kraxel.org/qemu), which is used to test this version:

diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index 1cdc926..06234b2 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -36,7 +36,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
                                            uint32_t plane_type)
 {
     struct vfio_device_gfx_plane_info plane;
-    struct vfio_device_gfx_dmabuf_fd gfd;
+    int dmabuf_fd;
     VFIODMABuf *dmabuf;
     static int errcnt;
     int ret;
@@ -84,11 +84,10 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
         }
     }

-    memset(&gfd, 0, sizeof(gfd));
-    gfd.argsz = sizeof(gfd);
-    gfd.dmabuf_id = plane.dmabuf_id;
-    ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_GFX_DMABUF, &gfd);
-    if (ret < 0) {
+
+
+    dmabuf_fd = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_GFX_DMABUF, &plane.dmabuf_id);
+    if (dmabuf_fd < 0) {
         fprintf(stderr, "(%d) ioctl VFIO_DEVICE_GET_GFX_DMABUF: %s\r",
                 ++errcnt, strerror(errno));
         return NULL;
@@ -103,7 +102,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
             (plane.drm_format >> 16) & 0xff,
             (plane.drm_format >> 24) & 0xff,
             (plane_type == DRM_PLANE_TYPE_PRIMARY) ? "primary" : "cursor",
-            gfd.dmabuf_fd);
+            dmabuf_fd);

     dmabuf = g_new0(VFIODMABuf, 1);
     dmabuf->dmabuf_id  = plane.dmabuf_id;
@@ -111,7 +110,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
     dmabuf->buf.height = plane.height;
     dmabuf->buf.stride = plane.stride;
     dmabuf->buf.fourcc = plane.drm_format;
-    dmabuf->buf.fd     = gfd.dmabuf_fd;
+    dmabuf->buf.fd     = dmabuf_fd;

     QTAILQ_INSERT_HEAD(&vdev->dmabufs, dmabuf, next);
     return dmabuf;
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index c80bb5e..aee81f2 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -536,6 +536,8 @@ struct vfio_device_gfx_plane_info {
        __u32 size;     /* size of plane in bytes, align on page*/
        __u32 x_pos;    /* horizontal position of cursor plane, upper left corner in pixels */
        __u32 y_pos;    /* vertical position of cursor plane, upper left corner in lines*/
+       __u32 x_hot;
+       __u32 y_hot;
        union {
                __u32 region_index;     /* region index */
                __u32 dmabuf_id;        /* dma-buf id */


Thanks.

BR,
Tina

> -----Original Message-----
> From: Zhang, Tina
> Sent: Friday, November 10, 2017 7:20 AM
> To: 'Gerd Hoffmann' <kraxel@redhat.com>
> Cc: Tian, Kevin <kevin.tian@intel.com>; linux-kernel@vger.kernel.org; intel-
> gfx@lists.freedesktop.org; joonas.lahtinen@linux.intel.com;
> kwankhede@nvidia.com; zhenyuw@linux.intel.com; chris@chris-wilson.co.uk;
> alex.williamson@redhat.com; Lv, Zhiyuan <zhiyuan.lv@intel.com>;
> daniel@ffwll.ch; Yuan, Hang <hang.yuan@intel.com>; intel-gvt-
> dev@lists.freedesktop.org; Wang, Zhi A <zhi.a.wang@intel.com>
> Subject: RE: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g
> 
> 
> 
> > -----Original Message-----
> > From: intel-gvt-dev
> > [mailto:intel-gvt-dev-bounces@lists.freedesktop.org] On Behalf Of Gerd
> > Hoffmann
> > Sent: Thursday, November 9, 2017 10:10 PM
> > To: Zhang, Tina <tina.zhang@intel.com>
> > Cc: Tian, Kevin <kevin.tian@intel.com>; linux-kernel@vger.kernel.org;
> > intel- gfx@lists.freedesktop.org; joonas.lahtinen@linux.intel.com;
> > kwankhede@nvidia.com; zhenyuw@linux.intel.com;
> > chris@chris-wilson.co.uk; alex.williamson@redhat.com; Lv, Zhiyuan
> > <zhiyuan.lv@intel.com>; daniel@ffwll.ch; Yuan, Hang
> > <hang.yuan@intel.com>; intel-gvt- dev@lists.freedesktop.org; Wang, Zhi
> > A <zhi.a.wang@intel.com>
> > Subject: Re: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g
> >
> > On Thu, Nov 09, 2017 at 05:33:56PM +0800, Tina Zhang wrote:
> > > v16->v17:
> > > 1) modify VFIO_DEVICE_GET_GFX_DMABUF interface. (Alex)
> > > 2) add comments for x_hot/y_hot. (Gerd)
> >
> > Hmm, doesn't apply cleanly here.
> > Tried 4.14-rc8 + gem proxy v2 + this series.
> > Seems the patches depend on unmerged gvt changes.
> > Do you have a git branch somewhere?
> Please use this:
> https://github.com/intel/gvt-linux.git
> branch: topic/dmabuf
> Thanks.
> 
> BR,
> Tina
> >
> > thanks,
> >   Gerd
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

      parent reply	other threads:[~2017-11-09 23:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  9:33 [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g Tina Zhang
2017-11-09  9:33 ` [PATCH v17 1/6] drm/i915/gvt: Add framebuffer decoder support Tina Zhang
2017-11-09  9:33 ` [PATCH v17 2/6] drm: Introduce RGB 64-bit 16:16:16:16 float format Tina Zhang
2017-11-09  9:33 ` [PATCH v17 3/6] drm/i915/gvt: Add " Tina Zhang
2017-11-09  9:34 ` [PATCH v17 4/6] drm/i915/gvt: Add opregion support Tina Zhang
2017-11-09  9:34 ` [PATCH v17 5/6] vfio: ABI for mdev display dma-buf operation Tina Zhang
2017-11-09 15:29   ` Alex Williamson
2017-11-09 18:35     ` Gerd Hoffmann
2017-11-09 20:54       ` Alex Williamson
2017-11-10  7:02         ` Gerd Hoffmann
2017-11-11  2:04           ` Zhang, Tina
2017-11-09  9:34 ` [PATCH v17 6/6] drm/i915/gvt: Dmabuf support for GVT-g Tina Zhang
2017-11-09 14:09 ` [PATCH v17 0/6] drm/i915/gvt: Dma-buf " Gerd Hoffmann
2017-11-09 23:19   ` Zhang, Tina
2017-11-09 23:27   ` Zhang, Tina [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=237F54289DF84E4997F34151298ABEBC7C62C124@SHSMSX101.ccr.corp.intel.com \
    --to=tina.zhang@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=hang.yuan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kraxel@redhat.com \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhenyuw@linux.intel.com \
    --cc=zhi.a.wang@intel.com \
    --cc=zhiyuan.lv@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).