|
@@ -294,6 +294,12 @@ static int inline cam_subdev_list_cmp(struct cam_subdev *entry_1, struct cam_sub
|
|
|
}
|
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
|
|
+void cam_smmu_util_iommu_custom(struct device *dev,
|
|
|
+ dma_addr_t discard_start, size_t discard_length)
|
|
|
+{
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
int cam_req_mgr_ordered_list_cmp(void *priv,
|
|
|
const struct list_head *head_1, const struct list_head *head_2)
|
|
|
{
|
|
@@ -323,6 +329,17 @@ int cam_get_ddr_type(void)
|
|
|
return DDR_TYPE_LPDDR5;
|
|
|
}
|
|
|
#else
|
|
|
+void cam_smmu_util_iommu_custom(struct device *dev,
|
|
|
+ dma_addr_t discard_start, size_t discard_length)
|
|
|
+{
|
|
|
+ iommu_dma_enable_best_fit_algo(dev);
|
|
|
+
|
|
|
+ if (discard_start)
|
|
|
+ iommu_dma_reserve_iova(dev, discard_start, discard_length);
|
|
|
+
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
int cam_req_mgr_ordered_list_cmp(void *priv,
|
|
|
struct list_head *head_1, struct list_head *head_2)
|
|
|
{
|