mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
WIP: iommu/io-pgtable-arm: Fix coherency support for Mali LPAE
Mali T628r0p1 which may be found in Samsung Exynos 5422 SOC is
definitely not dma coherent, and it is not happy with PTE_SH_OS bit set
by default in commit 728da60da7 ("iommu/io-pgtable-arm: Support
coherency for Mali LPAE"). Use PTE_SH_IS by default for non dma
coherent Mali GPUs.
Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
This commit is contained in:
committed by
Mauro (mdrjr) Ribeiro
parent
29c910ca35
commit
6ba8d4547e
@@ -444,9 +444,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
|
||||
* "outside the GPU" (i.e. either the Inner or System domain in CPU
|
||||
* terms, depending on coherency).
|
||||
*/
|
||||
if (prot & IOMMU_CACHE && data->iop.fmt != ARM_MALI_LPAE)
|
||||
if (prot & IOMMU_CACHE ||
|
||||
(data->iop.fmt == ARM_MALI_LPAE && !data->iop.cfg.coherent_walk))
|
||||
pte |= ARM_LPAE_PTE_SH_IS;
|
||||
else
|
||||
else if (data->iop.fmt == ARM_MALI_LPAE)
|
||||
pte |= ARM_LPAE_PTE_SH_OS;
|
||||
|
||||
if (prot & IOMMU_NOEXEC)
|
||||
|
||||
Reference in New Issue
Block a user