Skip to content

Commit f198991

Browse files
Sebastian Ottsmb49
authored andcommitted
drm/virtio: Set segment size for virtio_gpu device
BugLink: https://bugs.launchpad.net/bugs/2061814 commit 9c64e74 upstream. Set the segment size of the virtio_gpu device to the value used by the drm helpers when allocating sg lists to fix the following complaint from DMA_API debug code: DMA-API: virtio-pci 0000:07:00.0: mapping sg segment longer than device claims to support [len=262144] [max=65536] Cc: [email protected] Tested-by: Zhenyu Zhang <[email protected]> Acked-by: Vivek Kasireddy <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Portia Stephens <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent 25000b4 commit f198991

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/virtio/virtgpu_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev)
9494
goto err_free;
9595
}
9696

97+
dma_set_max_seg_size(dev->dev, dma_max_mapping_size(dev->dev) ?: UINT_MAX);
9798
ret = virtio_gpu_init(vdev, dev);
9899
if (ret)
99100
goto err_free;

0 commit comments

Comments
 (0)