video: rockchip: mpp: Fix mpp_iommu_refresh crash issue

1. mpp_iommu_refresh will crash after mpp_iommu_detach, cause by
iommu->domain is null.
2. After the mpp_iommu_refresh operation, there is no need to do
mpp_iommu_detach/attach operations, because the purpose is the same
for refresh iommu.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7c39a63cac67e94b80e7df26c8962b3fed4c670e
This commit is contained in:
Yandong Lin
2021-11-10 11:37:43 +08:00
committed by Tao Huang
parent 6d7ce2c8a0
commit be32fafb08
2 changed files with 0 additions and 5 deletions

View File

@@ -625,8 +625,6 @@ int mpp_dev_reset(struct mpp_dev *mpp)
mpp_iommu_down_write(mpp->iommu_info);
mpp_reset_down_write(mpp->reset_group);
atomic_set(&mpp->reset_request, 0);
mpp_iommu_detach(mpp->iommu_info);
rockchip_save_qos(mpp->dev);
if (mpp->hw_ops->reset)
mpp->hw_ops->reset(mpp);
@@ -638,7 +636,6 @@ int mpp_dev_reset(struct mpp_dev *mpp)
*/
mpp_iommu_refresh(mpp->iommu_info, mpp->dev);
mpp_iommu_attach(mpp->iommu_info);
mpp_reset_up_write(mpp->reset_group);
mpp_iommu_up_write(mpp->iommu_info);

View File

@@ -665,7 +665,6 @@ static int rkvdec2_link_reset(struct mpp_dev *mpp)
rockchip_dmcfreq_unlock();
mutex_unlock(&dec->sip_reset_lock);
mpp_iommu_detach(mpp->iommu_info);
rockchip_restore_qos(mpp->dev);
/* Note: if the domain does not change, iommu attach will be return
@@ -674,7 +673,6 @@ static int rkvdec2_link_reset(struct mpp_dev *mpp)
*/
mpp_iommu_refresh(mpp->iommu_info, mpp->dev);
mpp_iommu_attach(mpp->iommu_info);
mpp_reset_up_write(mpp->reset_group);
mpp_iommu_up_write(mpp->iommu_info);