* [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
@ 2026-09-11 14:42 Dmitry Osipenko
2026-09-11 14:55 ` sashiko-bot
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dmitry Osipenko @ 2026-09-11 14:42 UTC (permalink / raw)
To: David Airlie, Gerd Hoffmann, Gurchetan Singh, Chia-I Wu,
Val Packett
Cc: dri-devel, virtualization, linux-kernel, Yiwei Zhang
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);
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
2026-09-11 14:42 [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled" Dmitry Osipenko
@ 2026-09-11 14:55 ` sashiko-bot
2026-09-11 15:32 ` Yiwei Zhang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-11 14:55 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Eugenio Perez, dri-devel, virtualization, Michael S. Tsirkin
> 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>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911144204.2089401-1-dmitry.osipenko@collabora.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
2026-09-11 14:42 [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled" Dmitry Osipenko
2026-09-11 14:55 ` sashiko-bot
@ 2026-09-11 15:32 ` Yiwei Zhang
2026-09-15 21:15 ` Val Packett
2026-09-20 18:20 ` Dmitry Osipenko
3 siblings, 0 replies; 5+ messages in thread
From: Yiwei Zhang @ 2026-09-11 15:32 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: David Airlie, Gerd Hoffmann, Gurchetan Singh, Chia-I Wu,
Val Packett, dri-devel, virtualization, linux-kernel
On Fri, Sep 11, 2026 at 7:42 AM Dmitry Osipenko
<dmitry.osipenko@collabora.com> 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);
> --
> 2.55.0
>
r-b. Thanks for the prompt revert!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
2026-09-11 14:42 [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled" Dmitry Osipenko
2026-09-11 14:55 ` sashiko-bot
2026-09-11 15:32 ` Yiwei Zhang
@ 2026-09-15 21:15 ` Val Packett
2026-09-20 18:20 ` Dmitry Osipenko
3 siblings, 0 replies; 5+ messages in thread
From: Val Packett @ 2026-09-15 21:15 UTC (permalink / raw)
To: Dmitry Osipenko, David Airlie, Gerd Hoffmann, Gurchetan Singh,
Chia-I Wu
Cc: dri-devel, virtualization, linux-kernel, Yiwei Zhang
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled"
2026-09-11 14:42 [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled" Dmitry Osipenko
` (2 preceding siblings ...)
2026-09-15 21:15 ` Val Packett
@ 2026-09-20 18:20 ` Dmitry Osipenko
3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Osipenko @ 2026-09-20 18:20 UTC (permalink / raw)
To: David Airlie, Gerd Hoffmann, Gurchetan Singh, Chia-I Wu,
Val Packett
Cc: dri-devel, virtualization, linux-kernel, Yiwei Zhang
On 9/11/26 17:42, 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);
Applied to misc-fixes
--
Best regards,
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-20 18:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 14:42 [PATCH v1] Revert "drm/virtio: Allow importing prime buffers when 3D is enabled" Dmitry Osipenko
2026-09-11 14:55 ` sashiko-bot
2026-09-11 15:32 ` Yiwei Zhang
2026-09-15 21:15 ` Val Packett
2026-09-20 18:20 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox