aboutsummaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-15 08:18:17 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 20:05:22 -0400
commit239921ec1d969e904676f444a92e6d68a928d98c (patch)
tree44b8fbf6a560ed526d926c40fec48043d469ff46 /include/video
parent6e729b416b44296f5ed503b40ac58c2bffb43caf (diff)
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')
-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 11348379f09..062e6e7f955 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -38,6 +38,10 @@ struct sh_mobile_meram_cfg {
38 38
39#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \ 39#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \
40 defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE) 40 defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE)
41unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev,
42 size_t size);
43void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
44 unsigned long mem, size_t size);
41void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, 45void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
42 const struct sh_mobile_meram_cfg *cfg, 46 const struct sh_mobile_meram_cfg *cfg,
43 unsigned int xres, unsigned int yres, 47 unsigned int xres, unsigned int yres,
@@ -50,6 +54,18 @@ void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
50 unsigned long *icb_addr_y, 54 unsigned long *icb_addr_y,
51 unsigned long *icb_addr_c); 55 unsigned long *icb_addr_c);
52#else 56#else
57static inline unsigned long
58sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size)
59{
60 return 0;
61}
62
63static inline void
64sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
65 unsigned long mem, size_t size)
66{
67}
68
53static inline void * 69static inline void *
54sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, 70sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
55 const struct sh_mobile_meram_cfg *cfg, 71 const struct sh_mobile_meram_cfg *cfg,