dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kim, Dongwon" <dongwon.kim@intel.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	<dri-devel@lists.freedesktop.org>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>, kraxel@redhat.com
Subject: Re: [RFC PATCH 3/3] drm/virtio: drm_gem_plane_helper_prepare_fb for obj synchronization
Date: Sun, 20 Aug 2023 13:58:33 -0700	[thread overview]
Message-ID: <8689536c-4760-a32b-76f4-65c022b5eadc@intel.com> (raw)
In-Reply-To: <04181690-adc2-fc30-d1b4-b6ca5b02a142@collabora.com>

On 8/17/2023 7:33 PM, Dmitry Osipenko wrote:
> On 7/13/23 01:44, Dongwon Kim wrote:
>> This helper is needed for framebuffer synchronization. Old framebuffer data
>> is often displayed on the guest display without this helper.
>>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
>> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
>> ---
>>   drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
>> index a063f06ab6c5..e197299489ce 100644
>> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
>> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
>> @@ -26,6 +26,7 @@
>>   #include <drm/drm_atomic_helper.h>
>>   #include <drm/drm_damage_helper.h>
>>   #include <drm/drm_fourcc.h>
>> +#include <drm/drm_gem_atomic_helper.h>
>>   
>>   #include "virtgpu_drv.h"
>>   
>> @@ -271,6 +272,9 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
>>   	vgfb = to_virtio_gpu_framebuffer(new_state->fb);
>>   	vgplane_st = to_virtio_gpu_plane_state(new_state);
>>   	bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
>> +
>> +	drm_gem_plane_helper_prepare_fb(plane, new_state);
> The implicit display BO sync should happen on a host side, unless you're
> rendering with Venus and then displaying with virgl. Doing it on guest
> side should be a major performance hit. Please provide a complete
> description of your setup: what VMM you use, config options, what tests
> you're running.

We use virtio-gpu as a kms device while using i915 as the render device in our setup.
And we use QEMU as VMM. Virtio-gpu driver flushes the scanout to QEMU as a blob resource
(reference to the buffer). QEMU then creates a dmabuf using udmabuf for the blob
then renders it as a texture using OGL. The test I ran is simple. Just starting terminal
app and typing things to see if there is any frame regression. I believe this helper is
required since the BO on the guest is basically dmabuf that is being shared between i915
and virtio-gpu driver. I didn't think about the performance impact. If the impact is
too much and that is not acceptable, is there any other suggestions or some tests I can try?

Thanks!


  reply	other threads:[~2023-08-20 20:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 22:44 [PFC PATCH 0/3] drm/virtio: synchronous guest framebuffer update Dongwon Kim
2023-07-12 22:44 ` [RFC PATCH 1/3] drm/virtio: .release ops for virtgpu fence release Dongwon Kim
2023-08-15  4:18   ` Dmitry Osipenko
2023-08-16 18:10     ` Kim, Dongwon
2023-08-17  5:05       ` Dmitry Osipenko
2023-08-17  5:25         ` Kim, Dongwon
2023-08-18  2:09           ` Dmitry Osipenko
2023-08-18  2:36         ` Kim, Dongwon
2023-07-12 22:44 ` [RFC PATCH 2/3] drm/virtio: new fence for every plane update Dongwon Kim
2023-08-18  2:21   ` Dmitry Osipenko
2023-08-21  2:28     ` Kim, Dongwon
2023-07-12 22:44 ` [RFC PATCH 3/3] drm/virtio: drm_gem_plane_helper_prepare_fb for obj synchronization Dongwon Kim
2023-08-18  2:33   ` Dmitry Osipenko
2023-08-20 20:58     ` Kim, Dongwon [this message]
2023-08-24  3:52       ` Dmitry Osipenko
2023-08-24 17:58         ` Kim, Dongwon
2023-08-31 22:51           ` Dmitry Osipenko
2023-09-05 21:08             ` Kim, Dongwon
2023-10-04 23:31               ` Dmitry Osipenko
2023-10-04 23:44                 ` Kim, Dongwon
  -- strict thread matches above, loose matches on Subject: below --
2022-09-26 23:06 [PFC PATCH 0/3] drm/virtio: synchronous guest framebuffer update Dongwon Kim
2022-09-26 23:06 ` [RFC PATCH 3/3] drm/virtio: drm_gem_plane_helper_prepare_fb for obj synchronization Dongwon Kim

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=8689536c-4760-a32b-76f4-65c022b5eadc@intel.com \
    --to=dongwon.kim@intel.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=vivek.kasireddy@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