video: rockchip: mpp_osal: Add func to get dma iommu mapping

Change-Id: I9c728c8b8048c16cdf85aa421a1192b11f53500c
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
Yandong Lin
2025-05-29 10:53:01 +08:00
committed by Tao Huang
parent 8ec30319e0
commit bb98340ac5
2 changed files with 13 additions and 0 deletions

View File

@@ -41,3 +41,13 @@ void mpp_device_add_driver(void *dev, void *drv)
#endif
}
EXPORT_SYMBOL(mpp_device_add_driver);
struct dma_iommu_mapping *mpp_arm_iommu_get_mapping(struct device *dev)
{
#ifdef CONFIG_ARM_DMA_USE_IOMMU
return dev->archdata.mapping;
#else
return NULL;
#endif
}
EXPORT_SYMBOL(mpp_arm_iommu_get_mapping);

View File

@@ -10,10 +10,13 @@
#include <linux/platform_device.h>
#include <linux/pm_wakeup.h>
struct dma_iommu_mapping;
struct device_node *mpp_dev_of_node(struct device *dev);
void mpp_pm_relax(struct device *dev);
void mpp_pm_stay_awake(struct device *dev);
int mpp_device_init_wakeup(struct device *dev, bool enable);
void mpp_device_add_driver(void *dev, void *drv);
struct dma_iommu_mapping *mpp_arm_iommu_get_mapping(struct device *dev);
#endif