Some kernel clients of ION need to know if an ION buffer is cached.
Change-Id: I8a179e2ba4476408732e2d32441268883c9dc2c6
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
return __ion_alloc(len, 1 << heap->id, flags);
}
+bool ion_cached_dmabuf(struct dma_buf *dmabuf)
+{
+ return ion_buffer_cached(dmabuf->priv);
+}
+
struct ion_iovm_map {
struct list_head list;
struct device *dev;
#ifdef CONFIG_ION_EXYNOS
struct dma_buf *ion_alloc_dmabuf(const char *heap_name,
size_t len, unsigned int flags);
+bool ion_cached_dmabuf(struct dma_buf *dmabuf);
#else
static inline struct dma_buf *ion_alloc_dmabuf(const char *heap_name,
size_t len, unsigned int flags)
{
return ERR_PTR(-ENODEV);
}
+static inline bool ion_cached_dmabuf(struct dma_buf *dmabuf)
+{
+ return false;
+}
#endif
#if defined(CONFIG_EXYNOS_IOVMM) && defined(CONFIG_ION_EXYNOS)