• Thierry Reding's avatar
    drm/tegra: gem: Use sg_alloc_table_from_pages() · acf6b77c
    Thierry Reding authored
    Instead of manually creating the SG table for a discontiguous buffer,
    use the existing sg_alloc_table_from_pages(). Note that this is not safe
    to be used with the ARM DMA/IOMMU integration code because that will not
    ensure that the whole buffer is mapped contiguously. Depending on the
    size of the individual entries the mapping may end up containing holes
    to ensure alignment.
    
    However, we only ever use these buffers with explicit IOMMU API usage
    and know how to avoid these holes.
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    acf6b77c
gem.c 13.7 KB