]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: saa7134: use sg_dma_len when building pgtable
authorTasos Sahanidis <tasos@tasossah.com>
Wed, 3 Mar 2021 18:30:18 +0000 (19:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:52 +0000 (10:49 +0200)
commitc4af36132cfc70fa414b3a6f378e1b59186bf9b9
treec08ab3e5e2dc2eb27932f740173c479ee8e2b6ba
parente4956c3903c314df48e971767161c5ff22f93117
media: saa7134: use sg_dma_len when building pgtable

[ Upstream commit 4e1cb753c04d74e06d7ca826ea0bcb02526af03e ]

The new AMD IOMMU DMA implementation concatenates sglist entries under
certain conditions, and because saa7134 accessed the length member
directly, it did not support this scenario.

This fixes IO_PAGE_FAULTs and choppy DMA audio by using the
sg_dma_len macro.

Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api")
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/saa7134/saa7134-core.c