Commit 514e122c authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Greg Kroah-Hartman

iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5

commit cd37a296 upstream.

For some unknown reasons, in some cases, FLPD cache invalidation doesn't
work properly with SYSMMU v5 controllers found in Exynos5433 SoCs. This
can be observed by a firmware crash during initialization phase of MFC
video decoder available in the mentioned SoCs when IOMMU support is
enabled. To workaround this issue perform a full TLB/FLPD invalidation
in case of replacing any first level page descriptors in case of SYSMMU v5.

Fixes: 740a01ee ("iommu/exynos: Add support for v5 SYSMMU")
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03d92bd5
...@@ -510,7 +510,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data, ...@@ -510,7 +510,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,
if (data->active && data->version >= MAKE_MMU_VER(3, 3)) { if (data->active && data->version >= MAKE_MMU_VER(3, 3)) {
clk_enable(data->clk_master); clk_enable(data->clk_master);
if (sysmmu_block(data)) { if (sysmmu_block(data)) {
__sysmmu_tlb_invalidate_entry(data, iova, 1); if (data->version >= MAKE_MMU_VER(5, 0))
__sysmmu_tlb_invalidate(data);
else
__sysmmu_tlb_invalidate_entry(data, iova, 1);
sysmmu_unblock(data); sysmmu_unblock(data);
} }
clk_disable(data->clk_master); clk_disable(data->clk_master);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment