From: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Kim, Dongwon" <dongwon.kim@intel.com>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
Daniel Vetter <daniel@ffwll.ch>,
"Vetter, Daniel" <daniel.vetter@intel.com>,
"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: RE: [RFC v3 2/3] virtio: Introduce Vdmabuf driver
Date: Mon, 22 Feb 2021 08:52:37 +0000 [thread overview]
Message-ID: <ace6db071cdf4cb89c4155006b19792d@intel.com> (raw)
In-Reply-To: <20210212110140.gdpu7kapnr7ovdcn@sirius.home.kraxel.org>
Hi Gerd,
>
> On Fri, Feb 12, 2021 at 08:15:12AM +0000, Kasireddy, Vivek wrote:
> > Hi Gerd,
> > [Kasireddy, Vivek] Just to confirm my understanding of what you are
> > suggesting, are you saying that we need to either have Weston allocate
> > scanout buffers (GBM surface/BO) using virtio-gpu and render into them
> > using i915; or have virtio-gpu allocate pages and export a dma-buf and
> > have Weston create a GBM BO by calling gbm_bo_import(fd) and render into the BO
> using i915?
>
> Not sure what the difference between the former and the latter is.
[Kasireddy, Vivek] Oh, what I meant is whether you were suggesting that we
create a GBM device and create a GBM surface and BOs using this device or
just create a raw/dumb GEM object and create a GBM BO by importing it. As
we just discovered, the former means we have to initialize virgl which complicates
things so we went with the latter.
>
> > [Kasireddy, Vivek] We are only interested in Qemu UI at the moment but
> > if we were to use virtio-gpu, we are going to need to add one more vq
> > and support for managing buffers, events, etc.
>
> Should be easy and it should not need any virtio-gpu driver changes.
[Kasireddy, Vivek] Vdmabuf v4, that implements your suggestion -- to have
Vdmabuf allocate pages -- is posted here:
https://lists.freedesktop.org/archives/dri-devel/2021-February/297841.html
and tested it with Weston Headless and Qemu:
https://gitlab.freedesktop.org/Vivek/weston/-/blob/vdmabuf/libweston/backend-headless/headless.c#L522
https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg02976.html
Having said that, after discussing with Daniel Vetter, we are now switching our
focus to virtio-gpu to compare and contrast both solutions.
>
> You can use virtio-gpu like a dumb scanout device. Create a dumb bo, create a
> framebuffer for the bo, map the framebuffer to the crtc.
>
> Then export the bo, import into i915, use it as render target. When rendering is done flush
> (DRM_IOCTL_MODE_DIRTYFB). Alternatively allocate multiple bo's + framebuffers
> and pageflip.
[Kasireddy, Vivek] Since we are testing with Weston, we are looking at pageflips (4 color
buffers). And, this part so far seems to work where virtio-gpu is used for kms (max_outputs=1)
and Iris/i915 is used for rendering. We are currently glueing virtio-gpu and i915 in Weston but
eventually the plan is to glue them (virgl/virtio-gpu and Iris) in Mesa if possible using KMSRO
(KMS render only) to avoid having to change Weston or X or other user-space components.
>
> Pretty standard workflow for cases where rendering and scanout are handled by different
> devices. As far I know not uncommon in the arm world.
>
> Right now this will involve a memcpy() for any display update because qemu is a bit
> behind on supporting recent virtio-gpu features.
[Kasireddy, Vivek] IIUC, I think you are referring to creating the Pixman image in set_scanout.
What additional features need to be implemented or what is your recommendation in terms of
what needs to be done to turn the memcpy() into a dma-buf? Also, how should we ensure that
access to the guest fb/dmabuf is synchronized to ensure that the Guest and the Host do not access
the backing storage of the dmabuf at the same time?
Thanks,
Vivek
>
> take care,
> Gerd
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Kim, Dongwon" <dongwon.kim@intel.com>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"Vetter, Daniel" <daniel.vetter@intel.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: RE: [RFC v3 2/3] virtio: Introduce Vdmabuf driver
Date: Mon, 22 Feb 2021 08:52:37 +0000 [thread overview]
Message-ID: <ace6db071cdf4cb89c4155006b19792d@intel.com> (raw)
In-Reply-To: <20210212110140.gdpu7kapnr7ovdcn@sirius.home.kraxel.org>
Hi Gerd,
>
> On Fri, Feb 12, 2021 at 08:15:12AM +0000, Kasireddy, Vivek wrote:
> > Hi Gerd,
> > [Kasireddy, Vivek] Just to confirm my understanding of what you are
> > suggesting, are you saying that we need to either have Weston allocate
> > scanout buffers (GBM surface/BO) using virtio-gpu and render into them
> > using i915; or have virtio-gpu allocate pages and export a dma-buf and
> > have Weston create a GBM BO by calling gbm_bo_import(fd) and render into the BO
> using i915?
>
> Not sure what the difference between the former and the latter is.
[Kasireddy, Vivek] Oh, what I meant is whether you were suggesting that we
create a GBM device and create a GBM surface and BOs using this device or
just create a raw/dumb GEM object and create a GBM BO by importing it. As
we just discovered, the former means we have to initialize virgl which complicates
things so we went with the latter.
>
> > [Kasireddy, Vivek] We are only interested in Qemu UI at the moment but
> > if we were to use virtio-gpu, we are going to need to add one more vq
> > and support for managing buffers, events, etc.
>
> Should be easy and it should not need any virtio-gpu driver changes.
[Kasireddy, Vivek] Vdmabuf v4, that implements your suggestion -- to have
Vdmabuf allocate pages -- is posted here:
https://lists.freedesktop.org/archives/dri-devel/2021-February/297841.html
and tested it with Weston Headless and Qemu:
https://gitlab.freedesktop.org/Vivek/weston/-/blob/vdmabuf/libweston/backend-headless/headless.c#L522
https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg02976.html
Having said that, after discussing with Daniel Vetter, we are now switching our
focus to virtio-gpu to compare and contrast both solutions.
>
> You can use virtio-gpu like a dumb scanout device. Create a dumb bo, create a
> framebuffer for the bo, map the framebuffer to the crtc.
>
> Then export the bo, import into i915, use it as render target. When rendering is done flush
> (DRM_IOCTL_MODE_DIRTYFB). Alternatively allocate multiple bo's + framebuffers
> and pageflip.
[Kasireddy, Vivek] Since we are testing with Weston, we are looking at pageflips (4 color
buffers). And, this part so far seems to work where virtio-gpu is used for kms (max_outputs=1)
and Iris/i915 is used for rendering. We are currently glueing virtio-gpu and i915 in Weston but
eventually the plan is to glue them (virgl/virtio-gpu and Iris) in Mesa if possible using KMSRO
(KMS render only) to avoid having to change Weston or X or other user-space components.
>
> Pretty standard workflow for cases where rendering and scanout are handled by different
> devices. As far I know not uncommon in the arm world.
>
> Right now this will involve a memcpy() for any display update because qemu is a bit
> behind on supporting recent virtio-gpu features.
[Kasireddy, Vivek] IIUC, I think you are referring to creating the Pixman image in set_scanout.
What additional features need to be implemented or what is your recommendation in terms of
what needs to be done to turn the memcpy() into a dma-buf? Also, how should we ensure that
access to the guest fb/dmabuf is synchronized to ensure that the Guest and the Host do not access
the backing storage of the dmabuf at the same time?
Thanks,
Vivek
>
> take care,
> Gerd
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Vetter, Daniel" <daniel.vetter@intel.com>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"Kim, Dongwon" <dongwon.kim@intel.com>,
"sumit.semwal@linaro.org" <sumit.semwal@linaro.org>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: RE: [RFC v3 2/3] virtio: Introduce Vdmabuf driver
Date: Mon, 22 Feb 2021 08:52:37 +0000 [thread overview]
Message-ID: <ace6db071cdf4cb89c4155006b19792d@intel.com> (raw)
In-Reply-To: <20210212110140.gdpu7kapnr7ovdcn@sirius.home.kraxel.org>
Hi Gerd,
>
> On Fri, Feb 12, 2021 at 08:15:12AM +0000, Kasireddy, Vivek wrote:
> > Hi Gerd,
> > [Kasireddy, Vivek] Just to confirm my understanding of what you are
> > suggesting, are you saying that we need to either have Weston allocate
> > scanout buffers (GBM surface/BO) using virtio-gpu and render into them
> > using i915; or have virtio-gpu allocate pages and export a dma-buf and
> > have Weston create a GBM BO by calling gbm_bo_import(fd) and render into the BO
> using i915?
>
> Not sure what the difference between the former and the latter is.
[Kasireddy, Vivek] Oh, what I meant is whether you were suggesting that we
create a GBM device and create a GBM surface and BOs using this device or
just create a raw/dumb GEM object and create a GBM BO by importing it. As
we just discovered, the former means we have to initialize virgl which complicates
things so we went with the latter.
>
> > [Kasireddy, Vivek] We are only interested in Qemu UI at the moment but
> > if we were to use virtio-gpu, we are going to need to add one more vq
> > and support for managing buffers, events, etc.
>
> Should be easy and it should not need any virtio-gpu driver changes.
[Kasireddy, Vivek] Vdmabuf v4, that implements your suggestion -- to have
Vdmabuf allocate pages -- is posted here:
https://lists.freedesktop.org/archives/dri-devel/2021-February/297841.html
and tested it with Weston Headless and Qemu:
https://gitlab.freedesktop.org/Vivek/weston/-/blob/vdmabuf/libweston/backend-headless/headless.c#L522
https://lists.nongnu.org/archive/html/qemu-devel/2021-02/msg02976.html
Having said that, after discussing with Daniel Vetter, we are now switching our
focus to virtio-gpu to compare and contrast both solutions.
>
> You can use virtio-gpu like a dumb scanout device. Create a dumb bo, create a
> framebuffer for the bo, map the framebuffer to the crtc.
>
> Then export the bo, import into i915, use it as render target. When rendering is done flush
> (DRM_IOCTL_MODE_DIRTYFB). Alternatively allocate multiple bo's + framebuffers
> and pageflip.
[Kasireddy, Vivek] Since we are testing with Weston, we are looking at pageflips (4 color
buffers). And, this part so far seems to work where virtio-gpu is used for kms (max_outputs=1)
and Iris/i915 is used for rendering. We are currently glueing virtio-gpu and i915 in Weston but
eventually the plan is to glue them (virgl/virtio-gpu and Iris) in Mesa if possible using KMSRO
(KMS render only) to avoid having to change Weston or X or other user-space components.
>
> Pretty standard workflow for cases where rendering and scanout are handled by different
> devices. As far I know not uncommon in the arm world.
>
> Right now this will involve a memcpy() for any display update because qemu is a bit
> behind on supporting recent virtio-gpu features.
[Kasireddy, Vivek] IIUC, I think you are referring to creating the Pixman image in set_scanout.
What additional features need to be implemented or what is your recommendation in terms of
what needs to be done to turn the memcpy() into a dma-buf? Also, how should we ensure that
access to the guest fb/dmabuf is synchronized to ensure that the Guest and the Host do not access
the backing storage of the dmabuf at the same time?
Thanks,
Vivek
>
> take care,
> Gerd
next prev parent reply other threads:[~2021-02-22 8:52 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 7:35 [RFC v3 0/3] Introduce Virtio based Dmabuf driver Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` [RFC v3 1/3] kvm: Add a notifier for create and destroy VM events Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` [RFC v3 2/3] virtio: Introduce Vdmabuf driver Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 9:15 ` kernel test robot
2021-02-05 16:03 ` Daniel Vetter
2021-02-05 16:03 ` Daniel Vetter
2021-02-05 16:03 ` Daniel Vetter
2021-02-08 7:57 ` Gerd Hoffmann
2021-02-08 7:57 ` Gerd Hoffmann
2021-02-08 7:57 ` Gerd Hoffmann
2021-02-08 9:38 ` Daniel Vetter
2021-02-08 9:38 ` Daniel Vetter
2021-02-08 9:38 ` Daniel Vetter
2021-02-09 0:25 ` Kasireddy, Vivek
2021-02-09 0:25 ` Kasireddy, Vivek
2021-02-09 0:25 ` Kasireddy, Vivek
2021-02-09 8:44 ` Gerd Hoffmann
2021-02-09 8:44 ` Gerd Hoffmann
2021-02-10 4:47 ` Kasireddy, Vivek
2021-02-10 4:47 ` Kasireddy, Vivek
2021-02-10 4:47 ` Kasireddy, Vivek
2021-02-10 8:05 ` Christian König
2021-02-10 8:05 ` Christian König
2021-02-10 8:05 ` Christian König
2021-02-12 8:36 ` Kasireddy, Vivek
2021-02-12 8:36 ` Kasireddy, Vivek
2021-02-12 8:36 ` Kasireddy, Vivek
2021-02-12 8:47 ` Christian König
2021-02-12 8:47 ` Christian König
2021-02-12 8:47 ` Christian König
2021-02-12 10:14 ` Gerd Hoffmann
2021-02-12 10:14 ` Gerd Hoffmann
2021-02-12 10:14 ` Gerd Hoffmann
2021-02-10 9:16 ` Gerd Hoffmann
2021-02-10 9:16 ` Gerd Hoffmann
2021-02-10 9:16 ` Gerd Hoffmann
2021-02-12 8:15 ` Kasireddy, Vivek
2021-02-12 8:15 ` Kasireddy, Vivek
2021-02-12 8:15 ` Kasireddy, Vivek
2021-02-12 11:01 ` Gerd Hoffmann
2021-02-12 11:01 ` Gerd Hoffmann
2021-02-12 11:01 ` Gerd Hoffmann
2021-02-22 8:52 ` Kasireddy, Vivek [this message]
2021-02-22 8:52 ` Kasireddy, Vivek
2021-02-22 8:52 ` Kasireddy, Vivek
2021-03-15 2:27 ` Zhang, Tina
2021-03-15 2:27 ` Zhang, Tina
2021-03-15 2:27 ` Zhang, Tina
2021-02-03 7:35 ` [RFC v3 3/3] vhost: Add Vdmabuf backend Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
2021-02-03 7:35 ` Vivek Kasireddy
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=ace6db071cdf4cb89c4155006b19792d@intel.com \
--to=vivek.kasireddy@intel.com \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=virtualization@lists.linux-foundation.org \
/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 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.