media: rockchip: cif fix issue for CONFIG_ROCKCHIP_IOMMU=n

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6914ac32bcef7c56eabe6bef9b9acce68615cbc7
This commit is contained in:
Zefa Chen
2021-10-01 22:55:07 +08:00
parent 8164b072b3
commit 2dd7f5f53f
2 changed files with 4 additions and 4 deletions

View File

@@ -2356,8 +2356,8 @@ static void rkcif_do_cru_reset(struct rkcif_device *dev)
domain = iommu_get_domain_for_dev(cif_hw->dev);
if (domain) {
domain->ops->detach_dev(domain, cif_hw->dev);
domain->ops->attach_dev(domain, cif_hw->dev);
iommu_detach_device(domain, cif_hw->dev);
iommu_attach_device(domain, cif_hw->dev);
}
}
}

View File

@@ -765,7 +765,7 @@ err:
static void rkcif_iommu_cleanup(struct rkcif_hw *cif_hw)
{
if (cif_hw->domain)
cif_hw->domain->ops->detach_dev(cif_hw->domain, cif_hw->dev);
iommu_detach_device(cif_hw->domain, cif_hw->dev);
}
static void rkcif_iommu_enable(struct rkcif_hw *cif_hw)
@@ -774,7 +774,7 @@ static void rkcif_iommu_enable(struct rkcif_hw *cif_hw)
cif_hw->domain = iommu_get_domain_for_dev(cif_hw->dev);
if (cif_hw->domain)
cif_hw->domain->ops->attach_dev(cif_hw->domain, cif_hw->dev);
iommu_attach_device(cif_hw->domain, cif_hw->dev);
}
static inline bool is_iommu_enable(struct device *dev)