From: CMY <cmy@rock-chips.com>
Date: Fri, 27 Feb 2015 09:59:00 +0000 (+0800)
Subject: rk: ion: allow the cacheable buffer to map iommu
X-Git-Tag: firefly_0821_release~4263^2~25^2~5
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=824538301d6e0a077d93b0ec5fe4c759f77cf6b5;p=firefly-linux-kernel-4.4.55.git

rk: ion: allow the cacheable buffer to map iommu

Signed-off-by: CMY <cmy@rock-chips.com>
(cherry picked from commit db95a55ffa214b0bab8643454875a42d655a8ad7)

Signed-off-by: CMY <cmy@rock-chips.com>
---

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 3a97ad0367bb..0271c19ced2c 100755
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -811,12 +811,6 @@ int ion_map_iommu(struct device *iommu_dev, struct ion_client *client,
 
 	mutex_lock(&buffer->lock);
 
-	if (ion_buffer_cached(buffer)) {
-		pr_err("%s: Cannot map iommu as cached.\n", __func__);
-		ret = -EINVAL;
-		goto out;
-	}
-
 	if (!handle->buffer->heap->ops->map_iommu) {
 		pr_err("%s: map_iommu is not implemented by this heap.\n",
 		       __func__);