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
committed by Tao Huang
parent 0adfae22a6
commit 715b9488cd
2 changed files with 4 additions and 4 deletions

View File

@@ -2344,8 +2344,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

@@ -781,7 +781,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)
@@ -790,7 +790,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)