mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
video: rockchip: mpp: deal with the case for iommu share
In platform arm32, iommu is shared in different device, it must attach to ensure hardware working in current device. Change-Id: I854a362adf6145dcfd796885922683f8a6b7e131 Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
@@ -806,6 +806,15 @@ static int mpp_task_run(struct mpp_dev *mpp,
|
||||
} else {
|
||||
mpp_set_grf(mpp->grf_info);
|
||||
}
|
||||
/*
|
||||
* for iommu share hardware, should attach to ensure
|
||||
* working in current device
|
||||
*/
|
||||
ret = mpp_iommu_attach(mpp->iommu_info);
|
||||
if (ret) {
|
||||
dev_err(mpp->dev, "mpp_iommu_attach failed\n");
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
mpp_power_on(mpp);
|
||||
mpp_debug_func(DEBUG_TASK_INFO, "pid %d run %s\n",
|
||||
|
||||
@@ -388,6 +388,9 @@ int mpp_iommu_attach(struct mpp_iommu_info *info)
|
||||
if (!info)
|
||||
return 0;
|
||||
|
||||
if (info->domain == iommu_get_domain_for_dev(info->dev))
|
||||
return 0;
|
||||
|
||||
return iommu_attach_group(info->domain, info->group);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user