From 51e45dfa59cedf6d9c19be4274a1b4489523bde1 Mon Sep 17 00:00:00 2001 From: Yashwanth Date: Fri, 17 Jan 2020 19:29:17 +0530 Subject: [PATCH] disp: rotator: update iommu domain info during rotator probe In 4.19 kernel, smmu driver will attach context bank soon after device is probed. This change fixes display driver to treat smmu context bank as pre attached. Change-Id: Ib95abeb3c853903efb9bed3e04552278576a572a Signed-off-by: Yashwanth --- rotator/sde_rotator_smmu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rotator/sde_rotator_smmu.c b/rotator/sde_rotator_smmu.c index f692261fde..db45727057 100644 --- a/rotator/sde_rotator_smmu.c +++ b/rotator/sde_rotator_smmu.c @@ -432,13 +432,19 @@ int sde_smmu_secure_ctrl(int enable) void sde_smmu_device_create(struct device *dev) { struct device_node *parent, *child; + struct sde_rot_data_type *mdata = sde_rot_get_mdata(); parent = dev->of_node; for_each_child_of_node(parent, child) { - if (of_device_is_compatible(child, SMMU_SDE_ROT_SEC)) + if (of_device_is_compatible(child, SMMU_SDE_ROT_SEC)) { of_platform_device_create(child, NULL, dev); - else if (of_device_is_compatible(child, SMMU_SDE_ROT_UNSEC)) + mdata->sde_smmu + [SDE_IOMMU_DOMAIN_ROT_SECURE].domain_attached = true; + } else if (of_device_is_compatible(child, SMMU_SDE_ROT_UNSEC)) { of_platform_device_create(child, NULL, dev); + mdata->sde_smmu + [SDE_IOMMU_DOMAIN_ROT_UNSECURE].domain_attached = true; + } } }