From: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
To: Chia-I Wu <olvaffe@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
dri-devel@lists.freedesktop.org,
Gurchetan Singh <gurchetansingh@chromium.org>
Subject: Re: [PATCH] drm/virtio: make sure context is created in gem open
Date: Tue, 12 Jan 2021 09:50:52 +0100 [thread overview]
Message-ID: <20210112085052.GA59439@gmail.com> (raw)
In-Reply-To: <20210107210726.269584-1-olvaffe@gmail.com>
On Thu, Jan 07, 2021 at 01:07:26PM -0800, Chia-I Wu wrote:
>The context might still be missing when DRM_IOCTL_PRIME_FD_TO_HANDLE is
>the first ioctl on the drm_file.
>
>Fixes: 72b48ae800da ("drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl")
>Cc: Gurchetan Singh <gurchetansingh@chromium.org>
>Cc: Gerd Hoffmann <kraxel@redhat.com>
>Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
>---
> drivers/gpu/drm/virtio/virtgpu_gem.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c
>index c30c75ee83fc..8502400b2f9c 100644
>--- a/drivers/gpu/drm/virtio/virtgpu_gem.c
>+++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
>@@ -39,9 +39,6 @@ static int virtio_gpu_gem_create(struct drm_file *file,
> int ret;
> u32 handle;
>
>- if (vgdev->has_virgl_3d)
>- virtio_gpu_create_context(dev, file);
>-
> ret = virtio_gpu_object_create(vgdev, params, &obj, NULL);
> if (ret < 0)
> return ret;
>@@ -119,6 +116,11 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj,
> if (!vgdev->has_virgl_3d)
> goto out_notify;
>
>+ /* the context might still be missing when the first ioctl is
>+ * DRM_IOCTL_MODE_CREATE_DUMB or DRM_IOCTL_PRIME_FD_TO_HANDLE
>+ */
>+ virtio_gpu_create_context(obj->dev, file);
>+
> objs = virtio_gpu_array_alloc(1);
> if (!objs)
> return -ENOMEM;
>--
>2.29.2.729.g45daf8777d-goog
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2021-01-12 8:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 21:07 [PATCH] drm/virtio: make sure context is created in gem open Chia-I Wu
2021-01-08 1:46 ` Gurchetan Singh
2021-01-12 8:50 ` Anthoine Bourgeois [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=20210112085052.GA59439@gmail.com \
--to=anthoine.bourgeois@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=olvaffe@gmail.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