From: Val Packett <val@invisiblethingslab.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
David Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Gurchetan Singh <gurchetansingh@chromium.org>,
Chia-I Wu <olvaffe@gmail.com>
Cc: dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, Yiwei Zhang <zzyiwei@gmail.com>
Subject: Re: [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
Date: Tue, 15 Sep 2026 18:15:38 -0300 [thread overview]
Message-ID: <579d804b-d548-4c8d-8350-e1e181a612ae@invisiblethingslab.com> (raw)
In-Reply-To: <20260911144204.2089401-1-dmitry.osipenko@collabora.com>
On 9/11/26 11:42 AM, Dmitry Osipenko wrote:
> Guest userspace may import udmabuf to vrend. Vrend doesn't support guest
> blobs, and thus, further 3d operations with the imported blob are failing.
> Typical scenario of the problem shown with mouse cursor RGBA image imported
> into virtio-gpu, which previously was rejected by virtio-gpu driver.
> Revert enabling guest blobs importing into vrend to fix the regression.
>
> Link: https://gitlab.freedesktop.org/virgl/virglrenderer/-/work_items/674
> Fixes: df4dc947c46b ("drm/virtio: Allow importing prime buffers when 3D is enabled")
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> ---
> drivers/gpu/drm/virtio/virtgpu_prime.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
> index 149e6bcb5878..ebf471044d06 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_prime.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
> @@ -349,7 +349,7 @@ struct drm_gem_object *virtgpu_gem_prime_import(struct drm_device *dev,
> }
> }
>
> - if (!vgdev->has_resource_blob)
> + if (!vgdev->has_resource_blob || vgdev->has_virgl_3d)
> return drm_gem_prime_import(dev, buf);
>
> bo = kzalloc_obj(*bo);
Oops, right, didn't think the back-compat issues all the way through on
that one..
Reviewed-by: Val Packett <val@invisiblethingslab.com>
BTW, to clarify wrt the original use case this was intended for— I got
it all working, but it adds new feature flags:
https://lore.kernel.org/virtio-comment/20260903021442.423274-1-val@invisiblethingslab.com/
So I'll "unlock" this again in new patches but not unconditionally of
course. Rather, gated on the new F_CREATE_GUEST_HANDLE flag which would
indicate that the device backend *does* support creating guest blobs
with host handles (dmabufs).
Thanks,
~val
prev parent reply other threads:[~2026-09-15 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 14:42 Dmitry Osipenko
2026-09-11 15:32 ` Yiwei Zhang
2026-09-15 21:15 ` Val Packett [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=579d804b-d548-4c8d-8350-e1e181a612ae@invisiblethingslab.com \
--to=val@invisiblethingslab.com \
--cc=airlied@redhat.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olvaffe@gmail.com \
--cc=virtualization@lists.linux.dev \
--cc=zzyiwei@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
all inboxes | Powered by JetHome®