On Mon, Sep 07, 2020 at 08:33:41AM +0200, Gerd Hoffmann wrote: > virtio-gpu must make sure scatter list segments are not too big. > > Gerd Hoffmann (2): > drm: allow limiting the scatter list size. > drm/virtio: set max_segment So this all feels a bit irky and mid-layer, and why can't the various helpers not just use dma_max_mapping_size(drm_device->dev) directly. And then I read that dma api use in virtio subsystem is a huge mess of hacks, and that it doesn't set up these quirks through the dma api abstraction but throught it's own abstraction on top. So we don't really have any other option I think. I think would be good to add a TODO item to the virtio_max_dma_size call like: TODO: once virtio uses the dma api correctly, remove the explicit max_segment handling na duse dma_max_mapping_size directly everywhere. Or maybe also put that into the @max_segment kerneldoc in the drm_device struct. With that: Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> on the series. -Daniel > > include/drm/drm_device.h | 8 ++++++++ > include/drm/drm_prime.h | 3 ++- > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- > drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++- > drivers/gpu/drm/drm_prime.c | 10 +++++++--- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 3 ++- > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 ++- > drivers/gpu/drm/msm/msm_gem.c | 3 ++- > drivers/gpu/drm/msm/msm_gem_prime.c | 3 ++- > drivers/gpu/drm/nouveau/nouveau_prime.c | 3 ++- > drivers/gpu/drm/radeon/radeon_prime.c | 3 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 6 ++++-- > drivers/gpu/drm/tegra/gem.c | 3 ++- > drivers/gpu/drm/vgem/vgem_drv.c | 3 ++- > drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + > drivers/gpu/drm/xen/xen_drm_front_gem.c | 3 ++- > 16 files changed, 44 insertions(+), 17 deletions(-) > > -- > 2.27.0 > > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel