[Intel-gfx] 4.18-rc1 i915 dma mapping warning
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 19 13:25:44 UTC 2018
Quoting Joonas Lahtinen (2018-06-19 14:16:08)
> + Chris,
>
> Somehow this message managed to dodge the mailing list?
>
> Regards, Joonas
>
> Quoting Dave Jones (2018-06-19 05:52:23)
> > The new DMA mapping debug option in 4.18-rc1 (CONFIG_DMA_API_DEBUG_SG) seems to dislike something about i915..
See
commit 002edb6f6f2a79bea50de11260ddc9572e6db731
Author: Robin Murphy <robin.murphy at arm.com>
Date: Fri Nov 6 16:32:51 2015 -0800
dma-mapping: tidy up dma_parms default handling
Many DMA controllers and other devices set max_segment_size to
indicate their scatter-gather capability, but have no interest in
segment_boundary_mask. However, the existence of a dma_parms structure
precludes the use of any default value, leaving them as zeros (assuming
a properly kzalloc'ed structure). If a well-behaved IOMMU (or SWIOTLB)
then tries to respect this by ensuring a mapped segment does not cross
a zero-byte boundary, hilarity ensues.
Since zero is a nonsensical value for either parameter, treat it as an
indicator for "default", as might be expected. In the process, clean up
a bit by replacing the bare constants with slightly more meaningful
macros and removing the superfluous "else" statements.
[akpm at linux-foundation.org: dma-mapping.h needs sizes.h for SZ_64K]
Signed-off-by: Robin Murphy <robin.murphy at arm.com>
Reviewed-by: Sumit Semwal <sumit.semwal at linaro.org>
Acked-by: Marek Szyprowski <m.szyprowski at samsung.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Sakari Ailus <sakari.ailus at iki.fi>
Cc: Russell King <rmk+kernel at arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
for no explanation whatever for the magical value.
-Chris
More information about the Intel-gfx
mailing list