Skip to contentSkip to conversation

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

PATCH New Julia Zhang 1 participant 1 message Jul 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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.

---
 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/virtio/virtgpu_ioctl.c +0 -10
index 5d05093014ac..4d3f8d36e3c7 100644
@@ -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;
Signature · 1 line
2.34.1