summaryrefslogtreecommitdiffstats
path: root/include/video/sh_mobile_meram.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-15 13:18:17 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-19 02:05:22 +0200
commit239921ec1d969e904676f444a92e6d68a928d98c (patch)
tree44b8fbf6a560ed526d926c40fec48043d469ff46 /include/video/sh_mobile_meram.h
parentsh_mobile_meram: Use direct function calls for the public API (diff)
downloadlinux-239921ec1d969e904676f444a92e6d68a928d98c.tar.xz
linux-239921ec1d969e904676f444a92e6d68a928d98c.zip
sh_mobile_meram: Add direct MERAM allocation API
The API can be used to allocate and free MERAM blocks directly, without going through ICBs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/video/sh_mobile_meram.h')
-rw-r--r--include/video/sh_mobile_meram.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index 11348379f093..062e6e7f955c 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -38,6 +38,10 @@ struct sh_mobile_meram_cfg {
#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \
defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE)
+unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev,
+ size_t size);
+void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
+ unsigned long mem, size_t size);
void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
const struct sh_mobile_meram_cfg *cfg,
unsigned int xres, unsigned int yres,
@@ -50,6 +54,18 @@ void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
unsigned long *icb_addr_y,
unsigned long *icb_addr_c);
#else
+static inline unsigned long
+sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size)
+{
+ return 0;
+}
+
+static inline void
+sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
+ unsigned long mem, size_t size)
+{
+}
+
static inline void *
sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
const struct sh_mobile_meram_cfg *cfg,