[Intel-gfx] [PATCH] drm/i915: Fix DMA mapped scatterlist walks
Chris Wilson
chris at chris-wilson.co.uk
Wed Sep 9 13:03:03 UTC 2020
Quoting Tvrtko Ursulin (2020-09-09 13:44:57)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> When walking DMA mapped scatterlists sg_dma_len has to be used since it
> can be different (coalesced) from the backing store entry.
>
> This also means we have to end the walk when encountering a zero length
> DMA entry and cannot rely on the normal sg list end marker.
>
> Both issues were there in theory for some time but were hidden by the fact
> Intel IOMMU driver was never coalescing entries. As there are ongoing
> efforts to change this we need to start handling it.
Does this change anything if we were already feeding in coalesced
entries? I doubt we made all sg generators compact the lists though.
The change looks reasonable, it seems you have kept the dma and page
iterators distinct, which was the only worry that occurred to me.
-Chris
More information about the Intel-gfx
mailing list