[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200818074828.9509-3-kraxel@redhat.com>
Date: Tue, 18 Aug 2020 09:48:28 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: dri-devel@...ts.freedesktop.org
Cc: Gerd Hoffmann <kraxel@...hat.com>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
virtualization@...ts.linux-foundation.org (open list:VIRTIO GPU DRIVER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 2/2] drm/virtio: set max_segment
When initializing gem objects call virtio_max_dma_size() to figure the
scatter list limit. Needed to make virtio-gpu work properly with SEV.
Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
index 1359eb8f1a02..26b608e2554e 100644
--- a/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -214,6 +214,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
goto err_free_gem;
bo->dumb = params->dumb;
+ shmem_obj->base.max_segment = virtio_max_dma_size(vgdev->vdev);
if (fence) {
ret = -ENOMEM;
--
2.18.4
Powered by blists - more mailing lists