dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dongwon Kim <dongwon.kim@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Dongwon Kim <dongwon.kim@intel.com>,
	Gurchetan Singh <gurchetansingh@chromium.org>
Subject: [PATCH 3/3] drm/virtio: use the fence for every plane update
Date: Tue, 10 May 2022 17:06:23 -0700	[thread overview]
Message-ID: <20220511000623.12938-3-dongwon.kim@intel.com> (raw)
In-Reply-To: <20220511000623.12938-1-dongwon.kim@intel.com>

Trying to use the fence to make plane update to wait for the host to
consume the buffer for better synchronization in all cases

Cc: Gurchetan Singh <gurchetansingh@chromium.org>
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 | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 9856e9941e37..0333181e9dbf 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -142,12 +142,7 @@ static void virtio_gpu_resource_flush(struct drm_plane *plane,
 
 	vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
 	bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
-
-	if (bo && bo->dumb && (plane->state->fb != new_state->fb) &&
-	    ((plane->type == DRM_PLANE_TYPE_PRIMARY && bo->guest_blob) ||
-	    plane->type != DRM_PLANE_TYPE_PRIMARY))
-		fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context,
-					       0);
+	fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
 
 	if (fence) {
 		objs = virtio_gpu_array_alloc(1);
-- 
2.20.1


  parent reply	other threads:[~2022-05-11  0:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  0:06 [PATCH 1/3] drm/virtio: .release ops for virtgpu fence release Dongwon Kim
2022-05-11  0:06 ` [PATCH 2/3] drm/virtio: fence created per cursor/plane update Dongwon Kim
2022-05-11  0:06 ` Dongwon Kim [this message]
2022-05-11  7:10   ` [PATCH 3/3] drm/virtio: use the fence for every plane update kernel test robot
2022-05-11 13:37   ` Dan Carpenter

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=20220511000623.12938-3-dongwon.kim@intel.com \
    --to=dongwon.kim@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.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