mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
drm/virtio: Allow importing prime buffers when 3D is enabled
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: ca77f27a26 ("drm/virtio: Import prime buffers from other devices as guest blobs")
Signed-off-by: Val Packett <[email protected]>
Reviewed-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Dmitry Osipenko <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
1 parent
40c1ccc1a3
commit
df4dc947c4
1 file changed
+1
-1
@@ -312,7 +312,7 @@ struct drm_gem_object *virtgpu_gem_prime_import(struct drm_device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
if (!vgdev->has_resource_blob || vgdev->has_virgl_3d)
|
||||
if (!vgdev->has_resource_blob)
|
||||
return drm_gem_prime_import(dev, buf);
|
||||
|
||||
bo = kzalloc(sizeof(*bo), GFP_KERNEL);
|
||||
|
||||
Reference in new issue
Block a user