drm/msm/sde: enable system cache for pagetable walks in mdp
Enable system cache for mdp page table walks as
recommended.
Change-Id: I99230cebc43a880c061e1d165bb6478958980435
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/msm_smmu.c b/drivers/gpu/drm/msm/msm_smmu.c
index 730fc06..92d1865 100644
--- a/drivers/gpu/drm/msm/msm_smmu.c
+++ b/drivers/gpu/drm/msm/msm_smmu.c
@@ -455,6 +455,7 @@
const struct msm_smmu_domain *domain)
{
int rc;
+ int mdphtw_llc_enable = 1;
client->mmu_mapping = arm_iommu_create_mapping(&platform_bus_type,
domain->va_start, domain->va_size);
@@ -465,6 +466,14 @@
return PTR_ERR(client->mmu_mapping);
}
+ rc = iommu_domain_set_attr(client->mmu_mapping->domain,
+ DOMAIN_ATTR_USE_UPSTREAM_HINT, &mdphtw_llc_enable);
+ if (rc) {
+ dev_err(client->dev, "couldn't enable mdp pagetable walks: %d\n",
+ rc);
+ goto error;
+ }
+
if (domain->secure) {
int secure_vmid = VMID_CP_PIXEL;