diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-15 08:18:17 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-18 20:05:22 -0400 |
commit | 239921ec1d969e904676f444a92e6d68a928d98c (patch) | |
tree | 44b8fbf6a560ed526d926c40fec48043d469ff46 /include | |
parent | 6e729b416b44296f5ed503b40ac58c2bffb43caf (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')
-rw-r--r-- | include/video/sh_mobile_meram.h | 16 |
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 { | |||
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) |
41 | unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, | ||
42 | size_t size); | ||
43 | void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, | ||
44 | unsigned long mem, size_t size); | ||
41 | void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, | 45 | void *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 |
57 | static inline unsigned long | ||
58 | sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size) | ||
59 | { | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | static inline void | ||
64 | sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, | ||
65 | unsigned long mem, size_t size) | ||
66 | { | ||
67 | } | ||
68 | |||
53 | static inline void * | 69 | static inline void * |
54 | sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, | 70 | sh_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, |