diff mbox series

virtio-gpu: Remove stride and layer_stride check for dGPU prime on VM

Message ID 20230705035622.2841499-1-julia.zhang@amd.com (mailing list archive)
State New, archived
Headers show
Series virtio-gpu: Remove stride and layer_stride check for dGPU prime on VM | expand

Commit Message

Zhang, Julia July 5, 2023, 3:56 a.m. UTC
Remove stride and layer_stride check in virtio-gpu so that virgl can
send transfer data command with non zero stride to sync up data from
guest to host for dGPU prime on VM.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23896

Signed-off-by: Julia Zhang <julizhan@amd.com>
---
 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 10 ----------
 1 file changed, 10 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 5d05093014ac..4d3f8d36e3c7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -414,11 +414,6 @@  static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev,
 		goto err_put_free;
 	}
 
-	if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-		ret = -EINVAL;
-		goto err_put_free;
-	}
-
 	ret = virtio_gpu_array_lock_resv(objs);
 	if (ret != 0)
 		goto err_put_free;
@@ -473,11 +468,6 @@  static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
 	} else {
 		virtio_gpu_create_context(dev, file);
 
-		if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-			ret = -EINVAL;
-			goto err_put_free;
-		}
-
 		ret = virtio_gpu_array_lock_resv(objs);
 		if (ret != 0)
 			goto err_put_free;