mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user