return -1;
}
+ /*
+ * The ordering in Makefile warrants that this is initialized after
+ * FIMD, so only just ensure that it works as expected and we are
+ * reusing the mapping originally created in exynos_drm_fimd.c.
+ */
+ WARN_ON(!exynos_drm_common_mapping);
if (!s5p_create_iommu_mapping(&pdev->dev, 0,
0, 0, exynos_drm_common_mapping)) {
printk(KERN_ERR "failed to create IOMMU mapping\n");
}
platform_set_sysmmu(&pds->dev, &pdev->dev);
+ /*
+ * Due to the ordering in Makefile, this should be called first
+ * (before exynos_drm_drv.c and exynos_mixer.c and actually create
+ * the common mapping instead of reusing it. Ensure this assumption
+ * holds.
+ */
+ WARN_ON(exynos_drm_common_mapping);
exynos_drm_common_mapping = s5p_create_iommu_mapping(&pdev->dev,
0x20000000, SZ_256M, 4,
exynos_drm_common_mapping);
}
platform_set_sysmmu(&pds->dev, &pdev->dev);
+ /*
+ * The ordering in Makefile warrants that this is initialized after
+ * FIMD, so only just ensure that it works as expected and we are
+ * reusing the mapping originally created in exynos_drm_fimd.c.
+ */
+ WARN_ON(!exynos_drm_common_mapping);
exynos_drm_common_mapping = s5p_create_iommu_mapping(&pdev->dev,
- 0x20000000, SZ_128M, 4, exynos_drm_common_mapping);
+ 0, 0, 0, exynos_drm_common_mapping);
if(exynos_drm_common_mapping == NULL) {
printk(KERN_ERR"Failed to create iommu mapping for Mixer\n");
return -EINVAL;