From: Gurchetan Singh <gurchetansingh@chromium.org>
To: dri-devel@lists.freedesktop.org
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Subject: [PATCH] drm/virtio: delete notify in virtio_gpu_object_create
Date: Wed, 25 Mar 2020 16:10:09 -0700 [thread overview]
Message-ID: <20200325231009.41152-1-gurchetansingh@chromium.org> (raw)
In-Reply-To: <CAPaKu7ScaEefALSxqqugaUT+pLdQXcH5KupgqH1ZH5kzNJn3Vw@mail.gmail.com>
For 3D buffers, virtio_gpu_gem_object_open notifies.
We can have the same behavior for dumb buffer.
v2: virtio_gpu_gem_object_open always notifies
v3: avoid boolean variable
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
---
drivers/gpu/drm/virtio/virtgpu_gem.c | 3 ++-
drivers/gpu/drm/virtio/virtgpu_object.c | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
index 90c0a8ea1708c..1025658be4df2 100644
--- a/drivers/gpu/drm/virtio/virtgpu_gem.c
+++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
@@ -114,7 +114,7 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
struct virtio_gpu_object_array *objs;
if (!vgdev->has_virgl_3d)
- return 0;
+ goto out_notify;
objs = virtio_gpu_array_alloc(1);
if (!objs)
@@ -123,6 +123,7 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id,
objs);
+out_notify:
virtio_gpu_notify(vgdev);
return 0;
}
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index d9039bb7c5e37..51a8da7d5ef3b 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -241,7 +241,6 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
return ret;
}
- virtio_gpu_notify(vgdev);
*bo_ptr = bo;
return 0;
--
2.24.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-03-25 23:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 16:43 [PATCH 1/3] drm/virtio: random virtgpu_drv.h cleanups Gurchetan Singh
2020-03-24 16:43 ` [PATCH 2/3] drm/virtio: delete notify after virtio_gpu_cmd_context_create Gurchetan Singh
2020-03-24 16:44 ` [PATCH 3/3] drm/virtio: delete notify in virtio_gpu_object_create Gurchetan Singh
2020-03-24 22:11 ` Chia-I Wu
2020-03-25 0:41 ` [PATCH] " Gurchetan Singh
2020-03-25 21:31 ` Chia-I Wu
2020-03-25 23:10 ` Gurchetan Singh [this message]
2020-03-25 23:35 ` Chia-I Wu
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=20200325231009.41152-1-gurchetansingh@chromium.org \
--to=gurchetansingh@chromium.org \
--cc=dri-devel@lists.freedesktop.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 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).