drm/virtio: add iommu support.

Use the dma mapping api and properly add iommu mappings for
objects, unless virtio is in iommu quirk mode.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-3-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann
2018-08-29 14:20:26 +02:00
parent b3f13ec958
commit a3b815f09b
2 changed files with 38 additions and 9 deletions

View File

@@ -57,6 +57,7 @@ struct virtio_gpu_object {
uint32_t hw_res_handle;
struct sg_table *pages;
uint32_t mapped;
void *vmap;
bool dumb;
struct ttm_place placement_code;