Skip to content

Commit 1f76871

Browse files
valpackettgregkh
authored andcommitted
drm/virtio: Allow importing prime buffers when 3D is enabled
[ Upstream commit df4dc94 ] This functionality was added for using a KMS-only virtgpu with a physical (or SR-IOV) headless GPU in passthrough, but it should not be restricted to KMS-only mode. It can be used with cross-domain to pass guest memfds to the host compositor with zero copies (using udmabuf on both sides). Drop the check for the absence of virgl_3d to allow for more use cases. Fixes: ca77f27 ("drm/virtio: Import prime buffers from other devices as guest blobs") Signed-off-by: Val Packett <val@invisiblethingslab.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patch.msgid.link/20251210154755.1119861-2-val@invisiblethingslab.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent fe1f80f commit 1f76871

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/virtio/virtgpu_prime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ struct drm_gem_object *virtgpu_gem_prime_import(struct drm_device *dev,
312312
}
313313
}
314314

315-
if (!vgdev->has_resource_blob || vgdev->has_virgl_3d)
315+
if (!vgdev->has_resource_blob)
316316
return drm_gem_prime_import(dev, buf);
317317

318318
bo = kzalloc(sizeof(*bo), GFP_KERNEL);

0 commit comments

Comments
 (0)