This is a note to let you know that I've just added the patch titled drm/virtio: Set segment size for virtio_gpu device to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-virtio-set-segment-size-for-virtio_gpu-device.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 9c64e749cebd9c2d3d55261530a98bcccb83b950 Mon Sep 17 00:00:00 2001 From: Sebastian Ott <sebott@xxxxxxxxxx> Date: Tue, 23 Jan 2024 19:14:14 +0100 Subject: drm/virtio: Set segment size for virtio_gpu device From: Sebastian Ott <sebott@xxxxxxxxxx> commit 9c64e749cebd9c2d3d55261530a98bcccb83b950 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: stable@xxxxxxxxxxxxxxx Tested-by: Zhenyu Zhang <zhenyzha@xxxxxxxxxx> Acked-by: Vivek Kasireddy <vivek.kasireddy@xxxxxxxxx> Signed-off-by: Sebastian Ott <sebott@xxxxxxxxxx> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/7258a4cc-da16-5c34-a042-2a23ee396d56@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -94,6 +94,7 @@ static int virtio_gpu_probe(struct virti goto err_free; } + dma_set_max_seg_size(dev->dev, dma_max_mapping_size(dev->dev) ?: UINT_MAX); ret = virtio_gpu_init(vdev, dev); if (ret) goto err_free; Patches currently in stable-queue which might be from sebott@xxxxxxxxxx are queue-6.6/drm-virtio-set-segment-size-for-virtio_gpu-device.patch