|
@@ -247,6 +247,15 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
|
|
|
if (IS_ERR(exynos_gem))
|
|
|
return exynos_gem;
|
|
|
|
|
|
+ if (!is_drm_iommu_supported(dev) && (flags & EXYNOS_BO_NONCONTIG)) {
|
|
|
+ /*
|
|
|
+ * when no IOMMU is available, all allocated buffers are
|
|
|
+ * contiguous anyway, so drop EXYNOS_BO_NONCONTIG flag
|
|
|
+ */
|
|
|
+ flags &= ~EXYNOS_BO_NONCONTIG;
|
|
|
+ DRM_WARN("Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n");
|
|
|
+ }
|
|
|
+
|
|
|
/* set memory type and cache attribute from user side. */
|
|
|
exynos_gem->flags = flags;
|
|
|
|