[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <32f2442d-9150-0288-499c-9206084d8732@collabora.com>
Date: Mon, 27 Feb 2023 02:50:34 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Oleksandr Tyshchenko <olekstysh@...il.com>,
xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
virtualization@...ts.linux-foundation.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
David Airlie <airlied@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>,
Gurchetan Singh <gurchetansingh@...omium.org>,
Chia-I Wu <olvaffe@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>
Subject: Re: [PATCH] drm/virtio: Pass correct device to
dma_sync_sgtable_for_device()
On 2/25/23 17:55, Dmitry Osipenko wrote:
> On 2/24/23 18:34, Oleksandr Tyshchenko wrote:
>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
>>
>> The "vdev->dev.parent" should be used instead of "vdev->dev" as a device
>> for which to perform the DMA operation in both
>> virtio_gpu_cmd_transfer_to_host_2d(3d).
>>
>> Because the virtio-gpu device "vdev->dev" doesn't really have DMA OPS
>> assigned to it, but parent (virtio-pci or virtio-mmio) device
>> "vdev->dev.parent" has. The more, the sgtable in question the code is
>> trying to sync here was mapped for the parent device (by using its DMA OPS)
>> previously at:
>> virtio_gpu_object_shmem_init()->drm_gem_shmem_get_pages_sgt()->
>> dma_map_sgtable(), so should be synced here for the same parent device.
>>
>> Fixes: b5c9ed70d1a9 ("drm/virtio: Improve DMA API usage for shmem BOs")
>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
>> ---
...
> Indeed, it's only the vgpu drm device that was moved to use the pci
> parent device. On x86 the vdev always has dma-ops, also
> virtio_has_dma_quirk=true for modern Qemu. So I didn't test this code
> path and apparently it's only testable on Xen, which is good to know.
>
> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
Applied to misc-fixes
--
Best regards,
Dmitry
Powered by blists - more mailing lists